How to combine DebugFission with GNU build-id and debuginfod?
Nikhil <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <[email protected]> |
Hello, I am very confused by the lack of documentation on this. GDB/GCC support DebugFission (https://gcc.gnu.org/wiki/DebugFission) where much of the debug info is split into dwo files. These dwo files can be combined into a dwp file. Through trial and error, I've discovered that I can create a non-stripped ELF binary, along with fission enabled, to get an ELF binary that has some debug info (like the gdb index), and then create a DWP using the various DWOs from the object files making up the ELF binary. I have also discovered that I can then split up the binary into a debug-only component (hello.debug) and the stripped executable code. Assuming my stripped binary is called `hello` and has a build-id of `6f1c7b246abee01d61c1bc85cb2eed1f264ce4ba`, i can then do this. Have a folder `.build-id/6f` and put the hello.debug in there as `1c7b246abee01d61c1bc85cb2eed1f264ce4ba.debug`. I can then put the DWP as `hello.dwp` **next to the .debug file**. This allows gdb to find the symbols for `hello` in the DWP. However, I'm not able to find any documentation or support for automating this process via the debuginfod server. Is it possible to have both hello.dwp and hello.debug retrieved by via debuginfod? Alternatively, is it possible to somehow combine hello.dwp and hello.debug into a meaningful file, that gdb can then use via debuginfod? https://github.com/rust-lang/rust/issues/105991 is another place where someone has asked a similar question "I cannot use a DWP file on a symbol server, for example with debuginfod, because afaik the DWP file has no build ID." Thanks, Nikhil