Rename win32_thread_info to windows_thread_info
[deliverable/binutils-gdb.git] / gdbserver / remote-utils.cc
index b8a8c6576f974b57264d1f6f8c18de79a5b72cb8..1c211e2572096eae4df94a37e22f54672f87f981 100644 (file)
@@ -710,7 +710,7 @@ putpkt_binary_1 (char *buf, int cnt, int is_notif)
 
       /* Check for an input interrupt while we're here.  */
       if (cc == '\003' && current_thread != NULL)
-       (*the_target->request_interrupt) ();
+       the_target->request_interrupt ();
     }
   while (cc != '+');
 
@@ -779,7 +779,7 @@ input_interrupt (int unused)
          return;
        }
 
-      (*the_target->request_interrupt) ();
+      the_target->request_interrupt ();
     }
 }
 
@@ -986,7 +986,7 @@ getpkt (char *buf)
             check for an input interrupt.  */
          if (c == '\003')
            {
-             (*the_target->request_interrupt) ();
+             the_target->request_interrupt ();
              continue;
            }
 
@@ -1076,7 +1076,7 @@ getpkt (char *buf)
     {
       /* Consume the interrupt character in the buffer.  */
       readchar ();
-      (*the_target->request_interrupt) ();
+      the_target->request_interrupt ();
     }
 
   return bp - buf;
@@ -1204,6 +1204,26 @@ prepare_resume_reply (char *buf, ptid_t ptid,
        else
          sprintf (buf, "T%02x", status->value.sig);
 
+       if (disable_packet_T)
+         {
+           /* This is a bit (OK, a lot) of a kludge, however, this isn't
+              really a user feature, but exists only so GDB can use the
+              gdbserver to test handling of the 'S' stop reply packet, so
+              we would rather this code be as simple as possible.
+
+              By this point we've started to build the 'T' stop packet,
+              and it should look like 'Txx....' where 'x' is a hex digit.
+              An 'S' stop packet always looks like 'Sxx', so all we do
+              here is convert the buffer from a T packet to an S packet
+              and the avoid adding any extra content by breaking out.  */
+           gdb_assert (*buf == 'T');
+           gdb_assert (isxdigit (*(buf + 1)));
+           gdb_assert (isxdigit (*(buf + 2)));
+           *buf = 'S';
+           *(buf + 3) = '\0';
+           break;
+         }
+
        buf += strlen (buf);
 
        saved_thread = current_thread;
@@ -1214,8 +1234,7 @@ prepare_resume_reply (char *buf, ptid_t ptid,
 
        regcache = get_thread_regcache (current_thread, 1);
 
-       if (the_target->stopped_by_watchpoint != NULL
-           && (*the_target->stopped_by_watchpoint) ())
+       if (the_target->stopped_by_watchpoint ())
          {
            CORE_ADDR addr;
            int i;
@@ -1223,7 +1242,7 @@ prepare_resume_reply (char *buf, ptid_t ptid,
            memcpy (buf, "watch:", 6);
            buf += 6;
 
-           addr = (*the_target->stopped_data_address) ();
+           addr = the_target->stopped_data_address ();
 
            /* Convert each byte of the address into two hexadecimal
               chars.  Note that we take sizeof (void *) instead of
This page took 0.024117 seconds and 4 git commands to generate.