diff options
author | click <none@none> | 2010-09-19 18:11:03 +0200 |
---|---|---|
committer | click <none@none> | 2010-09-19 18:11:03 +0200 |
commit | 54212cf387662a3b3ca694b466368162b416bd42 (patch) | |
tree | f0dc35bfae31a7e79ecdeb557ba1ee5370020ab2 /contrib/debugger | |
parent | 907203fdd970ace312a05e99f28d67346d7937ce (diff) |
Contrib: Add example GDB backtrace generator script and a small readme on how to use it - Note: DO read the README file before using.
(Allows for semi-automated crashreporting on GDB/*nix-based platforms with proper information included).
--HG--
branch : trunk
Diffstat (limited to 'contrib/debugger')
-rw-r--r-- | contrib/debugger/README | 13 | ||||
-rw-r--r-- | contrib/debugger/crashreport.gdb | 16 |
2 files changed, 29 insertions, 0 deletions
diff --git a/contrib/debugger/README b/contrib/debugger/README new file mode 100644 index 00000000000..827607d6ec9 --- /dev/null +++ b/contrib/debugger/README @@ -0,0 +1,13 @@ +The included crashreport.gdb allows for semiautomated hunting of +crashes. The crashlog-file will be named backtrace.log and contains all +the commands required to partially automate a crashlog-creation with the +proper information. + +Usage: gdb -x crashreport.gdb <executable file> + +For creating an efficient backtrace, use -DCMAKE_BUILD_TYPE=Debug as a +parameter to CMake during configuration - this increases the filesize, +but includes all the needed information for a decent and efficient +crashreport. + +-- Good luck, and happy crashhunting. diff --git a/contrib/debugger/crashreport.gdb b/contrib/debugger/crashreport.gdb new file mode 100644 index 00000000000..ec3ffb3e9ab --- /dev/null +++ b/contrib/debugger/crashreport.gdb @@ -0,0 +1,16 @@ +set logging overwrite on +set logging file backtrace.log +handle SIG33 pass nostop noprint +set pagination 0 +run +set logging on +echo \n--- DEBUG: BACKTRACE FULL\n\n +backtrace full +echo \n--- DEBUG: INFO REGISTERS\n\n +info registers +echo \n--- DEBUG: CALLS (x/32i $pc)\n\n +x/32i $pc +echo \n--- DEBUG: THREAD APPLY ALL BACKTRACE\n +thread apply all backtrace +set logging off +quit |