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

gdb won't stop at break point in simple program


I've just written the simplest program I could.
I set a break point in main and run the program.
Gdb prints out some odd messages
"Detaching after fork from child process XXXXX"
Program ends without stopping at the break point.
Can anyone shed any light on what is going on here?
Thanks
Paul

paulh@b4> cat simple.c
int main()
{
  return 1;
}

paulh@b4> gcc -g simple.c

paulh@b4> gdb a.out
GNU gdb Red Hat Linux (6.3.0.0-1.63rh)
Copyright 2004 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-redhat-linux-gnu"...Using host libthread_db library "/lib/tls/libthread_db.so.1".


(gdb) break main
Breakpoint 1 at 0x8048350: file simple.c, line 3.
(gdb) run
Starting program: /home/users/paulh/a.out
Detaching after fork from child process 20267.
Detaching after fork from child process 20268.
Detaching after fork from child process 20269.
Detaching after fork from child process 20270.
Detaching after fork from child process 20288.
Detaching after fork from child process 20289.

Program exited with code 01.
(gdb) quit

paulh@b4> uname -a
Linux b4 2.6.9-22.EL #1 Mon Sep 19 18:20:28 EDT 2005 i686 i686 i386 GNU/Linux


paulh@b4> gcc -v
Reading specs from /usr/lib/gcc/i386-redhat-linux/3.4.4/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-java-awt=gtk --host=i386-redhat-linux
Thread model: posix
gcc version 3.4.4 20050721 (Red Hat 3.4.4-2)


paulh@b4> gdb -v
GNU gdb Red Hat Linux (6.3.0.0-1.63rh)
Copyright 2004 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-redhat-linux-gnu".




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