[Crash-utility] [PATCH] Use /usr/bin/nm -D

Dave Anderson anderson at redhat.com
Mon Aug 25 13:27:43 UTC 2008


Unfortunately on an unstripped version, it drops all ~3000 ' t ' symbols and
only dumps type 'T' symbols.  Probably it should run -Bn first, or recognize
otherwise that it's been stripped, and if it dumps no symbols, [re]try it
with -DBn?

Dave


----- Original Message -----
From: "Bernhard Walle" <bwalle at suse.de>
To: crash-utility at redhat.com
Sent: Monday, August 25, 2008 7:56:37 AM GMT -05:00 US/Canada Eastern
Subject: [Crash-utility] [PATCH] Use /usr/bin/nm -D

Use "nm -D" to retrieve also the symbols of crash when compiled without -g
(or stripped after compilation and debuginfo extraction).

Signed-off-by: Bernhard Walle <bwalle at suse.de>

diff --git a/symbols.c b/symbols.c
--- a/symbols.c
+++ b/symbols.c
@@ -9077,7 +9077,7 @@
                if (!(lookfor = retaddr[i]))
                        continue;

-               sprintf(buf, "/usr/bin/nm -Bn %s", thisfile);
+               sprintf(buf, "/usr/bin/nm -DBn %s", thisfile);
                if (!(pipe = popen(buf, "r"))) {
                        perror("pipe");
                        break;




More information about the Crash-utility mailing list