- Fix various Dbgk bugs in the DbgUI and Win32 Debug wrapper APIs.

- Win32 Debug test application now works as well as Native one.
- The Dbgk framework still crashes on exceptions, I think.

svn path=/trunk/; revision=25002
This commit is contained in:
Alex Ionescu 2006-11-30 19:38:04 +00:00
parent fb9895a402
commit 9ab9cf7351
2 changed files with 4 additions and 3 deletions

View file

@ -163,12 +163,12 @@ DbgUiConvertStateChangeStructure(IN PDBGUI_WAIT_STATE_CHANGE WaitStateChange,
if (!NT_SUCCESS(Status))
{
/* Failed to get PEB address */
DebugEvent->u.CreateThread.lpThreadLocalBase = NULL;
DebugEvent->u.CreateProcessInfo.lpThreadLocalBase = NULL;
}
else
{
/* Write PEB Address */
DebugEvent->u.CreateThread.lpThreadLocalBase =
DebugEvent->u.CreateProcessInfo.lpThreadLocalBase =
ThreadBasicInfo.TebBaseAddress;
}

View file

@ -235,6 +235,7 @@ ProcessIdToHandle(IN DWORD dwProcessId)
if (dwProcessId == -1) dwProcessId = (DWORD)CsrGetProcessId();
/* Open a handle to the process */
ClientId.UniqueThread = NULL;
ClientId.UniqueProcess = (HANDLE)dwProcessId;
InitializeObjectAttributes(&ObjectAttributes, NULL, 0, NULL, NULL);
Status = NtOpenProcess(&Handle,
@ -498,7 +499,7 @@ WaitForDebugEvent(IN LPDEBUG_EVENT lpDebugEvent,
} while ((Status == STATUS_ALERTED) || (Status == STATUS_USER_APC));
/* Check if the wait failed */
if (!(NT_SUCCESS(Status)) || (Status != DBG_UNABLE_TO_PROVIDE_HANDLE))
if (!(NT_SUCCESS(Status)) || (Status == DBG_UNABLE_TO_PROVIDE_HANDLE))
{
/* Set the error code and quit */
SetLastErrorByStatus(Status);