This is the mail archive of the gdb-patches@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]

Re: [RFC] problem fetching inferior memory due to breakpoint


> 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?


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