void LuaMachine::hook(lua_Debug *ar) { if (ar->event == LUA_HOOKCALL) { level++; } else if (ar->event == LUA_HOOKRET) { level--; } else { if (level <= breakRequiredLevel) { onBreak(ar); } else { if (breakpoints.isAnySet(ar->currentline)) { lua_getinfo(L, "S", ar); if (breakpoints.isSet(ar->source, ar->currentline)) { onBreak(ar); } } } } }
static void doAction(LLDBPlugin* plugin, PDAction action) { switch (action) { case PDAction_Stop : onStop(plugin); break; case PDAction_Break : onBreak(plugin); break; case PDAction_Run : onRun(plugin); break; case PDAction_Step : onStep(plugin); break; case PDAction_StepOut : onStepOver(plugin); break; case PDAction_StepOver : onStepOver(plugin); break; } }
static void doAction(DbgEngPlugin* plugin, PDAction action) { printf("DbgEngPlugin: doAction\n"); switch (action) { case PDAction_stop: onStop(plugin); break; case PDAction_break: onBreak(plugin); break; case PDAction_run: onRun(plugin); break; case PDAction_step: onStep(plugin); break; case PDAction_stepOut: onStepOut(plugin); break; case PDAction_stepOver: onStepOver(plugin); break; } }