void LLDBPlugin::OnLLDBExited(LLDBEvent& event) { event.Skip(); m_connector.SetGoingDown(true); // Stop the debugger ( do not notify about it, since we are in the handler...) m_connector.Cleanup(); // Save current perspective before destroying the session if(m_isPerspectiveLoaded) { m_mgr->SavePerspective("LLDB-debugger"); // Restore the old perspective m_mgr->LoadPerspective("Default"); m_isPerspectiveLoaded = false; } DestroyUI(); // Reset various state variables DoCleanup(); CL_DEBUG("CODELITE>> LLDB exited"); // Also notify codelite's event clDebugEvent e2(wxEVT_DEBUG_ENDED); EventNotifier::Get()->AddPendingEvent(e2); { clDebugEvent e(wxEVT_DEBUG_ENDED); EventNotifier::Get()->AddPendingEvent(e); } }
void LLDBPlugin::UnPlug() { m_connector.StopDebugServer(); DestroyUI(); m_connector.Unbind(wxEVT_LLDB_STARTED, &LLDBPlugin::OnLLDBStarted, this); m_connector.Unbind(wxEVT_LLDB_CRASHED, &LLDBPlugin::OnLLDBCrashed, this); m_connector.Unbind(wxEVT_LLDB_EXITED, &LLDBPlugin::OnLLDBExited, this); m_connector.Unbind(wxEVT_LLDB_STOPPED, &LLDBPlugin::OnLLDBStopped, this); m_connector.Unbind(wxEVT_LLDB_RUNNING, &LLDBPlugin::OnLLDBRunning, this); m_connector.Unbind(wxEVT_LLDB_STOPPED_ON_FIRST_ENTRY, &LLDBPlugin::OnLLDBStoppedOnEntry, this); m_connector.Unbind(wxEVT_LLDB_BREAKPOINTS_DELETED_ALL, &LLDBPlugin::OnLLDBDeletedAllBreakpoints, this); m_connector.Unbind(wxEVT_LLDB_BREAKPOINTS_UPDATED, &LLDBPlugin::OnLLDBBreakpointsUpdated, this); m_connector.Unbind(wxEVT_LLDB_EXPRESSION_EVALUATED, &LLDBPlugin::OnLLDBExpressionEvaluated, this); // UI events EventNotifier::Get()->Disconnect( wxEVT_DBG_IS_PLUGIN_DEBUGGER, clDebugEventHandler(LLDBPlugin::OnIsDebugger), NULL, this); EventNotifier::Get()->Disconnect(wxEVT_DBG_UI_START, clDebugEventHandler(LLDBPlugin::OnDebugStart), NULL, this); EventNotifier::Get()->Disconnect( wxEVT_DBG_UI_CONTINUE, clDebugEventHandler(LLDBPlugin::OnDebugContinue), NULL, this); EventNotifier::Get()->Disconnect(wxEVT_DBG_UI_NEXT, clDebugEventHandler(LLDBPlugin::OnDebugNext), NULL, this); EventNotifier::Get()->Disconnect(wxEVT_DBG_UI_STOP, clDebugEventHandler(LLDBPlugin::OnDebugStop), NULL, this); EventNotifier::Get()->Disconnect( wxEVT_DBG_IS_RUNNING, clDebugEventHandler(LLDBPlugin::OnDebugIsRunning), NULL, this); EventNotifier::Get()->Disconnect( wxEVT_DBG_CAN_INTERACT, clDebugEventHandler(LLDBPlugin::OnDebugCanInteract), NULL, this); EventNotifier::Get()->Disconnect(wxEVT_DBG_UI_STEP_IN, clDebugEventHandler(LLDBPlugin::OnDebugStepIn), NULL, this); EventNotifier::Get()->Disconnect( wxEVT_DBG_UI_STEP_OUT, clDebugEventHandler(LLDBPlugin::OnDebugStepOut), NULL, this); EventNotifier::Get()->Disconnect( wxEVT_DBG_UI_TOGGLE_BREAKPOINT, clDebugEventHandler(LLDBPlugin::OnToggleBreakpoint), NULL, this); EventNotifier::Get()->Disconnect( wxEVT_DBG_UI_INTERRUPT, clDebugEventHandler(LLDBPlugin::OnToggleInerrupt), NULL, this); EventNotifier::Get()->Disconnect( wxEVT_BUILD_STARTING, clBuildEventHandler(LLDBPlugin::OnBuildStarting), NULL, this); EventNotifier::Get()->Disconnect(wxEVT_INIT_DONE, wxCommandEventHandler(LLDBPlugin::OnInitDone), NULL, this); EventNotifier::Get()->Disconnect( wxEVT_DBG_EXPR_TOOLTIP, clDebugEventHandler(LLDBPlugin::OnDebugTooltip), NULL, this); EventNotifier::Get()->Disconnect( wxEVT_DBG_UI_QUICK_DEBUG, clDebugEventHandler(LLDBPlugin::OnDebugQuickDebug), NULL, this); EventNotifier::Get()->Disconnect( wxEVT_DBG_UI_CORE_FILE, clDebugEventHandler(LLDBPlugin::OnDebugCoreFile), NULL, this); EventNotifier::Get()->Disconnect( wxEVT_DBG_UI_DELTE_ALL_BREAKPOINTS, clDebugEventHandler(LLDBPlugin::OnDebugDeleteAllBreakpoints), NULL, this); EventNotifier::Get()->Disconnect( wxEVT_DBG_UI_ATTACH_TO_PROCESS, clDebugEventHandler(LLDBPlugin::OnDebugAttachToProcess), NULL, this); EventNotifier::Get()->Disconnect( wxEVT_DBG_UI_ENABLE_ALL_BREAKPOINTS, clDebugEventHandler(LLDBPlugin::OnDebugEnableAllBreakpoints), NULL, this); EventNotifier::Get()->Disconnect(wxEVT_DBG_UI_DISABLE_ALL_BREAKPOINTS, clDebugEventHandler(LLDBPlugin::OnDebugDisableAllBreakpoints), NULL, this); EventNotifier::Get()->Disconnect( wxEVT_DBG_UI_NEXT_INST, clDebugEventHandler(LLDBPlugin::OnDebugNextInst), NULL, this); EventNotifier::Get()->Disconnect( wxEVT_DBG_UI_SHOW_CURSOR, clDebugEventHandler(LLDBPlugin::OnDebugShowCursor), NULL, this); }
// Helpers for GUI (Creating ribbon elements to edit props) void CNodePropertyUI::CreateUI() { // mHasUI = true; DestroyUI(); if (mTargetNode) { mNameCtrl = CreateText("Name"); mNameCtrl->SetValue(mTargetNode->GetName().c_str()); mCtrlList.clear(); for (TPropTable::iterator iter = mTargetNode->mPropTable.begin(); iter != mTargetNode->mPropTable.end(); iter++) { if ((*iter).mType == std::string("T")) { wxTextCtrl* control = CreateText((*iter).mName); control->SetValue((*iter).mValue); TControlPair tCtrlPair; tCtrlPair.first = (*iter).mName; tCtrlPair.second = control; mCtrlList.push_back(tCtrlPair); } else if ((*iter).mType == std::string("D")) { // UNIMPLEMENTED!!!!!!!!! //wxTextCtrl* control = CreateText((*iter).mName); //control->SetValue((*iter).mValue); } else if ((*iter).mType == std::string("C")) { wxCheckBox* control = CreateCheckBox((*iter).mName); if ((*iter).mValue == std::string("T")) control->SetValue(true); else control->SetValue(false); TControlPair tCtrlPair; tCtrlPair.first = (*iter).mName; tCtrlPair.second = control; mCtrlList.push_back(tCtrlPair); } } } gEnv->MainFrame->mPropertyPage->Realize(); }