David Shochat <[EMAIL PROTECTED]> posted
[EMAIL PROTECTED], excerpted below, on  Mon, 03 Jul 2006
19:24:23 -0400:

> Since I need to report a crash, I need to get a gdb stack trace. That
> means I need to compile with debug (with symbols). How do I do that?

>From the gcc manpage:

-g  Produce debugging information in the operating system's native format
(stabs, COFF, XCOFF, or DWARF 2).  GDB can work with this debugging
information.

So add -g to your CFLAGS.  (Set CFLAGS="-g" plus whatever other CFLAGS you
use before compiling.)  Note that various optimizations can make debugging
difficult, of course.  See the manpage for additional -g<otherstuff> flags.

Finally (and in general), note that symbols may be stripped by the
build/make script. I'm not sure if pan's does or not, but at the
./configure step, you can try ./configure --help and see what it spits
out.  It's  likely you can add a debug option there that will take care of
the gcc -g as well as any stripping.



-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman



_______________________________________________
Pan-users mailing list
Pan-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/pan-users

Reply via email to