This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug gdb/17917] New: gdbserver should lookup build-ids in the remote binaries
- From: "eseidel at google dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Mon, 02 Feb 2015 17:36:34 +0000
- Subject: [Bug gdb/17917] New: gdbserver should lookup build-ids in the remote binaries
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=17917
Bug ID: 17917
Summary: gdbserver should lookup build-ids in the remote
binaries
Product: gdb
Version: unknown
Status: NEW
Severity: normal
Priority: P2
Component: gdb
Assignee: unassigned at sourceware dot org
Reporter: eseidel at google dot com
gdbserver should lookup build-ids in the remote binaries
Right now gdbserver only sends the library_name back to gdb and gdb looks for
library_name in $PATH, etc. Only if it finds library_name on the local machine
*then* it begins the .build-id search using the build-id it found in the local
binary. In my application I don't always have a local binary (or have an easy
way to pull the binary from the remote), but I do have a .build-id tree full of
links to the symbold versions of all binarys on the remote. Having gdbserver
send the build-id to gdb would be useful.
Steps:
1. Build your program (and libraries) with build-ids enabled
gcc -Wlbuild-id -o my_library.so library.
2. Setup a .build-id directory tree:
https://sourceware.org/gdb/onlinedocs/gdb/Separate-Debug-Files.html
e.g.:
% readelf -n -e my_library.so
build-id: abcdef123456
mkdir -p .build-id/ab
ln -s my_libary_with_symbols.so .build-id/ab/cdef123456.debug
3. Launch under gdbserver on a remote system.
gdbserver :1234 my_program
4. Connect to remote system:
gdb my_program
(gdb) target remote 1.2.3.4:1234
5. Be sad that my_library has no symbols, even though you have a .build-id
directory for it.
--
You are receiving this mail because:
You are on the CC list for the bug.