Separate debug symbols
Mon, 11 Sep 2006 07:20:35 -0700
1) Strip can remove debug symbols, and write them to a separate file:3) gdb is ok with add-symbol-file on dynamic libraries before they have been loaded. If gdb would automatically look for the symbol files by some algorithm, that would be wonderful. The appeal of being able to ship a stripped version of my software and then being able to drop in the symbol files and start debugging, is almost too good to resist.
strip shared_debug_obj/app.exe -o app.exe
strip shared_debug_obj/app.exe --only-keep-debug -o app.dbg
strip shared_debug_obj/lib.dll -o lib.dll
strip shared_debug_obj/lib.dll --only-keep-debug -o lib.dbg
2) gdb can read the separate symbol files, but only if you tell it too: