Hi Guys,

I am stuck with a problem using gdb on my machine which runs Linux through vncserver. On some other machine, it works OK. When i type "run" on gdb prompt, 1) it doesn't stop at the breakpoint 2) It keeps on displaying "Detaching after fork from child process " message. After that, if i press "Ctrl+c", it again comes back to gdb prompt, but doesnt break at the breakpoint.

Here is what i tried -->>


================================================== =====

[mohitd ]/ home/mohitd > cat testapp.c
#include<stdio.h>

int main()
{
int x =0;
int *y;
printf(" Test Application Starts here \n");
return 1;
}
[mohitd ] / home/mohitd > gcc -g testapp.c -o test
[mohitd ]/ home/mohitd > ./test
Test Application Starts here
[mohitd ]/ home/mohitd > gdb ./test
GNU gdb Red Hat Linux (6 . 3 . 0 .0 - 1.1 5 3 .e l 4 r h)
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 "x86_64-redhat-linux-gnu"...Using host libthread_db library "/lib64/tls/libthread_db.so.1".

(gdb) break main
Breakpoint 1 at 0x4004b0: file testapp.c, line 5.
(gdb) run
Starting program: /home/mohitd/test
Detaching after fork from child process 6316.
Detaching after fork from child process 6318.
Detaching after fork from child process 6320.
Detaching after fork from child process 6322.
Detaching after fork from child process 6324.
Detaching after fork from child process 6325.
Detaching after fork from child process 6326.
Detaching after fork from child process 6327.
Detaching after fork from child process 6328.
Detaching after fork from child process 6329.
Detaching after fork from child process 6331.
Detaching after fork from child process 6333.
Detaching after fork from child process 6334.
[mohitd]/home/mohitd >
Detaching after fork from child process 6341.
Detaching after fork from child process 6342.
[mohitd ]/ home/mohitd >

----------------------------------------------------------------------------------------------------


Can anybody please help me with this.

Thanks & Regards,
Mohit Dhingra