mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
Fix build with optimizations and one or two bugs - should have tested with optimizations before committing :-/
svn path=/trunk/; revision=13843
This commit is contained in:
parent
f3cea5b1a2
commit
088d3f0612
1 changed files with 8 additions and 4 deletions
|
@ -873,7 +873,8 @@ KdbpCmdThread(ULONG Argc, PCHAR Argv[])
|
||||||
PEPROCESS Process = NULL;
|
PEPROCESS Process = NULL;
|
||||||
PULONG Esp;
|
PULONG Esp;
|
||||||
PULONG Ebp;
|
PULONG Ebp;
|
||||||
ULONG Eip, ul;
|
ULONG Eip;
|
||||||
|
ULONG ul = 0;
|
||||||
PCHAR State, pend, str1, str2;
|
PCHAR State, pend, str1, str2;
|
||||||
STATIC CONST PCHAR ThreadStateToString[THREAD_STATE_MAX] =
|
STATIC CONST PCHAR ThreadStateToString[THREAD_STATE_MAX] =
|
||||||
{ "Initialized", "Ready", "Running",
|
{ "Initialized", "Ready", "Running",
|
||||||
|
@ -1224,14 +1225,15 @@ KdbpCmdGdtLdtIdt(ULONG Argc, PCHAR Argv[])
|
||||||
}
|
}
|
||||||
KdbpPrint("IDT Base: 0x%08x Limit: 0x%04x\n", Reg.Base, Reg.Limit);
|
KdbpPrint("IDT Base: 0x%08x Limit: 0x%04x\n", Reg.Base, Reg.Limit);
|
||||||
KdbpPrint(" Idx Type Seg. Sel. Offset DPL\n");
|
KdbpPrint(" Idx Type Seg. Sel. Offset DPL\n");
|
||||||
for ( ; (i + sizeof(SegDesc) - 1) <= Reg.Limit; i += 8)
|
for (i = 0; (i + sizeof(SegDesc) - 1) <= Reg.Limit; i += 8)
|
||||||
{
|
{
|
||||||
if (!NT_SUCCESS(KdbpSafeReadMemory(SegDesc, (PVOID)(Reg.Base + i), sizeof(SegDesc))))
|
if (!NT_SUCCESS(KdbpSafeReadMemory(SegDesc, (PVOID)(Reg.Base + i), sizeof(SegDesc))))
|
||||||
{
|
{
|
||||||
KdbpPrint("Couldn't access memory at 0x%08x!\n", Reg.Base + i);
|
KdbpPrint("Couldn't access memory at 0x%08x!\n", Reg.Base + i);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Dpl = ((SegDesc[1] >> 13) & 3);
|
||||||
if ((SegDesc[1] & 0x1f00) == 0x0500) /* Task gate */
|
if ((SegDesc[1] & 0x1f00) == 0x0500) /* Task gate */
|
||||||
SegType = "TASKGATE";
|
SegType = "TASKGATE";
|
||||||
else if ((SegDesc[1] & 0x1fe0) == 0x0e00) /* 32 bit Interrupt gate */
|
else if ((SegDesc[1] & 0x1fe0) == 0x0e00) /* 32 bit Interrupt gate */
|
||||||
|
@ -1242,6 +1244,8 @@ KdbpCmdGdtLdtIdt(ULONG Argc, PCHAR Argv[])
|
||||||
SegType = "TRAPGATE32";
|
SegType = "TRAPGATE32";
|
||||||
else if ((SegDesc[1] & 0x1fe0) == 0x0700) /* 16 bit Trap gate */
|
else if ((SegDesc[1] & 0x1fe0) == 0x0700) /* 16 bit Trap gate */
|
||||||
SegType = "TRAPGATE16";
|
SegType = "TRAPGATE16";
|
||||||
|
else
|
||||||
|
SegType = "UNKNOWN";
|
||||||
|
|
||||||
if ((SegDesc[1] & (1 << 15)) == 0) /* not present */
|
if ((SegDesc[1] & (1 << 15)) == 0) /* not present */
|
||||||
{
|
{
|
||||||
|
@ -1673,7 +1677,7 @@ KdbpPrint(
|
||||||
STATIC CHAR Buffer[4096];
|
STATIC CHAR Buffer[4096];
|
||||||
STATIC BOOLEAN TerminalInitialized = FALSE;
|
STATIC BOOLEAN TerminalInitialized = FALSE;
|
||||||
STATIC BOOLEAN TerminalReportsSize = TRUE;
|
STATIC BOOLEAN TerminalReportsSize = TRUE;
|
||||||
CHAR c;
|
CHAR c = '\0';
|
||||||
PCHAR p;
|
PCHAR p;
|
||||||
INT Length;
|
INT Length;
|
||||||
INT i;
|
INT i;
|
||||||
|
|
Loading…
Reference in a new issue