Search Posts

I finally understand why same parameter even has multiple locations

I finally understand why same parameter even has multiple locations. My pass concept is parameter stay in the stack. But after hacking the dwarf, it show me same parameter have multiple location during execution. Take a look below image, I wrote a function call kmalloc2 (blue arrow), the third parameter “size” has three locations (yellow arrow) during executing that function. The reason is that compile will move the parameter value from stack (rd arrow) to register ecx (green arrow), so during the execution this parameter has multiple locations. Dwarf is able to point you out where it is.

parameter has multiple locations
parameter has multiple locations

1 comment on I finally understand why same parameter even has multiple locations

Leave a Reply to Peter_OS Cancel reply

Your email address will not be published. Required fields are marked *