This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Complex DWARF expressions
- From: Yao Qi <yao at codesourcery dot com>
- To: Eli Zaretskii <eliz at gnu dot org>
- Cc: <gdb at sourceware dot org>
- Date: Mon, 22 Sep 2014 13:59:20 +0800
- Subject: Re: Complex DWARF expressions
- Authentication-results: sourceware.org; auth=none
- References: <83sijkydk4 dot fsf at gnu dot org>
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 (éå)