[NTOS:KD] A few trivial code improvements
[reactos.git] / ntoskrnl / kd / wrappers / gdbstub_powerpc.c
index a62bd9a..8a22354 100644 (file)
@@ -181,7 +181,7 @@ GdbGetChar(VOID)
 /* scan for the sequence $<data>#<Checksum>     */
 
 PCHAR
-GspGetPacket()
+GspGetPacket(VOID)
 {
     PCHAR Buffer = &GspInBuffer[0];
     CHAR Checksum;
@@ -1244,7 +1244,7 @@ GspUnloadBreakpoints(PKTRAP_FRAME TrapFrame)
 
 static BOOLEAN gdb_attached_yet = FALSE;
 /*
- * This function does all command procesing for interfacing to gdb.
+ * This function does all command processing for interfacing to gdb.
  */
 KD_CONTINUE_TYPE
 NTAPI
@@ -1295,7 +1295,7 @@ KdpGdbEnterDebuggerException(PEXCEPTION_RECORD ExceptionRecord,
         {
           LONG Esp;
 
-          stop_reply:
+stop_reply:
           /* reply to host that an exception has occurred */
           SigVal = GspComputeSignal(ExceptionRecord->ExceptionCode);
 
@@ -1342,13 +1342,16 @@ KdpGdbEnterDebuggerException(PEXCEPTION_RECORD ExceptionRecord,
           switch(*ptr++)
             {
             case '?':
+#if 1
               /* a little hack to send more complete status information */
               goto stop_reply;
+#else
               GspOutBuffer[0] = 'S';
               GspOutBuffer[1] = HexChars[SigVal >> 4];
               GspOutBuffer[2] = HexChars[SigVal % 16];
               GspOutBuffer[3] = 0;
               break;
+#endif
             case 'd':
               GspRemoteDebug = !GspRemoteDebug; /* toggle debug flag */
               break;
@@ -1525,13 +1528,11 @@ KdpGdbEnterDebuggerException(PEXCEPTION_RECORD ExceptionRecord,
                 ExReleaseFastMutex(&GspLock);
                 DPRINT("Thread %p leaving stub\n", PsGetCurrentThread());
                 return kdContinue;
-                break;
               }
 
             case 'k':  /* kill the program */
               strcpy(GspOutBuffer, "OK");
               break;
-              /* kill the program */
 
             case 'H': /* Set thread */
               GspSetThread(ptr);
@@ -1685,12 +1686,12 @@ KdpGdbStubInit(PKD_DISPATCH_TABLE WrapperTable,
         GspDbgThread = NULL;
         GspEnumThread = NULL;
 
-        HalDisplayString("Waiting for GDB to attach\n");
+        HalDisplayString("Waiting for GDB to attach\r\n");
         DbgBreakPointWithStatus(DBG_STATUS_CONTROL_C);
     }
     else if (BootPhase == 2)
     {
-        HalDisplayString("\n   GDB debugging enabled\n\n");
+        HalDisplayString("\r\n   GDB debugging enabled\r\n\r\n");
     }
 }