# HG changeset patch # User Tom Sutcliffe # Date 1291115518 0 # Node ID 17bed177107f1973d222917f020cd2e803d4547b # Parent b44958a4977b07afa39bc9c4d909dc6318d61537 Fix for bug in memoryaccess when running with udeb kernel (ie when precondition asserts are enabled). diff -r b44958a4977b -r 17bed177107f libraries/memoryaccess/fdebuggerkernel.cpp --- a/libraries/memoryaccess/fdebuggerkernel.cpp Sun Nov 07 12:43:47 2010 +0000 +++ b/libraries/memoryaccess/fdebuggerkernel.cpp Tue Nov 30 11:11:58 2010 +0000 @@ -104,6 +104,8 @@ TUint DDebuggerEventHandler::DoEvent(TKernelEvent aEvent, TAny* a1, TAny* a2) { + if (Kern::CurrentThread().iOwningProcess->iId == 1) return ERunNext; // There's nothing we can safely do in the context of a kernel thread, because they might already be holding a mutex (which definitely happens in the case of EEventAddThread) + //if (aEvent != EEventUserTrace) Kern::Printf("fdbk: Event %d a1=%d a2=%d", aEvent, a1, a2); if (aEvent == EEventKillThread) @@ -213,6 +215,9 @@ } return (TUint)DKernelEventHandler::EExcHandled; #else + // Do this regardless to get the benefit of the kernel's mutex order checking in winscw udeb + BreakpointLock(); + BreakpointUnlock(); (void)a1; #endif }