/* Check for an input interrupt while we're here. */
if (cc == '\003' && current_thread != NULL)
- the_target->pt->request_interrupt ();
+ the_target->request_interrupt ();
}
while (cc != '+');
return;
}
- the_target->pt->request_interrupt ();
+ the_target->request_interrupt ();
}
}
check for an input interrupt. */
if (c == '\003')
{
- the_target->pt->request_interrupt ();
+ the_target->request_interrupt ();
continue;
}
{
/* Consume the interrupt character in the buffer. */
readchar ();
- the_target->pt->request_interrupt ();
+ the_target->request_interrupt ();
}
return bp - buf;
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;
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;
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