]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
readelf: Always try to print some debug section information.
authorMark Wielaard <mjw@redhat.com>
Fri, 17 Apr 2015 20:24:41 +0000 (22:24 +0200)
committerMark Wielaard <mjw@redhat.com>
Tue, 28 Apr 2015 11:55:35 +0000 (13:55 +0200)
Even if we cannot create a proper Dwarf dbg we can still print the
information of various debug sections. All all debug print section
functions already check first they can access the appropriate data.

Signed-off-by: Mark Wielaard <mjw@redhat.com>
src/ChangeLog
src/readelf.c

index 6985b58675d1425d1b6dd7a97c8da6b2934ce7ec..e92f1158847c8f378a9d5d645c41f488cb4e1dab 100644 (file)
@@ -1,3 +1,7 @@
+2015-03-17  Mark Wielaard  <mjw@redhat.com>
+
+       * readelf.c (print_debug): Don't return, but always use dummy_dbg.
+
 2015-03-17  Mark Wielaard  <mjw@redhat.com>
 
        * readelf.c (print_gdb_index_section): Add overflow checking for
index b717757a17389a0ae89d187ec475937ac04de834..7f84edafca7d946b65be565979d971d38c2080f0 100644 (file)
@@ -8188,8 +8188,6 @@ print_debug (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr)
       if ((print_debug_sections & ~section_exception) != 0)
        error (0, 0, gettext ("cannot get debug context descriptor: %s"),
               dwfl_errmsg (-1));
-      if ((print_debug_sections & section_exception) == 0)
-       return;
       dbg = &dummy_dbg;
     }