Changes between Version 30 and Version 31 of Debugging
- Timestamp:
- 12/12/13 08:35:10 (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Debugging
v30 v31 109 109 == GDB == 110 110 When dealing with crashes ("core dumped"), the best way to debug is to fire gdb. 111 === Getting a Backtrace === 111 === Attaching to an existing xpra process == 112 Find the pid of the xpra process: 112 113 {{{ 113 xpra start ...114 # or xpra attach ...115 114 ps -ef | grep xpra 115 }}} 116 Then: 117 {{{ 116 118 gdb python $PID_OF_XPRA_PROCESS_TO_DEBUG 117 119 # wait for it to load all the debug symbols 118 120 (gdb) continue 119 121 }}} 122 123 === Starting xpra in gdb === 124 {{{ 125 gdb python $PID_OF_XPRA_PROCESS_TO_DEBUG 126 run /usr/bin/xpra start ... 127 }}} 128 129 === Getting the backtrace === 120 130 Then once you get a crash, gdb should show you its prompt again and you can extract the python stacktrace with {{{py-bt}}} and the full stacktrace with {{{bt}}}. Having both is useful. 121 131 Note: installing the required "debug" symbol packages for your distribution is out of scope, please refer to your vendor's package manager for details (ie: [http://wiki.debian.org/HowToGetABacktrace debian] and [http://yum.baseurl.org/wiki/YumUtils/DebugInfoInstall yum debuginfo-install]).