Re: Seg Fault: Debugging Beginner
- From: Dimitar Haralanov <voidtrance comcast net>
- To: gtk-app-devel-list gnome org
- Subject: Re: Seg Fault: Debugging Beginner
- Date: Tue, 23 Dec 2003 10:06:00 -0800
On Sat, 20 Dec 2003 12:18:55 -0700
Michael Torrie <torriem chem byu edu> wrote:
To find the place in your code where it is segfaulting, compile your
program with a "-g" (both compile and link stage) parameter. Then use
a debugger like ddd or kdbg (comes with KDE), or even commandline gdb
and you can see the exact line of code where the problem is occurring.
You
can also use a debugger to step through your code to watch variables
and make sure they are right. Debuggers seem to be lost arts these
days, but I assure you learning a powerful debugging interface like
ddd is well worth your time.
Of course, this will only work if the problem is somewhere in your
code. If for some reason the crash occurs in one of the GTK functions
you will be out of luck unless you have compiled GTK with debugging
enabled.
As far as I can tell from my week long search, there are not debugging
libraries for GTK (unless you are running Debian)
--
Mitko Haralanov
voidtrance at comcast dot net
http://voidtrance.home.comcast.net
==========================================
"Remind me not to fix mtrr.c after half a litre of wine in future."
- Alan Cox
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]