* gdb won't stop at break point in simple program
@ 2006-02-10 5:22 Paul Hughes
2006-02-10 7:13 ` Jim Blandy
0 siblings, 1 reply; 4+ messages in thread
From: Paul Hughes @ 2006-02-10 5:22 UTC (permalink / raw)
To: gdb
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".
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: gdb won't stop at break point in simple program
2006-02-10 5:22 gdb won't stop at break point in simple program Paul Hughes
@ 2006-02-10 7:13 ` Jim Blandy
2006-02-11 0:54 ` Paul Hughes
0 siblings, 1 reply; 4+ messages in thread
From: Jim Blandy @ 2006-02-10 7:13 UTC (permalink / raw)
To: Paul Hughes; +Cc: gdb
On 2/9/06, Paul Hughes <paulh@ot.com.au> wrote:
> 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?
Wow. You're using the GDB and GCC included with your distribution?
I know the current GDB sources don't behave this way; the GDB test
suite does the equivalent of your test, and more, many, many times, so
there's no way we could have missed it.
I think there's something very strange going on on your machine.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: gdb won't stop at break point in simple program
2006-02-10 7:13 ` Jim Blandy
@ 2006-02-11 0:54 ` Paul Hughes
2006-02-11 5:27 ` Jim Blandy
0 siblings, 1 reply; 4+ messages in thread
From: Paul Hughes @ 2006-02-11 0:54 UTC (permalink / raw)
To: Jim Blandy; +Cc: gdb
On 10/02/2006, at 6:13 PM, Jim Blandy wrote:
>
> Wow. You're using the GDB and GCC included with your distribution?
>
Clean install of RHEL 4.2 with everything installed.
Tried another machine installed with RHEL 4.2 with workstation subset
of packages plus gcc & gdb works OK and doesn't print out
"Detaching after fork from child process XXXXX"
Will do a reinstall of the original machine on Monday with
limited set of packages and see if that fixes the problem.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: gdb won't stop at break point in simple program
2006-02-11 0:54 ` Paul Hughes
@ 2006-02-11 5:27 ` Jim Blandy
0 siblings, 0 replies; 4+ messages in thread
From: Jim Blandy @ 2006-02-11 5:27 UTC (permalink / raw)
To: Paul Hughes; +Cc: gdb
On 2/10/06, Paul Hughes <paulh@ot.com.au> wrote:
> Will do a reinstall of the original machine on Monday with
> limited set of packages and see if that fixes the problem.
Let me know how it goes.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-02-11 5:27 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-10 5:22 gdb won't stop at break point in simple program Paul Hughes
2006-02-10 7:13 ` Jim Blandy
2006-02-11 0:54 ` Paul Hughes
2006-02-11 5:27 ` Jim Blandy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox