public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/18065] New: GDB does not honor Debug Information File listed in gnu_debuglink
@ 2015-03-01 5:31 noloader at gmail dot com
2015-03-01 11:43 ` [Bug gdb/18065] " noloader at gmail dot com
2022-02-24 15:02 ` tromey at sourceware dot org
0 siblings, 2 replies; 3+ messages in thread
From: noloader at gmail dot com @ 2015-03-01 5:31 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=18065
Bug ID: 18065
Summary: GDB does not honor Debug Information File listed in
gnu_debuglink
Product: gdb
Version: 7.7
Status: NEW
Severity: normal
Priority: P2
Component: gdb
Assignee: unassigned at sourceware dot org
Reporter: noloader at gmail dot com
It appears GDB does not honor the debug information file name placed in
gnu_debuglink.
The digest is I have a library installed in /usr/local/lib, and I can't get GDB
to load its symbols that were placed in /usr/lib/debug.
The remainder are the symptoms I am seeing.
**********
I'm building the Crypto++ library. The library will be installed in
/usr/local/lib as libcryptopp.so.
After make'ing but before installing, I use objcopy and strip to create the two
part executable file - the stripped executable, and its debug information file.
The debug information file is named libcryptopp.so.debug. Here are the commands
used:
cd cryptopp
make static dynamic cryptest.exe
DEBUG_SYM_DIR=/usr/lib/debug
objcopy --only-keep-debug libcryptopp.so libcryptopp.so.debug
strip --strip-debug --strip-unneeded libcryptopp.so
sudo cp libcryptopp.so.debug $(DEBUG_SYM_DIR)/
objcopy --add-gnu-debuglink=$(DEBUG_SYM_DIR)/libcryptopp.so.debug
libcryptopp.so
According to objcopy(1), gnu_debuglink should include the full path
(https://sourceware.org/binutils/docs/binutils/objcopy.html):
--add-gnu-debuglink=path-to-file
Creates a .gnu_debuglink section which contains a reference to
path-to-file and adds it to the output file.
After performing make, objcopy, strip and install:
$ ls -l /usr/local/lib/libcryptopp.so
-rwxr-xr-x 1 root root 4837488 Feb 28 23:54 /usr/local/lib/libcryptopp.so
$ file /usr/local/lib/libcryptopp.so
/usr/local/lib/libcryptopp.so: ELF 64-bit LSB shared object, x86-64, version 1
(SYSV), dynamically linked,
BuildID[sha1]=94b358780db21ff9b02b44ac65214ec9b855f72b, stripped
$ file /usr/lib/debug/cryptopp/libcryptopp.so.debug
/usr/lib/debug/cryptopp/libcryptopp.so.debug: ELF 64-bit LSB shared object,
x86-64, version 1 (SYSV), dynamically linked,
BuildID[sha1]=94b358780db21ff9b02b44ac65214ec9b855f72b, not stripped
$ ls -l /usr/lib/debug/cryptopp/libcryptopp.so.debug
-rwxr-xr-x 1 root root 17757127 Mar 1 00:09
/usr/lib/debug/cryptopp/libcryptopp.so.debug
$ objdump -h /usr/local/lib/libcryptopp.so
...
27 .gnu_debuglink 0000001c 0000000000000000 0000000000000000 0049c7ac 2**0
CONTENTS, READONLY
I don't know how to ask objdump or readelf to print a section's details, so
about all I can do is dump strings (forgive my ignorance):
$ strings /usr/local/lib/libcryptopp.so | grep libcryptopp
libcryptopp.so.debug
When I attempt to load Crypto++:
(gdb) file /usr/local/lib/libcryptopp.so
Reading symbols from /usr/local/lib/libcryptopp.so...(no debugging symbols
found)...done.
$ gdb
GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
...
(gdb) file /usr/local/lib/libcryptopp.so
Reading symbols from /usr/local/lib/libcryptopp.so...(no debugging symbols
found)...done.
...
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug gdb/18065] GDB does not honor Debug Information File listed in gnu_debuglink
2015-03-01 5:31 [Bug gdb/18065] New: GDB does not honor Debug Information File listed in gnu_debuglink noloader at gmail dot com
@ 2015-03-01 11:43 ` noloader at gmail dot com
2022-02-24 15:02 ` tromey at sourceware dot org
1 sibling, 0 replies; 3+ messages in thread
From: noloader at gmail dot com @ 2015-03-01 11:43 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=18065
Jeffrey Walton <noloader at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |noloader at gmail dot com
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug gdb/18065] GDB does not honor Debug Information File listed in gnu_debuglink
2015-03-01 5:31 [Bug gdb/18065] New: GDB does not honor Debug Information File listed in gnu_debuglink noloader at gmail dot com
2015-03-01 11:43 ` [Bug gdb/18065] " noloader at gmail dot com
@ 2022-02-24 15:02 ` tromey at sourceware dot org
1 sibling, 0 replies; 3+ messages in thread
From: tromey at sourceware dot org @ 2022-02-24 15:02 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=18065
Tom Tromey <tromey at sourceware dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tromey at sourceware dot org
--- Comment #3 from Tom Tromey <tromey at sourceware dot org> ---
Probably the docs should be updated here to be more clear.
Strangely we don't have a documentation component.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-02-24 15:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-01 5:31 [Bug gdb/18065] New: GDB does not honor Debug Information File listed in gnu_debuglink noloader at gmail dot com
2015-03-01 11:43 ` [Bug gdb/18065] " noloader at gmail dot com
2022-02-24 15:02 ` tromey at sourceware dot org
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).