This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
No response for CTRL-C when remote debugging
- From: "Robert Bu" <robert dot bu at gmail dot com>
- To: gdb at sourceware dot org
- Date: Wed, 17 Dec 2008 10:06:42 +0800
- Subject: No response for CTRL-C when remote debugging
Hello,
There's a situation when GDB can not interrupt the program for remote
debugging even if CTRL-C is pressed.
If there is a tight loop, which has only a few setences. I set a watch
point to a variable, and the variable is written to in the loop.
Everytime, the variable is being written to, the program will stop, and
GDB will try to see if a different value has been written to the
variable. If the new value is the same as the old one, GDB will continue
the program. So the loop goes on. If I press CTRL-C in GDB console, GDB
can not send \003 to the remote target.
Is that GDB is busy handling remote protocol, so that it just misses the
CTRL-C input? Can we improve GDB for this case?
The tight loop can be
int a;
for(;;)
{
a = 2;
}
watchpoint is set as "watch a".
GDB can stop the program for a native debugging for such a case.
Thanks.
Robert