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.
_______________________________________________
bug-binutils mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-binutils