Difference between revisions of "Stack Trace"

From GnuCash
Jump to: navigation, search
(How to obtain a Stack Trace)
Line 1: Line 1:
 
= What is a Stack Trace? =
 
= What is a Stack Trace? =
 
 
If GnuCash terminates abnormally (i. e. it crashes), then a ''stack trace'' is a very helpful information for the developers to figure out the program error that caused this crash.
 
If GnuCash terminates abnormally (i. e. it crashes), then a ''stack trace'' is a very helpful information for the developers to figure out the program error that caused this crash.
  
 
== How to obtain a Stack Trace ==
 
== How to obtain a Stack Trace ==
 
Other explanations on how to obtain stack traces:
 
* http://live.gnome.org/GettingTraces
 
* http://www.dirac.org/linux/gdb/06-Debugging_A_Running_Process.php
 
* (in German) http://www.linuxwiki.de/gdb
 
  
 
=== Attach gdb to running process ===
 
=== Attach gdb to running process ===
 
 
The program "gnucash" itself is not an executable but a script. Therefore it cannot be called directly by the ''gdb'' debugger. We propose to "attach" the gdb to the running gnucash process instead.  
 
The program "gnucash" itself is not an executable but a script. Therefore it cannot be called directly by the ''gdb'' debugger. We propose to "attach" the gdb to the running gnucash process instead.  
  
Line 24: Line 17:
  
 
Please submit the backtrace together with the instructions on how to reproduce this crash as a new bug report into [[Bugzilla]]. Thank you for your contribution.
 
Please submit the backtrace together with the instructions on how to reproduce this crash as a new bug report into [[Bugzilla]]. Thank you for your contribution.
 +
 +
=== See also ===
 +
Other explanations on how to obtain stack traces:
 +
* http://live.gnome.org/GettingTraces
 +
* http://www.dirac.org/linux/gdb/06-Debugging_A_Running_Process.php
 +
* (in German) http://www.linuxwiki.de/gdb

Revision as of 10:29, 24 January 2006

What is a Stack Trace?

If GnuCash terminates abnormally (i. e. it crashes), then a stack trace is a very helpful information for the developers to figure out the program error that caused this crash.

How to obtain a Stack Trace

Attach gdb to running process

The program "gnucash" itself is not an executable but a script. Therefore it cannot be called directly by the gdb debugger. We propose to "attach" the gdb to the running gnucash process instead.

To attach to the running gnucash process:

  1. Start gnucash normally
  2. Use "ps afx" to find out the process number (PID) of the running gnucash process; it might be called "gnucash" or "guile", I'm not sure. Say the PID is 12345.
  3. Start gdb by typing "gdb"
  4. Attach to the running process by typing "attach 12345"; gdb will temporarily stop the program
  5. Continue program execution by typing "continue" at the gdb prompt
  6. Provoke the crash; type "backtrace" or shorthand "bt" at the gdb prompt.

Please submit the backtrace together with the instructions on how to reproduce this crash as a new bug report into Bugzilla. Thank you for your contribution.

See also

Other explanations on how to obtain stack traces: