mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 18:15:11 +00:00
Fix tab/space mess
svn path=/trunk/; revision=18443
This commit is contained in:
parent
cce498f665
commit
a7f76e510d
1 changed files with 205 additions and 226 deletions
|
@ -240,17 +240,6 @@ GspGetPacket()
|
|||
{
|
||||
GdbPutChar ('+'); /* successful transfer */
|
||||
|
||||
#if 0
|
||||
/* if a sequence char is present, reply the sequence ID */
|
||||
if (Buffer[2] == ':')
|
||||
{
|
||||
GdbPutChar (Buffer[0]);
|
||||
GdbPutChar (Buffer[1]);
|
||||
|
||||
return &Buffer[3];
|
||||
}
|
||||
#endif
|
||||
|
||||
return &Buffer[0];
|
||||
}
|
||||
}
|
||||
|
@ -425,37 +414,33 @@ GspComputeSignal (NTSTATUS ExceptionCode)
|
|||
switch (ExceptionCode)
|
||||
{
|
||||
case STATUS_INTEGER_DIVIDE_BY_ZERO:
|
||||
SigVal = 8;
|
||||
break; /* divide by zero */
|
||||
SigVal = 8; /* divide by zero */
|
||||
break;
|
||||
case STATUS_SINGLE_STEP:
|
||||
/* debug exception */
|
||||
case STATUS_BREAKPOINT:
|
||||
SigVal = 5;
|
||||
break; /* breakpoint */
|
||||
SigVal = 5; /* breakpoint */
|
||||
break;
|
||||
case STATUS_INTEGER_OVERFLOW:
|
||||
/* into instruction (overflow) */
|
||||
case STATUS_ARRAY_BOUNDS_EXCEEDED:
|
||||
SigVal = 16;
|
||||
break; /* bound instruction */
|
||||
SigVal = 16; /* bound instruction */
|
||||
break;
|
||||
case STATUS_ILLEGAL_INSTRUCTION:
|
||||
SigVal = 4;
|
||||
break; /* Invalid opcode */
|
||||
SigVal = 4; /* Invalid opcode */
|
||||
break;
|
||||
#if 0
|
||||
case STATUS_FLT_INVALID_OPERATION:
|
||||
SigVal = 8;
|
||||
break; /* coprocessor not available */
|
||||
break;
|
||||
#endif
|
||||
case STATUS_STACK_OVERFLOW:
|
||||
/* stack exception */
|
||||
case STATUS_DATATYPE_MISALIGNMENT:
|
||||
/* page fault */
|
||||
case STATUS_ACCESS_VIOLATION:
|
||||
SigVal = 11; /* access violation */
|
||||
break;
|
||||
default:
|
||||
SigVal = 7; /* "software generated" */
|
||||
}
|
||||
return (SigVal);
|
||||
return SigVal;
|
||||
}
|
||||
|
||||
|
||||
|
@ -481,7 +466,9 @@ GspHex2Long (PCHAR *Address,
|
|||
NumChars++;
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
(*Address)++;
|
||||
}
|
||||
|
@ -650,7 +637,7 @@ GspSetThread(PCHAR Request)
|
|||
switch (Request[0])
|
||||
{
|
||||
case 'c': /* Run thread */
|
||||
if (GspFindThread (ptr, &ThreadInfo))
|
||||
if (GspFindThread(ptr, &ThreadInfo))
|
||||
{
|
||||
GspOutBuffer[0] = 'O';
|
||||
GspOutBuffer[1] = 'K';
|
||||
|
@ -676,7 +663,10 @@ GspSetThread(PCHAR Request)
|
|||
GspOutBuffer[0] = 'O';
|
||||
GspOutBuffer[1] = 'K';
|
||||
|
||||
if(GspDbgThread) ObDereferenceObject(GspDbgThread);
|
||||
if (GspDbgThread)
|
||||
{
|
||||
ObDereferenceObject(GspDbgThread);
|
||||
}
|
||||
|
||||
GspDbgThread = ThreadInfo;
|
||||
}
|
||||
|
@ -920,13 +910,15 @@ GspCorrectHwBreakpoint()
|
|||
for (BreakpointNumber = 0; BreakpointNumber < 3; BreakpointNumber++)
|
||||
{
|
||||
Bit = 2 << (BreakpointNumber << 1);
|
||||
if (!(dr7_ & Bit) && GspBreakpoints[BreakpointNumber].Enabled) {
|
||||
if (!(dr7_ & Bit) && GspBreakpoints[BreakpointNumber].Enabled)
|
||||
{
|
||||
CorrectIt = TRUE;
|
||||
dr7_ |= Bit;
|
||||
dr7_ &= ~(0xf0000 << (BreakpointNumber << 2));
|
||||
dr7_ |= (((GspBreakpoints[BreakpointNumber].Length << 2) |
|
||||
GspBreakpoints[BreakpointNumber].Type) << 16) << (BreakpointNumber << 2);
|
||||
switch (BreakpointNumber) {
|
||||
switch (BreakpointNumber)
|
||||
{
|
||||
#if defined(__GNUC__)
|
||||
case 0:
|
||||
asm volatile ("movl %0, %%dr0\n"
|
||||
|
@ -1080,7 +1072,8 @@ KdpGdbEnterDebuggerException(PEXCEPTION_RECORD ExceptionRecord,
|
|||
|
||||
/* ugly hack to avoid attempting to send status at the very
|
||||
* beginning, right when GDB is trying to query the stub */
|
||||
if (gdb_attached_yet) {
|
||||
if (gdb_attached_yet)
|
||||
{
|
||||
LONG Esp;
|
||||
|
||||
stop_reply:
|
||||
|
@ -1113,7 +1106,9 @@ KdpGdbEnterDebuggerException(PEXCEPTION_RECORD ExceptionRecord,
|
|||
*ptr = '\0';
|
||||
|
||||
GspPutPacket (&GspOutBuffer[0]);
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
gdb_attached_yet = 1;
|
||||
}
|
||||
|
||||
|
@ -1351,7 +1346,7 @@ KdpGdbEnterDebuggerException(PEXCEPTION_RECORD ExceptionRecord,
|
|||
|
||||
default:
|
||||
break;
|
||||
} /* switch */
|
||||
}
|
||||
|
||||
/* reply to the request */
|
||||
GspPutPacket (&GspOutBuffer[0]);
|
||||
|
@ -1411,24 +1406,8 @@ VOID
|
|||
STDCALL
|
||||
KdpGdbDebugPrint(PCH Message, ULONG Length)
|
||||
{
|
||||
#if 0
|
||||
/* This can be quite annoying! */
|
||||
if (GspInitialized)
|
||||
{
|
||||
ULONG Length;
|
||||
|
||||
GspOutBuffer[0] = 'O';
|
||||
GspOutBuffer[1] = '\0';
|
||||
strcat (&GspOutBuffer[0], Message);
|
||||
Length = strlen (Message);
|
||||
GspOutBuffer[2 + Length] = '\n';
|
||||
GspOutBuffer[3 + Length] = '\0';
|
||||
GspPutPacketNoWait (&GspOutBuffer[0]);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
extern LIST_ENTRY ModuleListHead;
|
||||
|
||||
VOID
|
||||
|
|
Loading…
Reference in a new issue