[Dwarf-Discuss] how to find local variable stored in register
Frank Ch. Eigler
Mon Feb 4 13:49:01 GMT 2008
On Mon, Feb 04, 2008 at 09:50:24AM +0530, Neeraj kushwaha wrote:
> DW_AT_name = b
> DW_AT_location = DW_OP_reg0
> From this dwarf debug information I get that local variable b is stored at
> DW_OP_reg0. But how to find this register value.
The mechanics of actually fetching a register from a target processor
is beyond the scope of dwarf.
> Suppose this foo() funciton call another function, then this
> register value will get stored in stack before invoking the function
A truthful compiler will add extra location records for this variable
for the time (PC ranges) when its value is on the stack.
More information about the Dwarf-discuss