Skip to content

Instantly share code, notes, and snippets.

@parkercoates
Last active August 14, 2024 07:14
Show Gist options
  • Save parkercoates/548f047b7cebde87f315b76b8ddf083e to your computer and use it in GitHub Desktop.
Save parkercoates/548f047b7cebde87f315b76b8ddf083e to your computer and use it in GitHub Desktop.
GDB unable to load .dwo files
$ echo -e '#include <iostream>\nint main() { std::cout << "test\\n"; return 0; }' > main.cpp
$ g++ -fuse-ld=gold -gsplit-dwarf -Wl,--gdb-index main.cpp
$ ls
a.out main.cpp main.dwo
$ gdb a.out
GNU gdb (GDB) 8.2.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from a.out...done.
BFD: /home/coates/source/gdb-dwo-test/main.dwo: unable to initialize decompress status for section .debug_info.dwo
BFD: /home/coates/source/gdb-dwo-test/main.dwo: unable to initialize decompress status for section .debug_info.dwo
BFD: /home/coates/source/gdb-dwo-test/main.dwo: unable to initialize decompress status for section .debug_info.dwo
BFD: /home/coates/source/gdb-dwo-test/main.dwo: unable to initialize decompress status for section .debug_info.dwo
warning: Could not find DWO CU main.dwo(0x4665f77b086b112) referenced by CU at offset 0x0 [in module /home/coates/source/gdb-dwo-test/a.out]
(gdb) quit
$ g++ --version
g++ (GCC) 8.2.1 20181127
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment