This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [offbyone RFC] Merge i386newframe
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: GDB Patches <gdb-patches at sources dot redhat dot com>
- Date: Wed, 12 Mar 2003 17:42:24 -0500
- Subject: Re: [offbyone RFC] Merge i386newframe
- References: <3E6FAF64.7070304@suse.cz>
On Wed, Mar 12, 2003 at 11:06:28PM +0100, Michal Ludvig wrote:
> Hi Andrew,
> this patch is a merge of Mark's i386newframe-branch to your
> offbyone-branch. It works quite well, unwinds through signal frames and
> frameless functions, but still has some strange regressions that aren't
> present in i386newframe branch.
>
> For example this program:
> int var;
> void foo ()
> {
> var = 0x1234;
> }
> int main ()
> {
> foo ();
> return 0;
> }
>
> Running it in the GDB:
> (gdb) b main
> Breakpoint 1 at 0x804832c: file tst.c, line 8.
> (gdb) r
> Starting program: tst
>
> Breakpoint 1, main () at tst.c:8
> 8 foo ();
> (gdb) n
>
> Program exited normally.
> (gdb)
>
> Why it didn't stop on "return 0" but exitted immediately instead? Did
> you observe this behaviour in offbyone branch too, or is it caused by
> this patch? It seems to have something to do with symbols, linetables,
> ... but I can't see how it could be related to this patch. It doesn't
> matter if I compile the program with stabs or dwarf2 debug info. Ideas?
Hmm, what usually causes this for me is that the frame ID has changed
between two stops in main (the one where the user types next and
the one returning from foo).
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer