Re: Complex DWARF expressions

Yao Qi <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>
Eli Zaretskii <[email protected]> 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 (齐尧)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.