This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
more on immediate_quit
- To: gdb at sourceware dot cygnus dot com
- Subject: more on immediate_quit
- From: jtc at redback dot com (J.T. Conklin)
- Date: 21 Aug 2000 16:01:46 -0700
- Reply-To: jtc at redback dot com
Rummaging through the GDB sources examining the use of immediate_quit,
I found another case --- this time in remote-mips.c --- where sets and
resets were unbalanced.
Am I safe in assuming that the below patch is what is intended?
--jtc
Index: remote-mips.c
===================================================================
RCS file: /cvs/src/src/gdb/remote-mips.c,v
retrieving revision 1.8
diff -c -r1.8 remote-mips.c
*** remote-mips.c 2000/08/03 08:41:23 1.8
--- remote-mips.c 2000/08/21 22:59:17
***************
*** 609,615 ****
char *p = string;
int c;
! immediate_quit = 1;
while (n > 0)
{
c = SERIAL_READCHAR (mips_desc, 2);
--- 609,615 ----
char *p = string;
int c;
! immediate_quit++;
while (n > 0)
{
c = SERIAL_READCHAR (mips_desc, 2);
***************
*** 618,623 ****
--- 618,624 ----
{
fprintf_unfiltered (gdb_stderr,
"Failed to read %d characters from target (TIMEOUT)\n", n);
+ immediate_quit--;
return 0;
}
***************
*** 625,630 ****
--- 626,632 ----
n--;
}
+ immediate_quit--;
return 1;
}
--
J.T. Conklin
RedBack Networks