This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: The gdb x86 function prologue parser
On Tue, Jun 14, 2005 at 12:34:55AM +0200, Mark Kettenis wrote:
> From: Jason Molenda <jmolenda@apple.com>
> Date: Mon, 13 Jun 2005 15:04:51 -0700
>
> Ah! Now it starts to make sense. I couldn't understand how this had
> been so untested. :)
>
> The one part I'm curious about -- does gdb get the CFI information
> out of gcc's eh_frame section or something? How do developers debug
> KDE/GNOME applications, where many functions on their stack are from
> optimized libraries that don't have any debug info (except maybe
> eh_frame)? It seems like these users should be tripping on these
> problems all the time.
>
> Yup. We prefer .debug_frame but if that's not available we suck in
> .eh_frame. So anything that's compiled with -fexceptions (wich
> implies all C++ code) basically has usable CFI.
> I sometimes wonder whether people are using gdb at all...
(me too)
> ...then I find it incredibly stupid that vendors of an Open Source
> operating system ship libraries without debugging information.
More and more vendors are shipping libraries with optional debugging
information. This is what objcopy --only-keep-debug was invented for.
For Debian, I also have a couple of hacks to ship unwind information
for some libraries we don't want to provide debug information for by
default (like glibc).
If you install libc6-dbg, backtraces will suddenly Work Better. No
other intervention required.
For the next release of Debian I hope we'll be using this feature even
more heavily.
--
Daniel Jacobowitz
CodeSourcery, LLC