protected override EventResult DoProcessEvent(Inferior.ChildEvent cevent,
out TargetEventArgs args)
{
Report.Debug (DebugFlags.SSE,
"{0} native trampoline event: {1}", sse, cevent);
args = null;
Inferior.StackFrame frame = inferior.GetCurrentFrame ();
if (done)
return EventResult.Completed;
if (!entered_trampoline) {
stack_pointer = frame.StackPointer;
sse.do_step_native ();
entered_trampoline = true;
return EventResult.Running;
}
if (frame.StackPointer <= stack_pointer) {
sse.do_next ();
return EventResult.Running;
}
done = true;
Instruction instruction = sse.Architecture.ReadInstruction (
inferior, frame.Address);
if ((instruction == null) || !instruction.HasInstructionSize) {
sse.do_step_native ();
return EventResult.Running;
}
if (instruction.InstructionType != Instruction.Type.Jump) {
sse.do_step_native ();
return EventResult.Running;
}
return EventResult.Completed;
}