Symbols in /usr/lib/debug aren't automatically loaded
See https://github.com/radare/radare2/issues/4888 for context.
Several linux systems split debug symbols from executables and installs them under /usr/lib/debug/ e.g. /usr/path/to/bin/cmd has symbols at /usr/lib/debug/usr/path/to/bin/cmd. radare2 1.6.0 doesn't appear to load these symbols. The symbols for calls are missing, attemping to seek, s, to a function fails, etc. On the other hand, gdb automatically loads the symbols from these files.
Also, ob /usr/lib/debug/usr/path/to/bin/cmd doesn't appear to manually load the symbols either.
Code from https://github.com/radare/radare2/blob/master/libr/core/linux_heap_glibc.c#L213 should be generalized for using anywhere in RBin.
same goes for jemalloc
On 9 Oct 2017, at 11:55, Anton Kochkov [email protected] wrote:
Code from https://github.com/radare/radare2/blob/master/libr/core/linux_heap_glibc.c#L213 https://github.com/radare/radare2/blob/master/libr/core/linux_heap_glibc.c#L213 should be generalized for using anywhere in RBin.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/radare/radare2/issues/8666#issuecomment-335112659, or mute the thread https://github.com/notifications/unsubscribe-auth/AA3-llQjNNx1umEoctrJh5SM4LFJ_A_Lks5sqe2OgaJpZM4Px_vA.
In the meantime, is there a workaround to manually load symbols in version 2.0.0?
o /usr/lib/debug/usr/path/to/bin/cmd doesn't work. After issuing the preceding command, there is no error output, no new files are listed by o, and no symbols appear to have been loaded.
@lucianposton I care too know as well. Did you find a solution?
.!rabin2 -r ....
But you can use the ob subcommands too
I care too know as well. Did you find a solution?
Nope. The ob command didn't load any symbols as far as I could tell.
I haven't yet tried the .!rabin2 -r ... suggestion above.
Ob by itself doesnt do anything. Check the help message
On 18 Oct 2017, at 03:41, lucianposton [email protected] wrote:
I care too know as well. Did you find a solution?
Nope. The ob command didn't load any symbols as far as I could tell.
I haven't yet tried the .!rabin2 -r ... suggestion above.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
oops. I meant to say o /usr/lib/debug/usr/path/to/bin/cmd didn't load the symbols, and ob, which is supposed to list opened files, did lis anything new after o.
Nope, o opens a binary, replacing the current one, so nope
Ob doesnt lists the opened files. It lists the bin objects and u can use it to load the bin info of that bin on top of the current opened file
Also, historically this has been done via .!rabin2... since the very first versions of r1.
Which distro are u using to have test this?
On 18 Oct 2017, at 17:52, lucianposton [email protected] wrote:
oops. I meant to say o /usr/lib/debug/usr/path/to/bin/cmd didn't load the symbol, and ob, which is supposed to list opened files, did lis anything new after o.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
related to the dmi issue
A workaround I've found is to recombine the executable and debug info into a single file.
Can be done with eu-unstrip from elfutils:
eu-unstrip /usr/bin/cmd /usr/lib/debug/usr/bin/cmd -o cmd.dbg