- DBGKD_WAIT_STATE_CHANGE64 is used in KD protocol 5, not number 6 that we use. Proto...
[reactos.git] / reactos / lib / ppcmmu / gdblib.c
index 153d2e4..be50f55 100644 (file)
@@ -86,6 +86,8 @@
 
 #include "ppcmmu/mmu.h"
 
+#define GDB_SAVE_SIZE 0x66
+
 typedef struct _BREAKPOINT {
     int OldCode;
     int *Address;
@@ -137,7 +139,7 @@ inline void send(char *serport, char c) {
        /* Wait for Clear to Send */
     while( !(GetPhysByte((paddr_t)serport+LSR) & 0x20) ) sync();
 
-    SetPhysByte(serport+THR, c);
+    SetPhysByte((paddr_t)serport+THR, c);
     sync();
 }
 
@@ -313,7 +315,7 @@ void GotPacket()
     {
     case 'g':
         PacketStart();
-        for (i = 0; i < sizeof(*RegisterSaveArea) / sizeof(int); i++)
+        for (i = 0; i < GDB_SAVE_SIZE; i++)
         {
             PacketWriteHexNumber(((int *)RegisterSaveArea)[i], 8);
         }
@@ -410,7 +412,7 @@ int SerialInterrupt(int signal, ppc_trap_frame_t *tf)
             Continue = 0;
             PacketWriteSignal(3);
         }
-        else if (ch == '-' || ch == '+')
+        else if (ch == '+')
         {
             /* Nothing */
         }