pan-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pan-users] Re: Debugging Pan with gdb


From: Duncan
Subject: [Pan-users] Re: Debugging Pan with gdb
Date: Tue, 22 Aug 2006 14:09:46 +0000 (UTC)
User-agent: pan 0.109 (Beable)

Douglas Bollinger <address@hidden> posted
address@hidden, excerpted below, on  Mon, 21 Aug 2006
18:01:18 -0400:

> Does having my entire system (and espcially the gtk libs) compiled with
> -fomit-frame-pointer pretty much render my system useless for debugging?

I don't claim to be a "coding guru" or debugger of any significant skill,
but here goes, as I understand it. =8^)

How -fomit-frame-pointer affects debugging is arch dependent.  For amd64
(my arch), I've been told -fomit-frame-pointer does not cause debugging
issues (in 64-bit code).  As a result, it's a default optimization enabled
by even first-level optimizations (-O, see the gcc manpage).

For x86 (and therefore for 32-bit x86 compatible code on amd64), omitting
the frame-pointer DOES affect debugging, but ONLY on the libraries and
executables where the flag is used.  (As a result it's not enabled by any
-O level and must be invoked directly, again, gcc manpage.)

Assuming you are on x86, then, compiling pan without -fomit-frame-pointer
should enable you to debug pan's own functions.  As soon as you hit the
gtk or other libraries (glibc certainly, gcc's libstdc++ also since pan
is now C++, other dependencies) compiled with -fomit-frame-pointer,
however, you'll be in black-box territory -- you won't be able to trace
into them.  Whether that kills debugging then depends on whether you can
get enough info from what /is/ frame-pointered to be useful troubleshooting
your particular problem, or not.

FWIW, the glibc and gcc/libstdc++ debugging may well not be worth it, given
the necessary time to remerge.  gtk+-2.* and related dependencies (pango,
glib, atk) don't take so much time to remerge, however, so you might
consider them, at least gtk.

Also note that depending on the issue, strace may be able to give you the
info you need.  It works differently, by tracing system calls and the
like, so is still useful with -fomit-frame-pointer, giving you stuff
like file and socket activity, etc.  I'll often use strace for such
admin-type tasks as figuring out exactly where an app is looking for it's
config file, for instance, altho often the output is overwhelming on its
own (those who've never run it often have no idea how many files an app
may stat and open if they exist at launch -- often hundreds -- one gains
a vastly greater appreciation for the benefits of in-memory disk cache!)
and must be grepped to reduce it to a human-admin manageable size.

-- 
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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]