Subject: Re: Weird problem with gdb on -current/i386: where did my breakpoint go?
To: Stephan Thesing <thesing@gmx.de>
From: Andrew Doran <ad@netbsd.org>
List: current-users
Date: 12/02/2007 16:02:47
On Sun, Dec 02, 2007 at 04:16:48PM +0100, Stephan Thesing wrote:

> I have a strange problem with gdb under i386: It doesn't honor any breakpoints set while debugging.

Works for me:

$ gdb ./test
GNU gdb 6.5
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386--netbsdelf"...
(gdb) break main
Breakpoint 1 at 0x8048689: file ./test.c, line 8.
(gdb) run
Starting program: /local/home/ad/test

Breakpoint 1, main () at ./test.c:8
8               func();

$ cat test.c
func()
{
        volatile int a;
        a = 0;
}
main()
{
        func();
}

What machine are you running on?

Thanks,
Andrew