- 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.

svn path=/trunk/; revision=25996
This commit is contained in:
Alex Ionescu 2007-03-05 02:29:46 +00:00
parent 05f82784bd
commit e707b70756
6 changed files with 12 additions and 14 deletions

View file

@ -305,12 +305,12 @@ CreateFreeLoaderIniForDos(PWCHAR IniPath,
L"SystemPath", L"SystemPath",
ArcPath); ArcPath);
/* Options=/DEBUGPORT=SCREEN /NOGUIBOOT /SOS*/ /* Options=/DEBUG /DEBUGPORT=COM1 /BAUDRATE=115200 /SOS*/
IniCacheInsertKey(IniSection, IniCacheInsertKey(IniSection,
NULL, NULL,
INSERT_LAST, INSERT_LAST,
L"Options", L"Options",
L"/DEBUGPORT=SCREEN /SOS"); L"/DEBUG /DEBUGPORT=COM1 /BAUDRATE=115200 /SOS");
/* Create "DOS" section */ /* Create "DOS" section */
IniSection = IniCacheAppendSection(IniCache, IniSection = IniCacheAppendSection(IniCache,
@ -423,12 +423,12 @@ CreateFreeLoaderIniForReactos(PWCHAR IniPath,
L"SystemPath", L"SystemPath",
ArcPath); ArcPath);
/* Options=/DEBUGPORT=COM1 /NOGUIBOOT /SOS*/ /* Options=/DEBUG /DEBUGPORT=COM1 /BAUDRATE=115200 /SOS*/
IniCacheInsertKey(IniSection, IniCacheInsertKey(IniSection,
NULL, NULL,
INSERT_LAST, INSERT_LAST,
L"Options", L"Options",
L"/DEBUGPORT=COM1 /SOS"); L"/DEBUG /DEBUGPORT=COM1 /BAUDRATE=115200 /SOS");
/* Save the ini file */ /* Save the ini file */
IniCacheSave(IniCache, IniPath); IniCacheSave(IniCache, IniPath);

View file

@ -40,7 +40,7 @@ Cabinet=reactos.cab
[SetupData] [SetupData]
DefaultPath = \ReactOS DefaultPath = \ReactOS
;OsLoadOptions = "/NOGUIBOOT /NODEBUG" ;OsLoadOptions = "/NOGUIBOOT /NODEBUG"
OsLoadOptions = "/NOGUIBOOT /DEBUGPORT=COM1" OsLoadOptions = "/NOGUIBOOT"
;OsLoadOptions = "/NOGUIBOOT /DEBUGPORT=SCREEN" ;OsLoadOptions = "/NOGUIBOOT /DEBUGPORT=SCREEN"
;OsLoadOptions = "/NOGUIBOOT /DEBUGPORT=BOCHS" ;OsLoadOptions = "/NOGUIBOOT /DEBUGPORT=BOCHS"

View file

@ -734,9 +734,6 @@ ExpLoadBootSymbols(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
i++; i++;
NextEntry = NextEntry->Flink; NextEntry = NextEntry->Flink;
} }
/* Check if we should break after symbol load */
if (KdBreakAfterSymbolLoad) DbgBreakPointWithStatus(DBG_STATUS_CONTROL_C);
} }
VOID VOID
@ -916,6 +913,9 @@ ExpInitializeExecutive(IN ULONG Cpu,
/* Load boot symbols */ /* Load boot symbols */
ExpLoadBootSymbols(LoaderBlock); ExpLoadBootSymbols(LoaderBlock);
/* Check if we should break after symbol load */
if (KdBreakAfterSymbolLoad) DbgBreakPointWithStatus(DBG_STATUS_CONTROL_C);
/* Set system ranges */ /* Set system ranges */
SharedUserData->Reserved1 = (ULONG_PTR)MmHighestUserAddress; SharedUserData->Reserved1 = (ULONG_PTR)MmHighestUserAddress;
SharedUserData->Reserved3 = (ULONG_PTR)MmSystemRangeStart; SharedUserData->Reserved3 = (ULONG_PTR)MmSystemRangeStart;

View file

@ -248,9 +248,8 @@ extern WORK_QUEUE_ITEM KdpTimeSlipWorkItem;
extern LONG KdpTimeSlipPending; extern LONG KdpTimeSlipPending;
extern PKEVENT KdpTimeSlipEvent; extern PKEVENT KdpTimeSlipEvent;
extern KSPIN_LOCK KdpTimeSlipEventLock; extern KSPIN_LOCK KdpTimeSlipEventLock;
extern BOOLEAN KdpControlCPressed;
extern BOOLEAN KdpControlCWaiting;
extern BOOLEAN KdpPortLocked; extern BOOLEAN KdpPortLocked;
extern BOOLEAN KdpControlCPressed;
extern KSPIN_LOCK KdpDebuggerLock; extern KSPIN_LOCK KdpDebuggerLock;
extern LARGE_INTEGER KdTimerStop, KdTimerStart, KdTimerDifference; extern LARGE_INTEGER KdTimerStop, KdTimerStart, KdTimerDifference;
extern ULONG KdComponentTableSize; extern ULONG KdComponentTableSize;

View file

@ -20,10 +20,9 @@ VOID NTAPI RtlpBreakWithStatusInstruction(VOID);
// Debugger State // Debugger State
// //
KD_CONTEXT KdpContext; KD_CONTEXT KdpContext;
BOOLEAN KdpControlCPressed;
BOOLEAN KdpControlCWaiting;
BOOLEAN KdpPortLocked; BOOLEAN KdpPortLocked;
KSPIN_LOCK KdpDebuggerLock; KSPIN_LOCK KdpDebuggerLock;
BOOLEAN KdpControlCPressed;
// //
// Debug Trap Handlers // Debug Trap Handlers

View file

@ -86,12 +86,12 @@ KdPollBreakIn(VOID)
_disable(); _disable();
/* Check if a CTRL-C is in the queue */ /* Check if a CTRL-C is in the queue */
if (KdpControlCWaiting) if (KdpContext.KdpControlCPending)
{ {
/* Set it and prepare for break */ /* Set it and prepare for break */
KdpControlCPressed = TRUE; KdpControlCPressed = TRUE;
DoBreak = TRUE; DoBreak = TRUE;
KdpControlCWaiting = FALSE; KdpContext.KdpControlCPending = FALSE;
} }
else else
{ {