[Dwarf-Discuss] how to find local variable stored in register

Michael Eager eager@eagercon.com
Tue Feb 5 00:27:08 GMT 2008


Frank Ch. Eigler wrote:
> Hi -
> 
> On Mon, Feb 04, 2008 at 03:19:43PM -0800, Michael Eager wrote:
>> Frank Ch. Eigler wrote:
>> [...]
>>>> Suppose this foo() funciton call another function, then this
>>>> register value will get stored in stack before invoking the function
>>>> call.
>>> A truthful compiler will add extra location records for this variable
>>> for the time (PC ranges) when its value is on the stack.
>> DWARF does not describe where variables are saved as result of a
>> function call.  This is specified by the processor ABI.
> 
> A close reading of the original posting shows ... "before invoking the
> function call" ... that is during the function call setup instructions
> within the *caller*.  DWARF should indeed describe the saved location
> of the variable in these regions AFAIK.

The register is stored as part of the calling convention.
DWARF does not duplicate information contained in the ABI
specification.

-- 
Michael Eager	 eager at eagercon.com
1960 Park Blvd., Palo Alto, CA 94306  650-325-8077




More information about the Dwarf-discuss mailing list