aMule Forum

English => Multiplatform => Mac OSX => Topic started by: lionel77 on October 12, 2005, 03:00:26 AM

Title: How to post a useful Backtrace
Post by: lionel77 on October 12, 2005, 03:00:26 AM
You experience occasional crashes with aMule and would like to help us fix them? Then this thread is for you. :)

The following instructions will tell you how to generate a so-called backtrace in the case of a crash. These backtraces will allow us to identify the nature of the crash and fix its underlying cause. The instructions are relatively detailed so that even less tech-savvy Mac users should have no problems following them.


(1) Install/Update the Developer Tools
First, make sure that you have the most recent version of Apple's Developer Tools installed. You can download them from the Apple Developer page (http://developer.apple.com/), after you have created a free ADC account (if you don't have one already).
Go to "Downloads" -> "Developer Tools".
Panther users: Please download and install "Xcode Tools v1.5" and the "November 2004 GCC 3.3 Updater" (in this order).
Tiger users: Please download and install "Xcode Tools 2.1".


(2) Create the .gdbinit file
Eventually, we will run aMule through the gdb debugger. In this step we create an (invisible) .gdbinit file in your home folder that prevents gdb to stop at certain non-critical events. This file has to be created only once.
echo "handle SIGPIPE nostop noprint pass" > ~/.gdbinit
echo "handle SIG32 nostop noprint pass" >> ~/.gdbinit
[/list]

(3) Get an aMule version that contains debug information
The easiest way is to grab one of my builds from this thread (http://forum.amule.org/thread.php?threadid=5051&sid=). Just make sure you are downloading the debug version.
If you are an advanced user and prefer to compile aMule yourself, make sure you compile wxWidgets with "--enable-debug" & "--enable-debug_gdb" and aMule with "--enable-debug".


(4) Run aMule through the gdb debugger
Now comes the interesting part, we are going to run aMule in the debug environment. If aMule is still running please quit it now. Then:

gdb will start up, load some symbols, and then present the prompt "(gdb) ".

aMule will then start as if you had just double-clicked it in the Finder, but in addition it will also spit out some more information in the Terminal window.
Congratulations, you now have all the information you need to report a useful backtrace on the aMule forum.


(5) Reporting the backtrace on the forum
There is a dedicated "Backtraces" sub-forum on the aMule forum, this is where you usually want to post your backtraces.
That's it -- you just posted your first backtrace. :)