diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/readelf.c | 10 |
2 files changed, 14 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index b6f66bdd..e7ba6cb1 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2018-05-29 Mark Wielaard <[email protected]> + + * readelf.c (print_debug): Record and reset section_info status in + implicit_debug_sections and print_debug_sections. + 2018-05-28 Mark Wielaard <[email protected]> * readelf.c (print_debug_units): Turn "Could not find split compile diff --git a/src/readelf.c b/src/readelf.c index bfa1d16d..390f2444 100644 --- a/src/readelf.c +++ b/src/readelf.c @@ -10894,7 +10894,9 @@ print_debug (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr) we must make sure to handle it before handling any other debug section. Various other sections depend on the CU DIEs being scanned (silently) first. */ - if ((implicit_debug_sections & section_info) != 0) + bool implicit_info = (implicit_debug_sections & section_info) != 0; + bool explicit_info = (print_debug_sections & section_info) != 0; + if (implicit_info) { Elf_Scn *scn = NULL; while ((scn = elf_nextscn (ebl->elf, scn)) != NULL) @@ -11012,6 +11014,12 @@ print_debug (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr) dwfl_end (skel_dwfl); free (skel_name); + /* Turn implicit and/or explicit back on in case we go over another file. */ + if (implicit_info) + implicit_debug_sections |= section_info; + if (explicit_info) + print_debug_sections |= section_info; + reset_listptr (&known_locsptr); reset_listptr (&known_loclistsptr); reset_listptr (&known_rangelistptr); |
