diff options
| author | Mark Wielaard <[email protected]> | 2017-11-29 15:58:40 +0100 |
|---|---|---|
| committer | Mark Wielaard <[email protected]> | 2017-11-29 16:43:54 +0100 |
| commit | e6f1990baf57f07960d10bfed306ed74f93f491a (patch) | |
| tree | 3a32e3d172dd8b1a18ac53649bd2ea2dd5351291 /src/readelf.c | |
| parent | 704f5fc477efaf120980449e677deb563da8491f (diff) | |
readelf: Print abbrev code for DIE with --debug-dump=info.
If there is anything wrong with a DIE it is useful to know what the abbrev
code was so you can lookup the abbrev description.
Signed-off-by: Mark Wielaard <[email protected]>
Diffstat (limited to 'src/readelf.c')
| -rw-r--r-- | src/readelf.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/readelf.c b/src/readelf.c index 2faa1d57..e9887c45 100644 --- a/src/readelf.c +++ b/src/readelf.c @@ -6371,9 +6371,12 @@ print_debug_units (Dwfl_Module *dwflmod, } if (!silent) - printf (" [%6" PRIx64 "] %*s%s\n", - (uint64_t) offset, (int) (level * 2), "", - dwarf_tag_name (tag)); + { + unsigned int code = dwarf_getabbrevcode (dies[level].abbrev); + printf (" [%6" PRIx64 "] %*s%-20s abbrev: %u\n", + (uint64_t) offset, (int) (level * 2), "", + dwarf_tag_name (tag), code); + } /* Print the attribute values. */ args.level = level; |
