Skip to content

Commit 66086a1

Browse files
committed
Merge 'Docs: improve debugging.md' from Benny Halevy
This series update debugging.md with: - add an example .gdbinit file - update recommendation for finding the relocatable packages using a build-id on http://backtrace.scylladb.com/ Closes scylladb#10492 * github.com:scylladb/scylla: docs: debugging.md: update instructions regarding backtrace.scylladb.com docs: debugging.md: add a sample gdbinit file
2 parents 855f126 + 4a40e34 commit 66086a1

File tree

2 files changed

+28
-2
lines changed

2 files changed

+28
-2
lines changed

docs/guides/debugging.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,9 @@ places. You can always load it by hand if GDB refuses or fails to load it:
149149

150150
(gdb) source /path/to/your/.gdbinit
151151

152+
Scylla provides the following [gdbinit](../../gdbinit) file helpful for debugging scylla
153+
at the root of the source tree.
154+
152155
#### TUI
153156

154157
GDB has a terminal based GUI called
@@ -324,13 +327,17 @@ Or from the executable like this:
324327
$ eu-unstrip -n --exec $executable
325328
326329
With the build-id you can find the relocatable using the
327-
[scylla-pkg.git/scripts/scylla-s3-reloc (private repo)](https://github.com/scylladb/scylla-pkg/#looking-for-a-build)
328-
script.
330+
http://backtrace.scylladb.com/index.html search form.
331+
The form can also be used to decode backtraces generated
332+
by the corresponding scylla binary.
329333
330334
**NOTE**: Use the normal relocatable package, usually called
331335
`scylla-package.tar.gz`, not not the debuginfo one usually called
332336
`scylla-debug-package.tar.gz`.
333337
338+
Build-id:s for all official releases are listed on
339+
http://backtrace.scylladb.com/releases.html.
340+
334341
##### Loading the core
335342
336343
Move the coredump and the unpackaged relocatable package into some dir

gdbinit

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Recommended .gdbinit for debugging scylla
2+
# See docs/guides/debugging.md for more information
3+
handle SIG34 pass noprint
4+
handle SIGUSR1 pass noprint
5+
set print pretty
6+
set python print-stack full
7+
set auto-load safe-path /opt/scylladb/libreloc
8+
add-auto-load-safe-path /lib64
9+
add-auto-load-safe-path /usr/lib64
10+
set debug libthread-db 1
11+
12+
# Register pretty-printer helpers for printing common
13+
# std-c++ stl containers.
14+
python
15+
import glob
16+
sys.path.insert(0, glob.glob('/usr/share/gcc-*/python')[0])
17+
from libstdcxx.v6.printers import register_libstdcxx_printers
18+
register_libstdcxx_printers (None)
19+
end

0 commit comments

Comments
 (0)