This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Backtrace failed when program crashed due to abort call.


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]