This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [PATCH] frv-tdep.c: Stop backtraces in entry func, not entry file
- From: Kevin Buettner <kevinb at redhat dot com>
- To: Andrew Cagney <cagney at gnu dot org>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Wed, 15 Oct 2003 17:07:07 -0700
- Subject: Re: [PATCH] frv-tdep.c: Stop backtraces in entry func, not entry file
- References: <1031014205135.ZM29586@localhost.localdomain> <3F8C70CE.5020504@gnu.org>
On Oct 14, 5:55pm, Andrew Cagney wrote:
> > An FR-V user reported being unable to see useful backtraces when
> > debugging functions inside the entry file. This patch fixes that
> > problem. I think there's a problem with inside_entry_func() itself,
> > but that's a separate issue. (If you are in the entry file,
> > backtraces don't stop at the entry func - they attempt to continue
> > beyond, but they do stop shortly thereafter.)
>
> What happens if that test is removed?
At the moment, the behavior is the same whether the test is there or
not. That is, things work as expected so long as your're in main()
or above. If you go below main(), then things break down. The
inside_entry_func() test ought to stop backtraces from going too
far, but for FR-V at least, it seems to be broken.
Here's an example of where things break down:
0x00010118 in _start ()
1: x/i $pc 0x10118 <_start+280>: call 0x11dc0 <exit>
(gdb) bt
#0 0x00010118 in _start ()
#1 0x00018ed4 in _write_r (ptr=0x0, fd=0, buf=0x0, cnt=5)
at /ocotillo2/devo-frv/frv-elf/bld/../../devo/newlib/libc/reent/writer.c:58
Previous frame inner to this frame (corrupt stack?)
Kevin