- Remove debug-test infinite loop from DbgkForwardException
- Fix missing "break" statement in DbgkFreeDebugEvent, causing a handle leak, and in DbgkpOpenHandles, causing user-mode to get a kernel-mode handle for DLL images instead of the correct duplicated one.
- Currently struggling with the fact that ArbitraryUserPointer seems to be reset to zero before it's read for the debug event, so DLL names don't come through.
svn path=/trunk/; revision=25011
DebugEvent->u.LoadDll.lpImageName =
((PTEB)ThreadBasicInfo.TebBaseAddress)->
Tib.ArbitraryUserPointer;
- DPRINT1("Image name: %p\n", DebugEvent->u.LoadDll.lpImageName);
}
else
{
ImageBase = 0;
ArbitraryUserPointer = NtCurrentTeb()->Tib.ArbitraryUserPointer;
NtCurrentTeb()->Tib.ArbitraryUserPointer = FullDosName.Buffer;
- DPRINT1("POI. DAT: %p %S\n", NtCurrentTeb()->Tib.ArbitraryUserPointer, FullDosName.Buffer);
Status = NtMapViewOfSection(SectionHandle,
NtCurrentProcess(),
&ImageBase,
MEM_COMMIT,
PAGE_READONLY);
NtCurrentTeb()->Tib.ArbitraryUserPointer = ArbitraryUserPointer;
- DPRINT1("Poi gone!\n");
if (!NT_SUCCESS(Status))
{
DPRINT1("map view of section failed (Status 0x%08lx)\n", Status);
PAGED_CODE();
DBGKTRACE(DBGK_EXCEPTION_DEBUG,
"ExceptionRecord: %p Port: %p\n", ExceptionRecord, DebugPort);
- while (TRUE);
/* Setup the API Message */
ApiMessage.h.u1.Length = sizeof(DBGKM_MSG) << 16 |
/* Get the pointer */
Handle = &DebugEvent->ApiMsg.CreateProcess.FileHandle;
+ break;
/* As does DLL load */
case DbgKmLoadDllApi:
/* Fall through to duplicate file handle */
DupHandle = &WaitStateChange->StateInfo.LoadDll.FileHandle;
+ break;
/* Anything else has no handles */
default:
if (PsGetCurrentProcess()->DebugPort)
{
/* FIXME : TODO */
- ASSERT(FALSE);
+ //KEBUGCHECK(0);
}
else if (KiDebugRoutine(TrapFrame,
ExceptionFrame,