Hi,
Here is a patch from Jakub (with some small tweaks to the output
from me). It adds typed DWARF stack support (which is now in gcc trunk)
where DW_OP_GNU_entry_value is supported. readelf -w works. For more
background on the new ops see
http://www.dwarfstd.org/doc/040408.1.html
Here is some example output:
[ f582] GNU_call_site_parameter
location (block1)
[ 0] reg17
GNU_call_site_value (block1)
[ 0] breg15 0
[ 2] const1u 32
[ 4] shl
[ 5] const1u 32
[ 7] shr
[ 8] GNU_convert [ 38]
[ 10] GNU_convert [ 31]
[ 12] GNU_const_type [ 31] 8 byte block: 00 00 00 00 00 00
59 40
[ 23] mul
[ 24] fbreg -168
[ 27] GNU_deref_type 8 [ 31]
[ 30] div
We haven't figured out yet how to adjust dwarf_getlocation to handle
these 5 new ops and DW_OP_GNU_entry_value.
I'll push the first patch to master, merge master into the dwarf branch
and then apply the second patch on the branch.
Cheers,
Mark