I finally understand why same parameter even has multiple locations
2015-04-07
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.