[Dwarf-Discuss] meaning's dwarf expression for DW_AT_frame_base in loclist
marion.guthmuller at loria.fr
Thu Sep 13 05:29:04 PDT 2012
Le 13/09/2012 14:09, Michael Eager a écrit :
> On 09/13/2012 02:37 AM, Marion Guthmuller wrote:
>> What does this expression mean ? DW_OP_breg7+8
>> This expression is associated to DW_AT_frame base in a loclist.
>> DW_OP_breg7 is the contents of r7
>> but I don't understand the "+8". I thought that this expression mean
>> to add 8 to the value in
>> register 7 but in this case, the expression should be DW_OP_breg7 8
>> (without "+") according to
>> examples of location description in user guide.
> Where do you see DW_OP_breg7+8?
> What user guide are you referring to? The DWARF Standard?
> DWARF expressions are sequences of binary values. Different
> programs may print them with different formats. My guess
> is that the dump program you are using is trying to indicate
> that the expression is (r7+8).
I want to retrieve local variables and their values of an executable.
For that, I used dwarfdump and I focused on .debug_info section.
My executable contains 3 functions. For each, I found in .debug_info a
node DW_TAG_subprogram with an attribute DW_AT_frame_base.
For example, I have a function "client" with these information :
< 1><0x000009a0> DW_TAG_subprogram
DW_AT_decl_file 0x00000001 ./bugged1.c
DW_AT_frame_base <loclist with 6 entries follows>
After other research, it seems that my first evaluation and yours are
the good one : we simply add 8 to the value in register 7.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Dwarf-Discuss