mirror of
https://github.com/reactos/reactos.git
synced 2024-12-29 10:35:28 +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 */
|
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];
|
return &Buffer[0];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -425,37 +414,33 @@ GspComputeSignal (NTSTATUS ExceptionCode)
|
||||||
switch (ExceptionCode)
|
switch (ExceptionCode)
|
||||||
{
|
{
|
||||||
case STATUS_INTEGER_DIVIDE_BY_ZERO:
|
case STATUS_INTEGER_DIVIDE_BY_ZERO:
|
||||||
SigVal = 8;
|
SigVal = 8; /* divide by zero */
|
||||||
break; /* divide by zero */
|
break;
|
||||||
case STATUS_SINGLE_STEP:
|
case STATUS_SINGLE_STEP:
|
||||||
/* debug exception */
|
|
||||||
case STATUS_BREAKPOINT:
|
case STATUS_BREAKPOINT:
|
||||||
SigVal = 5;
|
SigVal = 5; /* breakpoint */
|
||||||
break; /* breakpoint */
|
break;
|
||||||
case STATUS_INTEGER_OVERFLOW:
|
case STATUS_INTEGER_OVERFLOW:
|
||||||
/* into instruction (overflow) */
|
|
||||||
case STATUS_ARRAY_BOUNDS_EXCEEDED:
|
case STATUS_ARRAY_BOUNDS_EXCEEDED:
|
||||||
SigVal = 16;
|
SigVal = 16; /* bound instruction */
|
||||||
break; /* bound instruction */
|
break;
|
||||||
case STATUS_ILLEGAL_INSTRUCTION:
|
case STATUS_ILLEGAL_INSTRUCTION:
|
||||||
SigVal = 4;
|
SigVal = 4; /* Invalid opcode */
|
||||||
break; /* Invalid opcode */
|
break;
|
||||||
#if 0
|
#if 0
|
||||||
case STATUS_FLT_INVALID_OPERATION:
|
case STATUS_FLT_INVALID_OPERATION:
|
||||||
SigVal = 8;
|
SigVal = 8;
|
||||||
break; /* coprocessor not available */
|
break;
|
||||||
#endif
|
#endif
|
||||||
case STATUS_STACK_OVERFLOW:
|
case STATUS_STACK_OVERFLOW:
|
||||||
/* stack exception */
|
|
||||||
case STATUS_DATATYPE_MISALIGNMENT:
|
case STATUS_DATATYPE_MISALIGNMENT:
|
||||||
/* page fault */
|
|
||||||
case STATUS_ACCESS_VIOLATION:
|
case STATUS_ACCESS_VIOLATION:
|
||||||
SigVal = 11; /* access violation */
|
SigVal = 11; /* access violation */
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
SigVal = 7; /* "software generated" */
|
SigVal = 7; /* "software generated" */
|
||||||
}
|
}
|
||||||
return (SigVal);
|
return SigVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -481,7 +466,9 @@ GspHex2Long (PCHAR *Address,
|
||||||
NumChars++;
|
NumChars++;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
(*Address)++;
|
(*Address)++;
|
||||||
}
|
}
|
||||||
|
@ -650,7 +637,7 @@ GspSetThread(PCHAR Request)
|
||||||
switch (Request[0])
|
switch (Request[0])
|
||||||
{
|
{
|
||||||
case 'c': /* Run thread */
|
case 'c': /* Run thread */
|
||||||
if (GspFindThread (ptr, &ThreadInfo))
|
if (GspFindThread(ptr, &ThreadInfo))
|
||||||
{
|
{
|
||||||
GspOutBuffer[0] = 'O';
|
GspOutBuffer[0] = 'O';
|
||||||
GspOutBuffer[1] = 'K';
|
GspOutBuffer[1] = 'K';
|
||||||
|
@ -676,7 +663,10 @@ GspSetThread(PCHAR Request)
|
||||||
GspOutBuffer[0] = 'O';
|
GspOutBuffer[0] = 'O';
|
||||||
GspOutBuffer[1] = 'K';
|
GspOutBuffer[1] = 'K';
|
||||||
|
|
||||||
if(GspDbgThread) ObDereferenceObject(GspDbgThread);
|
if (GspDbgThread)
|
||||||
|
{
|
||||||
|
ObDereferenceObject(GspDbgThread);
|
||||||
|
}
|
||||||
|
|
||||||
GspDbgThread = ThreadInfo;
|
GspDbgThread = ThreadInfo;
|
||||||
}
|
}
|
||||||
|
@ -920,13 +910,15 @@ GspCorrectHwBreakpoint()
|
||||||
for (BreakpointNumber = 0; BreakpointNumber < 3; BreakpointNumber++)
|
for (BreakpointNumber = 0; BreakpointNumber < 3; BreakpointNumber++)
|
||||||
{
|
{
|
||||||
Bit = 2 << (BreakpointNumber << 1);
|
Bit = 2 << (BreakpointNumber << 1);
|
||||||
if (!(dr7_ & Bit) && GspBreakpoints[BreakpointNumber].Enabled) {
|
if (!(dr7_ & Bit) && GspBreakpoints[BreakpointNumber].Enabled)
|
||||||
|
{
|
||||||
CorrectIt = TRUE;
|
CorrectIt = TRUE;
|
||||||
dr7_ |= Bit;
|
dr7_ |= Bit;
|
||||||
dr7_ &= ~(0xf0000 << (BreakpointNumber << 2));
|
dr7_ &= ~(0xf0000 << (BreakpointNumber << 2));
|
||||||
dr7_ |= (((GspBreakpoints[BreakpointNumber].Length << 2) |
|
dr7_ |= (((GspBreakpoints[BreakpointNumber].Length << 2) |
|
||||||
GspBreakpoints[BreakpointNumber].Type) << 16) << (BreakpointNumber << 2);
|
GspBreakpoints[BreakpointNumber].Type) << 16) << (BreakpointNumber << 2);
|
||||||
switch (BreakpointNumber) {
|
switch (BreakpointNumber)
|
||||||
|
{
|
||||||
#if defined(__GNUC__)
|
#if defined(__GNUC__)
|
||||||
case 0:
|
case 0:
|
||||||
asm volatile ("movl %0, %%dr0\n"
|
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
|
/* ugly hack to avoid attempting to send status at the very
|
||||||
* beginning, right when GDB is trying to query the stub */
|
* beginning, right when GDB is trying to query the stub */
|
||||||
if (gdb_attached_yet) {
|
if (gdb_attached_yet)
|
||||||
|
{
|
||||||
LONG Esp;
|
LONG Esp;
|
||||||
|
|
||||||
stop_reply:
|
stop_reply:
|
||||||
|
@ -1113,7 +1106,9 @@ KdpGdbEnterDebuggerException(PEXCEPTION_RECORD ExceptionRecord,
|
||||||
*ptr = '\0';
|
*ptr = '\0';
|
||||||
|
|
||||||
GspPutPacket (&GspOutBuffer[0]);
|
GspPutPacket (&GspOutBuffer[0]);
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
gdb_attached_yet = 1;
|
gdb_attached_yet = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1351,7 +1346,7 @@ KdpGdbEnterDebuggerException(PEXCEPTION_RECORD ExceptionRecord,
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
} /* switch */
|
}
|
||||||
|
|
||||||
/* reply to the request */
|
/* reply to the request */
|
||||||
GspPutPacket (&GspOutBuffer[0]);
|
GspPutPacket (&GspOutBuffer[0]);
|
||||||
|
@ -1411,24 +1406,8 @@ VOID
|
||||||
STDCALL
|
STDCALL
|
||||||
KdpGdbDebugPrint(PCH Message, ULONG Length)
|
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;
|
extern LIST_ENTRY ModuleListHead;
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
|
|
Loading…
Reference in a new issue