This is the mail archive of the
mailing list for the GDB project.
Re: Debugging glibc crashes with GDB
> Date: Sun, 11 Mar 2007 21:15:02 -0400
> From: Daniel Jacobowitz <firstname.lastname@example.org>
> On Sun, Mar 11, 2007 at 02:04:41PM -0400, Rich Rattanni wrote:
> > Below you will find the GDB output related to my question. My problem
> > is that when I try to debug a program after receiving a glibc abort
> > error (MALLOC_CHECK = 2) I cannot backtrace the program to find out
> > what piece of my application caused the problem. I can see the call
> > to raise and abort, but then I get the error message "Backtrace
> > stopped:
> > frame did not save the PC".
> I believe this is a known problem with the ARM port of GCC. What GCC
> version are you using to build glibc?
> It doesn't save the return address anywhere when it reaches abort;
> this is a somewhat limited value optimization.
It's a completely stupid optimization. The only reason to call
abort() is to make your program crash. And in almost any case you
want to look at the core dump afterwards.
Someone who cares enough about this should talk to the GCC and/or
glibc people to make sure backtraces through abort() work.