Author: ion
Date: Mon Mar 5 05:29:46 2007
New Revision: 25996
URL:
http://svn.reactos.org/svn/reactos?rev=25996&view=rev
Log:
- Add proper bootcd/install freeldr.ini flags to allow KD debugging to work.
- Fix KdPollBreakIn.
- Add initial debug breakpoint code to ExpInitializeExecutive.
- WinDBG now breaks at the initial breakpoint and you can continue execution from there.
- There's still a lot of weird hangs when using WinDBG, it's far from usable.
Modified:
trunk/reactos/base/setup/usetup/bootsup.c
trunk/reactos/boot/bootdata/txtsetup.sif
trunk/reactos/ntoskrnl/ex/init.c
trunk/reactos/ntoskrnl/include/internal/kd64.h
trunk/reactos/ntoskrnl/kd64/kddata.c
trunk/reactos/ntoskrnl/kd64/kdlock.c
Modified: trunk/reactos/base/setup/usetup/bootsup.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/bootsup.…
==============================================================================
--- trunk/reactos/base/setup/usetup/bootsup.c (original)
+++ trunk/reactos/base/setup/usetup/bootsup.c Mon Mar 5 05:29:46 2007
@@ -305,12 +305,12 @@
L"SystemPath",
ArcPath);
- /* Options=/DEBUGPORT=SCREEN /NOGUIBOOT /SOS*/
+ /* Options=/DEBUG /DEBUGPORT=COM1 /BAUDRATE=115200 /SOS*/
IniCacheInsertKey(IniSection,
NULL,
INSERT_LAST,
L"Options",
- L"/DEBUGPORT=SCREEN /SOS");
+ L"/DEBUG /DEBUGPORT=COM1 /BAUDRATE=115200 /SOS");
/* Create "DOS" section */
IniSection = IniCacheAppendSection(IniCache,
@@ -423,12 +423,12 @@
L"SystemPath",
ArcPath);
- /* Options=/DEBUGPORT=COM1 /NOGUIBOOT /SOS*/
+ /* Options=/DEBUG /DEBUGPORT=COM1 /BAUDRATE=115200 /SOS*/
IniCacheInsertKey(IniSection,
NULL,
INSERT_LAST,
L"Options",
- L"/DEBUGPORT=COM1 /SOS");
+ L"/DEBUG /DEBUGPORT=COM1 /BAUDRATE=115200 /SOS");
/* Save the ini file */
IniCacheSave(IniCache, IniPath);
Modified: trunk/reactos/boot/bootdata/txtsetup.sif
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/txtsetup.sif…
==============================================================================
--- trunk/reactos/boot/bootdata/txtsetup.sif (original)
+++ trunk/reactos/boot/bootdata/txtsetup.sif Mon Mar 5 05:29:46 2007
@@ -40,7 +40,7 @@
[SetupData]
DefaultPath = \ReactOS
;OsLoadOptions = "/NOGUIBOOT /NODEBUG"
-OsLoadOptions = "/NOGUIBOOT /DEBUGPORT=COM1"
+OsLoadOptions = "/NOGUIBOOT"
;OsLoadOptions = "/NOGUIBOOT /DEBUGPORT=SCREEN"
;OsLoadOptions = "/NOGUIBOOT /DEBUGPORT=BOCHS"
Modified: trunk/reactos/ntoskrnl/ex/init.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/init.c?rev=259…
==============================================================================
--- trunk/reactos/ntoskrnl/ex/init.c (original)
+++ trunk/reactos/ntoskrnl/ex/init.c Mon Mar 5 05:29:46 2007
@@ -734,9 +734,6 @@
i++;
NextEntry = NextEntry->Flink;
}
-
- /* Check if we should break after symbol load */
- if (KdBreakAfterSymbolLoad) DbgBreakPointWithStatus(DBG_STATUS_CONTROL_C);
}
VOID
@@ -916,6 +913,9 @@
/* Load boot symbols */
ExpLoadBootSymbols(LoaderBlock);
+ /* Check if we should break after symbol load */
+ if (KdBreakAfterSymbolLoad) DbgBreakPointWithStatus(DBG_STATUS_CONTROL_C);
+
/* Set system ranges */
SharedUserData->Reserved1 = (ULONG_PTR)MmHighestUserAddress;
SharedUserData->Reserved3 = (ULONG_PTR)MmSystemRangeStart;
Modified: trunk/reactos/ntoskrnl/include/internal/kd64.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/kd64.h (original)
+++ trunk/reactos/ntoskrnl/include/internal/kd64.h Mon Mar 5 05:29:46 2007
@@ -248,9 +248,8 @@
extern LONG KdpTimeSlipPending;
extern PKEVENT KdpTimeSlipEvent;
extern KSPIN_LOCK KdpTimeSlipEventLock;
+extern BOOLEAN KdpPortLocked;
extern BOOLEAN KdpControlCPressed;
-extern BOOLEAN KdpControlCWaiting;
-extern BOOLEAN KdpPortLocked;
extern KSPIN_LOCK KdpDebuggerLock;
extern LARGE_INTEGER KdTimerStop, KdTimerStart, KdTimerDifference;
extern ULONG KdComponentTableSize;
Modified: trunk/reactos/ntoskrnl/kd64/kddata.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/kd64/kddata.c?rev…
==============================================================================
--- trunk/reactos/ntoskrnl/kd64/kddata.c (original)
+++ trunk/reactos/ntoskrnl/kd64/kddata.c Mon Mar 5 05:29:46 2007
@@ -20,10 +20,9 @@
// Debugger State
//
KD_CONTEXT KdpContext;
-BOOLEAN KdpControlCPressed;
-BOOLEAN KdpControlCWaiting;
BOOLEAN KdpPortLocked;
KSPIN_LOCK KdpDebuggerLock;
+BOOLEAN KdpControlCPressed;
//
// Debug Trap Handlers
Modified: trunk/reactos/ntoskrnl/kd64/kdlock.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/kd64/kdlock.c?rev…
==============================================================================
--- trunk/reactos/ntoskrnl/kd64/kdlock.c (original)
+++ trunk/reactos/ntoskrnl/kd64/kdlock.c Mon Mar 5 05:29:46 2007
@@ -86,12 +86,12 @@
_disable();
/* Check if a CTRL-C is in the queue */
- if (KdpControlCWaiting)
+ if (KdpContext.KdpControlCPending)
{
/* Set it and prepare for break */
KdpControlCPressed = TRUE;
DoBreak = TRUE;
- KdpControlCWaiting = FALSE;
+ KdpContext.KdpControlCPending = FALSE;
}
else
{