bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug gprof/24520] New: gprof fails to read compressed debug data include


From: ingrix at bigbluewhale dot info
Subject: [Bug gprof/24520] New: gprof fails to read compressed debug data included in executable
Date: Fri, 03 May 2019 15:20:22 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=24520

            Bug ID: 24520
           Summary: gprof fails to read compressed debug data included in
                    executable
           Product: binutils
           Version: 2.32
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: gprof
          Assignee: unassigned at sourceware dot org
          Reporter: ingrix at bigbluewhale dot info
  Target Milestone: ---

It seems that gprof is unable to read compressed debug info included in
executable files, resulting in errors similar to the following (from
bfd/dwarf2.c):

DWARF error: found dwarf version '4355', this reader only handles version 2, 3,
4 and 5 information

This occurs when compiling using gcc with options -g
-Wl,--compress-debug-sections=zlib-gnu.  Unfortunately I have been unable to
produce a minimal case that reproduces this bug, but the following patch has
fixed the issue for me:

diff --git a/gprof/corefile.c b/gprof/corefile.c
index 3717d20294..3f350f5f6b 100644
--- a/gprof/corefile.c
+++ b/gprof/corefile.c
@@ -186,6 +186,8 @@ core_init (const char * aout_name)
       done (1);
     }

+  core_bfd->flags |= BFD_DECOMPRESS;
+
   if (!bfd_check_format (core_bfd, bfd_object))
     {
       fprintf (stderr, _("%s: %s: not in executable format\n"), whoami,
aout_name);

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]