[Dwarf-discuss] address of variable out of range of its function?
Frederic RISS
frederic.riss
Mon Oct 9 07:56:09 GMT 2006
On Mon, 2006-10-09 at 02:38 +0900, Jun Koi wrote:
>
> <1><40747> DW_TAG_subprogram
> DW_AT_name do_unlinkat
> DW_AT_low_pc 0xc0161640
> <2><40822> DW_TAG_variable
> DW_AT_name name
> DW_AT_location <loclist with 1 entries
> follows>
> [ 0]<lowpc=0x2ccd><highpc=0x2cd7>DW_OP_reg2
>
> As you see, variable "name" has only 1 loclist entry, and can be
> accessed only via reg2.
> However, while the function do_unlinkat() ranges in [0xc0161640,
> 0xc0161782], the variable "name" within the function can only be
> accessed if the PC is within [0xc0161640 + 0x2ccd, 0xc0161640 +
> 0x2cd7] == [0xc0164317, 0xc016430d], which is way out of the range of
> the do_unlinkat() function (??). That means there is no way to access
> to it from within function (??)
The loclist ranges are relative to the compilation unit low_pc, not to
the function's one IIRC.
Fred.
More information about the Dwarf-discuss
mailing list