public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/17988] New: batch mode wrong symbols in relocatable files with debug link
@ 2015-02-17  4:46 msebor at redhat dot com
  0 siblings, 0 replies; only message in thread
From: msebor at redhat dot com @ 2015-02-17  4:46 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 17988
           Summary: batch mode wrong symbols in relocatable files with
                    debug link
           Product: gdb
           Version: 7.8
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: msebor at redhat dot com

When invoked on a relocatable object such as a kernel module with separate
debug info pointed to via a .gun_dbuglink section but linked without the
--build-id option, GDB reads in the debug symbols from the linked debug file
but doesn't seem to retain them.  This works as expected for shared executables
or when the relocatable file is linked with --build-id.

$ (set -x; for strip in true eu-strip; do echo "int foo (char a, long b) {
return a + b; }" | gcc -c -g -o a.o -xc - && ld -r -o a a.o && $strip -f a.dbg
a && gdb -batch -ex "info functions" -q a; done)
+ for strip in true eu-strip
+ echo 'int foo (char a, long b) { return a + b; }'
+ gcc -c -g -o a.o -xc -
+ ld -r -o a a.o
+ true -f a.dbg a
+ gdb -batch -ex 'info functions' -q a
All defined functions:

File <stdin>:
int foo(char, long);
+ for strip in true eu-strip
+ echo 'int foo (char a, long b) { return a + b; }'
+ gcc -c -g -o a.o -xc -
+ ld -r -o a a.o
+ eu-strip -f a.dbg a
+ gdb -batch -ex 'info functions' -q a
All defined functions:
$

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-02-16 22:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-17  4:46 [Bug gdb/17988] New: batch mode wrong symbols in relocatable files with debug link msebor at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).