docs: debugging.md: add a sample gdbinit file

This gdbinit contains recommended settings
commonly useful for debugging scylla core dumps.

Signed-off-by: Benny Halevy <bhalevy@scylladb.com>
This commit is contained in:
Benny Halevy
2022-05-05 16:07:29 +03:00
parent 2c39c4c284
commit 97b002e13e
2 changed files with 22 additions and 0 deletions

View File

@@ -149,6 +149,9 @@ places. You can always load it by hand if GDB refuses or fails to load it:
(gdb) source /path/to/your/.gdbinit
Scylla provides the following [gdbinit](../../gdbinit) file helpful for debugging scylla
at the root of the source tree.
#### TUI
GDB has a terminal based GUI called

19
gdbinit Normal file
View File

@@ -0,0 +1,19 @@
# Recommended .gdbinit for debugging scylla
# See docs/guides/debugging.md for more information
handle SIG34 pass noprint
handle SIGUSR1 pass noprint
set print pretty
set python print-stack full
set auto-load safe-path /opt/scylladb/libreloc
add-auto-load-safe-path /lib64
add-auto-load-safe-path /usr/lib64
set debug libthread-db 1
# Register pretty-printer helpers for printing common
# std-c++ stl containers.
python
import glob
sys.path.insert(0, glob.glob('/usr/share/gcc-*/python')[0])
from libstdcxx.v6.printers import register_libstdcxx_printers
register_libstdcxx_printers (None)
end