Re: Complex DWARF expressions

Yao Qi
2014-09-22T06:03:55Z

Eli Zaretskii <eliz@gnu.org> writes:

> Range 0x100aaf7-0x100ad4c: a complex DWARF expression:
> 0: DW_OP_GNU_entry_value
> 2: DW_OP_reg2 [$edx]
> 3: DW_OP_stack_value
>
> "A variable in $edx" I understand, but what about the "complex DWARF
> expression" parts? Is there any way a mere mortal such as myself can
> decipher this to the effect of understanding in which register or at
> what address can I look up the value, assuming that I know at which PC
> address the program stopped?
>
> (Yes, I've looked at the DWARF Standard, but couldn't understand from
> the description of these location descriptors how to convert them to
> either a register or a memory address.)

DW_OP_GNU_entry_value isn't in DWARF Standard and it is documented here
http://www.dwarfstd.org/ShowIssue.php?issue=100909.1

If I understand the doc above correctly, the entry above means if PC is
within range 0x100aaf7-0x100ad4c, the value of new_width is the value of
$edx at the moment entering this function. IOW, to get value of
new_width, needs to unwind frame and read $edx.

--
Yao (齐尧)