bcc icon indicating copy to clipboard operation
bcc copied to clipboard

PT_REGS_PARM1 return value is not "this" pointer when uprobing C++ class function

Open ZhangJiaQiao opened this issue 7 months ago • 0 comments

What I want to probe is MongoDB server 'ServiceEntryPointMongod::handleRequest' function. 'this' pointer should be the first argument of the function. However, I used bcc 'PT_REGS_PARM1' macro to get the first argument of the function and found that it was not 'this' pointer. Finally, I got the 'this' pointer by the 'PT_REGS_PARM1' macro successfully as showed below.

image

image

And my question is what is the first argument I got and why 'this' pointer is the second argument.

ZhangJiaQiao avatar Jul 10 '24 03:07 ZhangJiaQiao