/
gdb_cmds.txt
31 lines (24 loc) · 992 Bytes
/
gdb_cmds.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
set pagination 0
set backtrace limit 50
# SpiderMonkey unwinder is disabled until issues with gdb are fixed
# https://hg.mozilla.org/integration/mozilla-inbound/rev/9861363aaea9
# https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/Hacking_Tips#Printing_the_JS_stack_%28from_gdb%29
# echo \n\nenable unwinder .* SpiderMonkey\n\n
# enable unwinder .* SpiderMonkey
# nbp mentioned over IRC to first run `backtrace 0` in order to work around a "gdb issue"
echo \n\nbacktrace 0\n\n
backtrace 0
# CrashSignature trips up with "thread apply all backtrace" for now.
echo \n\nbacktrace\n\n
backtrace
# Could use "info all-registers" but that spews lots of junk
echo \n\ninfo reg\n\n
info registers
echo \n\print $_siginfo\n\n
print $_siginfo
# Dump the disassembly of the crashing instruction and several following instructions.
# ($pc is an alias for $eip or $rip as needed)
echo \n\nx/8i $pc\n\n
x/8i $pc
echo \n\nthread apply all backtrace\n\n
thread apply all backtrace