github.com/swiftstack/proxyfs@v0.0.0-20201223034610-5434d919416e/cookbooks/proxyfs/files/default/home/unprivileged_user/.gdbinit (about) 1 # pick up standard settings 2 # 3 #python 4 #import os 5 #gdb.execute('source' + os.environ['SWIFT_DIR'] + '/qatt/scripts/gdbinit') 6 #end 7 8 # pick up go helpers 9 add-auto-load-safe-path /usr/local/go/src/runtime/runtime-gdb.py 10 11 # gdb debugging tips 12 # 13 # Some of this info came from: 14 # http://www.bonsai.com/wiki/howtos/debugging/gdb/ 15 # 16 # You can also define functions that add to what gdb can do. 17 # I didn't do any, but you can see some complex ones here: 18 # http://web.mit.edu/bzbarsky/www/gdbinit 19 # 20 # Some tips on using gdb with STL is from this useful gdb tip site: 21 # http://sourceware.org/gdb/wiki/STLSupport 22 # 23 # You can put the following commands in your ~/.gdbinit file 24 # to make gdb more tractable for debugging Picasso (with its 25 # many threads and fancy data structures). 26 # 27 # Any of these commands can also be entered from the gdb prompt 28 # to selectively enable or disable them 29 # 30 # (Note that `#' functions as a comment character only at the 31 # beginning of the line). 32 # 33 34 # don't print thread start/stop msgs 35 # 36 set print thread-events off 37 38 # pretty print structures 39 # (one field per line, indented to show nesting) 40 # 41 set print pretty on 42 43 # enable the Printing of C++ virtual function tables 44 # 45 set print vtbl on 46 47 # Set printing of C++ static members. 48 # 49 set print static-members off 50 51 # Set printing of object's derived type based on vtable info. 52 # 53 set print object on 54 55 # Set demangling of C++/ObjC names in disassembly listings. 56 # 57 set print asm-demangle on 58 59 # You can disable the gdb pager with this command 60 # (or set the number of lines to page) 61 # 62 # set height 0 63 set pagination off 64 65 # Log all gdb output to file "gdb.out". 66 # It is overwritten each time gdb starts. 67 # 68 # Enable "set logging redirect on" to send output only to the file. 69 # 70 set logging file ~/gdb.out 71 set logging overwrite on 72 set logging on 73 # set logging redirect on 74 75 # Set mode for locking scheduler during execution. 76 # off == no locking (threads may preempt at any time) 77 # on == full locking (no thread except the current thread may run) 78 # step == scheduler locked during every single-step operation. 79 # In this mode, no other thread may run during a step command. 80 # Other threads may run while stepping over a function call ('next'). 81 # 82 # This will generate a diagnostic if you don't specify a target file: 83 # /home/charmer/.gdbinit:71: Error in sourced command file: 84 # Target 'None' cannot support this command. 85 # 86 # set scheduler-locking step 87 88 # Capture backtraces from all threads: 89 # 90 # thread apply all bt 91 92 # Find the source line number of an assembly address 93 # 94 # info line * 0x2530526 95 96 # Run gdb using the "Text User Interface (TUI)" 97 # command line: gdb -tui ... 98 # gdb prompt: "C-x C-a" 99 # Documention on the TUI for gdb 7.2 can be found here: 100 # http://www.ecoscentric.com/ecospro/doc/html/gnutools/share/doc/gdb/index.html 101 # and on the TUI for gdb 7.4 here: 102 # http://sources.redhat.com/gdb/download/onlinedocs/gdb.html 103 # 104 # Once in the TUI you may prefer "single key mode" enabled with "C-x s". 105 # 106 # Emacs also as a "gdb mode" that runs gdb as a sub-shell with emacs 107 # editing available. It looks promising. 108 #