elwinar / rcoredump

Remote indexation tools for coredump

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Non-static binaries

beorn- opened this issue · comments

Currently, when a binary crashes and is detected as C binary i have found a few issues :

  • *.so libs are not sent along with the binary
  • debugging symbols table are not sent too. usually they are available in separate files such as /usr/lib/debug/.build-id/59/b262a6710ac89c3b4e53cccd6387f4b56c7d0c.debug

Make next to impossible for the gdb instance to work. Especially when the rcoredumpd runs on FreeBSD and the crashing binary runs on a linux based system

GDB command to run (example): gdb ./run/store/executables/6cee5fd5cb624fd66a115f8ed58cff6ef4a70da0 -ex "set sysroot /no/such/file" -ex "set solib-search-path ./run/store/links/6cee5fd5cb624fd66a115f8ed58cff6ef4a70da0:/lib:/usr/lib" -ex "core ./run/store/cores/bt5ndcil19le1bns8t00"

The build id can be found in the .note.gnu.build-id section of an ELF file objdump -j .note.gnu.build-id -s /usr/bin/ls

To load debug files in GDB set debug-file-directory <directory>

TODO: change the copy & debug script for a script that download the full package of related files, ungzip it then run the debugger.