Changeset - c7bf6ca0a9b1
[Not reviewed]
0 1 0
vitalyster - 12 years ago 2013-05-30 21:43:58
vitalyster@gmail.com
Added GDB command to debug spectrum backend
1 file changed with 10 insertions and 0 deletions:
0 comments (0 inline, 0 general)
documentation/management/getting_backtrace.md
Show inline comments
 
@@ -42,24 +42,34 @@ This is harder method how to get backtrace and also running Spectrum in GDB brin
 

	
 
where "config_name" is name of config you have in /etc/spectrum (You can also specify full path to config instead of its name).
 

	
 
You will see something like this:
 

	
 
	GNU gdb (GDB) 7.0-ubuntu
 
	Copyright (C) 2009 Free Software Foundation, Inc.
 
	License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
 
	This is free software: you are free to change and redistribute it.
 
	There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
 
	and "show warranty" for details.
 
	This GDB was configured as "i486-linux-gnu".
 
	For bug reporting instructions, please see:
 
	<http://www.gnu.org/software/gdb/bugs/>...
 
	Reading symbols from /home/hanzz/code/test/transport/spectrum...done.
 
	(gdb)
 

	
 
Now you have to start Spectrum with following GDB command:
 

	
 
	run
 

	
 
Since now Spectrum is running and you have to reproduce the crash or just wait for crash. Then get a backtrace with this GDB command:
 

	
 
	bt full
 

	
 
If Spectrum crashed in backend, then you need following GDB command *before* starting Spectrum:
 
	
 
	set follow-fork-mode child
 

	
 
And then:
 

	
 
	run
 
	bt full
 
	
0 comments (0 inline, 0 general)