weiden(a)svn.reactos.com wrote:
wrap access to foreign Peb with SEH
Modified: trunk/reactos/ntoskrnl/ps/process.c
------------------------------------------------------------------------
*Modified: trunk/reactos/ntoskrnl/ps/process.c*
--- trunk/reactos/ntoskrnl/ps/process.c 2005-01-20 00:14:50 UTC (rev 13146)
+++ trunk/reactos/ntoskrnl/ps/process.c 2005-01-20 00:31:52 UTC (rev 13147)
@@ -1720,7 +1720,15 @@
process so we're sure we're in the right context! */
KeAttachProcess(&Process->Pcb);
- Process->Peb->BeingDebugged = TRUE;
+ _SEH_TRY
+ {
+ Process->Peb->BeingDebugged = TRUE;
+ }
+ _SEH_HANDLE
+ {
+ DPRINT1("Trying to set the Peb->BeingDebugged field of
process 0x%x failed, exception: 0x%x\n", Process, _SEH_GetExceptionCode());
+ }
+ _SEH_END;
KeDetachProcess();
}
Status = STATUS_SUCCESS;
------------------------------------------------------------------------
I apologize if I'm being flat-out clueless here, but do we really want
to return STATUS_SUCCESS when we failed to set the field in question?