remoteWriteWatch(p);
remoteWriteWatch(p,1);
void remoteStubMain(){  if(!debugger)    return;  if(remoteResumed) {    remoteSendStatus();    remoteResumed = false;  }    while(1) {    char buffer[1024];    int res = remoteRecvFnc(buffer, 1024);        if(res == -1) {      fprintf(stderr, "GDB connection lost\n");#ifdef SDL      dbgMain = debuggerMain;      dbgSignal = debuggerSignal;#endif      debugger = false;      break;    }    //    fprintf(stderr, "Received %s\n", buffer);    char *p = buffer;    char c = *p++;    char pp = '+';    remoteSendFnc(&pp, 1);    if(c != '$')      continue;    c= *p++;    switch(c) {    case '?':      remoteSendSignal();      break;    case 'D':      remotePutPacket("OK");#ifdef SDL      dbgMain = debuggerMain;      dbgSignal = debuggerSignal;#endif      remoteResumed = true;      debugger = false;      return;    case 'e':      remoteStepOverRange(p);      break;    case 'k':      remotePutPacket("OK");#ifdef SDL      dbgMain = debuggerMain;      dbgSignal = debuggerSignal;#endif      debugger = false;      emulating = false;      return;    case 'C':      remoteResumed = true;      debugger = false;      return;    case 'c':      remoteResumed = true;      debugger = false;      return;    case 's':      remoteResumed = true;      remoteSignal = 5;      CPULoop(1);      if(remoteResumed) {        remoteResumed = false;        remoteSendStatus();      }      break;    case 'g':      remoteReadRegisters(p);      break;    case 'P':      remoteWriteRegister(p);      break;    case 'M':      remoteMemoryWrite(p);      break;    case 'm':      remoteMemoryRead(p);      break;    case 'X':      remoteBinaryWrite(p);      break;    case 'H':      remotePutPacket("OK");      break;    case 'q':      remotePutPacket("");      break;    case 'Z':      if(*p++ == '2') {        remoteWriteWatch(p);      } else        remotePutPacket("");      break;    default:      {        *(strchr(p, '#') + 3) = 0;              fprintf(stderr, "Unknown packet %s\n", --p);        remotePutPacket("");      }      break;    }  }    }