This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
Re: backtrace/2024: backtrace fails when function ends with call to abort
- From: Daniel Jacobowitz <drow at false dot org>
- To: nobody at sources dot redhat dot com
- Cc: gdb-prs at sources dot redhat dot com,
- Date: 1 Nov 2005 23:38:01 -0000
- Subject: Re: backtrace/2024: backtrace fails when function ends with call to abort
- Reply-to: Daniel Jacobowitz <drow at false dot org>
The following reply was made to PR backtrace/2024; it has been noted by GNATS.
From: Daniel Jacobowitz <drow@false.org>
To: wilson@tuliptree.org
Cc: gdb-gnats@sources.redhat.com
Subject: Re: backtrace/2024: backtrace fails when function ends with call to abort
Date: Tue, 1 Nov 2005 18:32:52 -0500
On Tue, Nov 01, 2005 at 11:01:59PM -0000, wilson@tuliptree.org wrote:
> The backtrace is
> #0 0xffffe410 in __kernel_vsyscall ()
> #1 0x00afa118 in raise () from /lib/libc.so.6
> #2 0x00afb888 in abort () from /lib/libc.so.6
> #3 0x080483a5 in main (argc=Could not find the frame base for "main".) at test.c:4
> Gdb uses the return address to generate the backtrace of the caller.
> On x86, the return address is one byte past the end of the call
> instruction. In this case, this is 1 byte past the end of the
> function. So gdb is trying to find the frame base for an address
> outside the function, and is failing, because the location list
> emitted by gcc only covers addresses inside the function.
GDB already has a concept of "frame unwind address". This is probably
as simple as changing get_frame_pc to get_frame_address_in_block in
dwarf2loc.c, right before that error message is produced. Want to try
that?
--
Daniel Jacobowitz
CodeSourcery, LLC