diff options
| author | Mark Wielaard <[email protected]> | 2018-05-31 16:57:09 +0200 |
|---|---|---|
| committer | Mark Wielaard <[email protected]> | 2018-06-01 17:27:59 +0200 |
| commit | e2872c91f65301b202b84497b2b955f9e9613d00 (patch) | |
| tree | 9c714039ba9dad15e5142ef4fc845974f0793752 /src/readelf.c | |
| parent | a6a783a32ee0e6428c15c87e62476b74ecd77686 (diff) | |
libdw: Try both the relative and absolute paths when finding a .dwo file.
We would give up if one of them failed. With this fixed a self-test with
make check succeeds when building elfutils itself with CFLAGS set to
"-gdwarf-4 -gdwarf-split -O2".
Signed-off-by: Mark Wielaard <[email protected]>
Diffstat (limited to 'src/readelf.c')
| -rw-r--r-- | src/readelf.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/readelf.c b/src/readelf.c index 18ce3f7d..0725313e 100644 --- a/src/readelf.c +++ b/src/readelf.c @@ -7680,7 +7680,18 @@ print_debug_units (Dwfl_Module *dwflmod, || dwarf_tag (&subdie) == DW_TAG_invalid) { if (!silent) - fprintf (stderr, gettext ("Could not find split compile unit")); + { + Dwarf_Attribute dwo_at; + const char *dwo_name = + (dwarf_formstring (dwarf_attr (&cudie, DW_AT_dwo_name, + &dwo_at)) + ?: (dwarf_formstring (dwarf_attr (&cudie, DW_AT_GNU_dwo_name, + &dwo_at)) + ?: "<unknown>")); + fprintf (stderr, + "Could not find split unit '%s', id: %" PRIx64 "\n", + dwo_name, unit_id); + } } else { |
