equal
deleted
inserted
replaced
102 return self->DoEvent(aEvent, a1, a2); |
102 return self->DoEvent(aEvent, a1, a2); |
103 } |
103 } |
104 |
104 |
105 TUint DDebuggerEventHandler::DoEvent(TKernelEvent aEvent, TAny* a1, TAny* a2) |
105 TUint DDebuggerEventHandler::DoEvent(TKernelEvent aEvent, TAny* a1, TAny* a2) |
106 { |
106 { |
|
107 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) |
|
108 |
107 //if (aEvent != EEventUserTrace) Kern::Printf("fdbk: Event %d a1=%d a2=%d", aEvent, a1, a2); |
109 //if (aEvent != EEventUserTrace) Kern::Printf("fdbk: Event %d a1=%d a2=%d", aEvent, a1, a2); |
108 |
110 |
109 if (aEvent == EEventKillThread) |
111 if (aEvent == EEventKillThread) |
110 { |
112 { |
111 #ifdef __MARM__ |
113 #ifdef __MARM__ |
211 TInt err = ContinueFromBreakpoint(&Kern::CurrentThread(), excAddr); |
213 TInt err = ContinueFromBreakpoint(&Kern::CurrentThread(), excAddr); |
212 if (err) return ERunNext; // If we failed to continue, we shouldn't pretend we've handled it |
214 if (err) return ERunNext; // If we failed to continue, we shouldn't pretend we've handled it |
213 } |
215 } |
214 return (TUint)DKernelEventHandler::EExcHandled; |
216 return (TUint)DKernelEventHandler::EExcHandled; |
215 #else |
217 #else |
|
218 // Do this regardless to get the benefit of the kernel's mutex order checking in winscw udeb |
|
219 BreakpointLock(); |
|
220 BreakpointUnlock(); |
216 (void)a1; |
221 (void)a1; |
217 #endif |
222 #endif |
218 } |
223 } |
219 else if (aEvent == EEventRemoveCodeSeg) |
224 else if (aEvent == EEventRemoveCodeSeg) |
220 { |
225 { |