From: smith AT sztaki DOT hu (Jozsef Kovacs) Subject: GDB Attach command 5 Jun 1998 11:33:59 -0700 Message-ID: References: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII To: gnu-win32 AT cygnus DOT com Hi. In the next I show what gdb does when trying to attach a running process. This demo is very simple and even this case gdb can't attach to it. If I start it from gdb it works properly. /********************************************************************* bash-2.01$ gcc -g demo.c -o demo.exe bash-2.01$ gdb -nw -q (gdb) file demo.exe Reading symbols from demo.exe...done. ----> Starting demo.exe ----> Looking up PID in Task Manager (gdb) attach 63 Attaching to program `/demo/demo.exe', process 63 0x0 in ?? () ----> Program didn't even stop as shown in Task Manager !!??? (gdb) where #0 0x0 in ?? () ----> What can I do? (gdb) continue Continuing. error return /home/noer/src/97r2/devo/gdb/win32-nat.c:855 was 6 ----> And demo.exe is running forever, so let's kill it Program exited with code 0200400. (gdb) /****************************************************************** And the source file for demo.c: #include int main() { char buffer[20]; int i; for(;;) { /* Just for system call */ sprintf(buffer,"i: %i",i); } return; } /****************************************************** I've already tried attaching to different programs but gdb did not work at any of them. What to do? Thanks. - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".