buf[0] = 'T'; if (th < 0) sprintf (&buf[1], "-%x", -th);
if (tid < 0) sprintf (buf, "T-%08x", -tid);
remote_thread_alive (th)     int th;{  char buf[PBUFSIZ];  buf[0] = 'T';  if (th < 0)    sprintf (&buf[1], "-%x", -th);  else    sprintf (&buf[1], "%x", th);  putpkt (buf);  getpkt (buf, 0);  return (buf[0] == 'O' && buf[1] == 'K');}