This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

more on immediate_quit


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]