Subject: Weird problem with gdb on -current/i386: where did my breakpoint go?
To: None <current-users@NetBSD.org>
From: Stephan Thesing <thesing@gmx.de>
List: current-users
Date: 12/02/2007 16:16:48
Hello,

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

E.g., the trivial program:
#include <stdio.h>

int
main(int argc, char **argv)
{
 printf("Hello World!\n");
 return 0;
}



Compiled on -current as of yesterday (4.99.38) with
gcc -o yy yy.c -g


doesn't really lend itself to debugging:

+>gdb yy
+GNU gdb 6.5
+Copyright (C) 2006 Free Software Foundation, Inc.
....
+This GDB was configured as "i386--netbsdelf"...
+(gdb) break main
+Breakpoint 1 at 0x8048739: file yy.c, line 7.
+(gdb) info breakpoints
+Num Type           Disp Enb Address    What
+1   breakpoint     keep y   0x08048739 in main at yy.c:7
+(gdb) run
+Starting program: /local/usr/home/thesing/yy
+Hello World!
+
+Program exited normally.
+You can't do that without a process to debug.
+(gdb)


Why doesn't it stop on my breakpoint?

This also doesn't seem to work for any other program, either compiled
under previous versions of NetBSD or -current.

Has anybody else observed this, or is it just me ?


Best regards....
    Stephan


-- 
Dr.-Ing. Stephan Thesing
Ernst-von-Harnack-Str. 18
65197 Wiesbaden
GERMANY

GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail