+2013-03-25 Mark Wielaard <mjw@redhat.com>
+
+ * readelf.c (attrcb_args): Add Dwarf_Die.
+ (attr_callback): When highpc is in constant form also print as
+ address.
+ (print_debug_units): Set args.die.
+
2013-03-19 Mark Wielaard <mjw@redhat.com>
* readelf.c (print_gdb_index_section): Free format_dwarf_addr results.
{
Dwfl_Module *dwflmod;
Dwarf *dbg;
+ Dwarf_Die *die;
int level;
bool silent;
unsigned int version;
if (cbargs->silent)
break;
- if (valuestr == NULL)
+ /* When highpc is in constant form it is relative to lowpc.
+ In that case also show the address. */
+ Dwarf_Addr highpc;
+ if (attr == DW_AT_high_pc && dwarf_highpc (cbargs->die, &highpc) == 0)
+ {
+ char *a = format_dwarf_addr (cbargs->dwflmod, cbargs->addrsize,
+ highpc, highpc);
+ printf (" %*s%-20s (%s) %" PRIuMAX " (%s)\n",
+ (int) (level * 2), "", dwarf_attr_name (attr),
+ dwarf_form_name (form), (uintmax_t) num, a);
+ free (a);
+ }
+ else if (valuestr == NULL)
printf (" %*s%-20s (%s) %" PRIuMAX "\n",
(int) (level * 2), "", dwarf_attr_name (attr),
dwarf_form_name (form), (uintmax_t) num);
/* Print the attribute values. */
args.level = level;
+ args.die = &dies[level];
(void) dwarf_getattrs (&dies[level], attr_callback, &args, 0);
/* Make room for the next level's DIE. */
+2013-03-25 Mark Wielaard <mjw@redhat.com>
+
+ * run-readelf-dwz-multi.sh: Expect high_pc also as address.
+
2013-03-20 Jan Kratochvil <jan.kratochvil@redhat.com>
* Makefile.am (check_PROGRAMS): Add dwfl-report-elf-align.
name (strp) "main.c"
comp_dir (GNU_strp_alt) "/home/mark/src/tests/dwz"
low_pc (addr) 0x00000000004006ac <main>
- high_pc (udata) 44
+ high_pc (udata) 44 (0x00000000004006d8)
stmt_list (sec_offset) 0
[ 26] imported_unit
import (GNU_ref_alt) [ b]
prototyped (flag_present)
type (GNU_ref_alt) [ 3e]
low_pc (addr) 0x00000000004006ac <main>
- high_pc (udata) 44
+ high_pc (udata) 44 (0x00000000004006d8)
frame_base (exprloc)
[ 0] call_frame_cfa
GNU_all_tail_call_sites (flag_present)
name (strp) "shared.c"
comp_dir (GNU_strp_alt) "/home/mark/src/tests/dwz"
low_pc (addr) +0x0000000000000670 <call_foo>
- high_pc (udata) 23
+ high_pc (udata) 23 (+0x0000000000000687)
stmt_list (sec_offset) 0
[ 26] imported_unit
import (GNU_ref_alt) [ b]
prototyped (flag_present)
type (GNU_ref_alt) [ 3e]
low_pc (addr) +0x0000000000000670 <call_foo>
- high_pc (udata) 23
+ high_pc (udata) 23 (+0x0000000000000687)
frame_base (exprloc)
[ 0] call_frame_cfa
GNU_all_call_sites (flag_present)
name (GNU_strp_alt) "main.c"
comp_dir (GNU_strp_alt) "/home/mark/src/tests"
low_pc (addr) 0x00000000004004ec <main>
- high_pc (udata) 18
+ high_pc (udata) 18 (0x00000000004004fe)
stmt_list (sec_offset) 0
[ 26] imported_unit
import (GNU_ref_alt) [ b]
prototyped (flag_present)
type (GNU_ref_alt) [ 30]
low_pc (addr) 0x00000000004004ec <main>
- high_pc (udata) 18
+ high_pc (udata) 18 (0x00000000004004fe)
frame_base (exprloc)
[ 0] call_frame_cfa
GNU_all_call_sites (flag_present)