void LLDBPlugin::OnToggleInterrupt(clDebugEvent& event) { CHECK_IS_LLDB_SESSION(); event.Skip(); CL_DEBUG("CODELITE: interrupting debuggee"); if(!m_connector.IsCanInteract()) { m_connector.Interrupt(kInterruptReasonNone); } }
void LLDBPlugin::OnDebugShowCursor(clDebugEvent& event) { CHECK_IS_LLDB_SESSION(); if(m_connector.IsCanInteract()) { m_connector.ShowCurrentFileLine(); } }
void LLDBPlugin::OnToggleBreakpoint(clDebugEvent& event) { // Call Skip() here since we want codelite to manage the breakpoint as well ( in term of serialization in the // session file ) CHECK_IS_LLDB_SESSION(); // check to see if we are removing a breakpoint or adding one LLDBBreakpoint::Ptr_t bp(new LLDBBreakpoint(event.GetFileName(), event.GetInt())); IEditor* editor = m_mgr->GetActiveEditor(); if(editor) { // get the marker type set on the line int markerType = editor->GetCtrl()->MarkerGet(bp->GetLineNumber() - 1); for(size_t type = smt_FIRST_BP_TYPE; type <= smt_LAST_BP_TYPE; ++type) { int markerMask = (1 << type); if(markerType & markerMask) { // removing a breakpoint. "DeleteBreakpoint" will handle the interactive/non-interactive mode // of the debugger m_connector.MarkBreakpointForDeletion(bp); m_connector.DeleteBreakpoints(); return; } } // if we got here, its a new breakpoint, add it // Add the breakpoint to the list of breakpoints m_connector.AddBreakpoint(bp->GetFilename(), bp->GetLineNumber()); // apply it. In case the debugger can not interact with, it will be interrupted and the interrupt reason // will be set to ApplyBreakpoints m_connector.ApplyBreakpoints(); } }
void LLDBPlugin::OnDebugNextInst(clDebugEvent& event) { CHECK_IS_LLDB_SESSION(); if(m_connector.IsCanInteract()) { m_connector.NextInstruction(); } }
void LLDBPlugin::OnJumpToCursor(wxCommandEvent& event) { CHECK_IS_LLDB_SESSION(); const auto editor = m_mgr->GetActiveEditor(); if(!editor) { return; } m_connector.JumpTo(editor->GetFileName(), editor->GetCurrentLine() + 1); }
void LLDBPlugin::OnLLDBExpressionEvaluated(LLDBEvent& event) { CHECK_IS_LLDB_SESSION(); // hide any tooltip if(!event.GetVariables().empty() && m_mgr->GetActiveEditor()) { if(!m_tooltip) { m_tooltip = new LLDBTooltip(this); } m_tooltip->Show(event.GetExpression(), event.GetVariables().at(0)); } }
void LLDBPlugin::OnDebugTooltip(clDebugEvent& event) { CHECK_IS_LLDB_SESSION(); // FIXME: use the function ::GetCppExpressionFromPos() to get a better expression wxString expression = event.GetString(); if(expression.IsEmpty()) return; m_connector.EvaluateExpression(expression); }
void LLDBPlugin::OnAddWatch(wxCommandEvent& event) { CHECK_IS_LLDB_SESSION(); const auto editor = m_mgr->GetActiveEditor(); if(!editor) { return; } const auto watchWord = GetWatchWord(*editor); if(watchWord.IsEmpty()) { return; } GetLLDB()->AddWatch(watchWord); // Refresh the locals view GetLLDB()->RequestLocals(); }
void LLDBPlugin::OnDebugStepOut(clDebugEvent& event) { CHECK_IS_LLDB_SESSION(); m_connector.StepOut(); }
void LLDBPlugin::OnDebugCanInteract(clDebugEvent& event) { CHECK_IS_LLDB_SESSION(); event.SetAnswer(m_connector.IsCanInteract()); }
void LLDBPlugin::OnDebugIsRunning(clDebugEvent& event) { CHECK_IS_LLDB_SESSION(); event.SetAnswer(m_connector.IsRunning()); }
void LLDBPlugin::OnDebugStop(clDebugEvent& event) { CHECK_IS_LLDB_SESSION(); CL_DEBUG("LLDB >> Stop"); m_connector.Stop(); }
void LLDBPlugin::OnDebugNext(clDebugEvent& event) { CHECK_IS_LLDB_SESSION(); CL_DEBUG("LLDB >> Next"); m_connector.Next(); }
void LLDBPlugin::OnDebugVOID(clDebugEvent& event) { CHECK_IS_LLDB_SESSION(); }
void LLDBDebuggerPlugin::OnDebugStop(clDebugEvent& event) { CHECK_IS_LLDB_SESSION(); CL_DEBUG("LLDB >> Stop"); m_debugger.Stop(); }
void LLDBDebuggerPlugin::OnDebugNext(clDebugEvent& event) { CHECK_IS_LLDB_SESSION(); CL_DEBUG("LLDB >> Next"); m_debugger.StepOver(); }