Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Backtrace failed when program crashed due to abort call.
@ 2009-03-09  4:29 Santosh B R
  2009-03-09  8:04 ` Mark Kettenis
  0 siblings, 1 reply; 2+ messages in thread
From: Santosh B R @ 2009-03-09  4:29 UTC (permalink / raw)
  To: gdb


Hi All,
I think this is an existing bug in gdb wherein the backtrace fails to give
information, when a program is terminated by abort call.

Sample program:
[/home]# cat abort-dump.c
#include <stdio.h>
#include <stdlib.h>

void bar(void)
{
        printf("\n In bar: Calling abort");
        abort();
}

void foo(void)
{
        printf("\n In foo");
        bar();
}

main()
{
        printf("\n In main\n");
        foo();
}

Compilation:
# arm-none-linux-gnueabi-gcc -g -o abort-dump abort-dump.c

Backtrace Result:
Program terminated with signal 6, Aborted.
#0  0x4005bdc4 in raise () from /lib/libc.so.6
(gdb) bt
#0  0x4005bdc4 in raise () from /lib/libc.so.6
#1  0x4005d250 in abort () from /lib/libc.so.6
Backtrace stopped: frame did not save the PC

GDB version:
gdb-6.8

GCC version:
gcc version 4.2.1 (CodeSourcery Sourcery G++ Lite 2007q3-51)

Target: arm

The same program works fine in x86 architecture for the same gdb version.

Please give me some pointers to solve the above issue. I have already
browsed
the bugs related to the above issue in the database and have found no clear
solution.

Thank You all in advance.

Regards,
Santosh
-- 
View this message in context: http://www.nabble.com/Backtrace-failed-when-program-crashed-due-to-abort-call.-tp22407055p22407055.html
Sent from the Sourceware - gdb list mailing list archive at Nabble.com.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Backtrace failed when program crashed due to abort call.
  2009-03-09  4:29 Backtrace failed when program crashed due to abort call Santosh B R
@ 2009-03-09  8:04 ` Mark Kettenis
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Kettenis @ 2009-03-09  8:04 UTC (permalink / raw)
  To: santoshbr4; +Cc: gdb

> Date: Sun, 8 Mar 2009 21:29:30 -0700 (PDT)
> From: Santosh B R <santoshbr4@gmail.com>
> 
> Hi All,
> I think this is an existing bug in gdb wherein the backtrace fails to give
> information, when a program is terminated by abort call.

This is not a problem in GDB, but a problem with overzealous
optimization by GCC.  Please complain about this on the GCC lists.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-03-09  8:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-09  4:29 Backtrace failed when program crashed due to abort call Santosh B R
2009-03-09  8:04 ` Mark Kettenis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox