This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] problem fetching inferior memory due to breakpoint
- From: Eli Zaretskii <eliz at gnu dot org>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Thu, 27 Apr 2006 23:28:27 +0300
- Subject: Re: [RFC] problem fetching inferior memory due to breakpoint
- References: <20060426190517.GA930@adacore.com>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> Date: Wed, 26 Apr 2006 12:05:17 -0700
> From: Joel Brobecker <brobecker@adacore.com>
>
> Break at the first instruction of hello(), and then do a couple of
> stepi's:
>
> (gdb) b *hello
> Breakpoint 1 at 0x401050: file foo.c, line 5.
> (gdb) run
> Starting program: /[...]/foo.exe
>
> Breakpoint 1, hello () at foo.c:5
> 5 {
> (gdb) stepi
> 0x00401051 5 {
> (gdb) bt
> #0 0x00401051 in hello () at foo.c:5
> #1 0x00401093 in main () at foo.c:12
> (gdb) stepi
> 0x00401053 in hello () at foo.c:5
> 5 {
>
> So we're at the third instruction of the function. Here is the backtrace
> we get when I request it:
>
> (gdb) bt
> #0 0x00401053 in hello () at foo.c:5
> #1 0x0022ee88 in ?? ()
> #2 0x00401093 in main () at foo.c:12
>
> We get an extra frame between hello() and main().
I cannot reproduce this with a MinGW-compiled program, using GDB 6.3
and 6.3.50.20051116-cvs. What version of GDB are you using? Is this
problem visible only in a recent codebase?