void LLDBPlugin::OnLLDBStarted(LLDBEvent& event) { event.Skip(); InitializeUI(); LoadLLDBPerspective(); // If this is a normal debug session, a start notification // should follow a 'Run' command switch(event.GetSessionType()) { case kDebugSessionTypeCore: CL_DEBUG("CODELITE>> LLDB started (core file)"); break; case kDebugSessionTypeAttach: { LLDBSettings settings; m_raisOnBpHit = settings.Load().IsRaiseWhenBreakpointHit(); CL_DEBUG("CODELITE>> LLDB started (attached)"); m_connector.SetAttachedToProcess(event.GetSessionType() == kDebugSessionTypeAttach); // m_connector.Continue(); break; } case kDebugSessionTypeNormal: { LLDBSettings settings; m_raisOnBpHit = settings.Load().IsRaiseWhenBreakpointHit(); CL_DEBUG("CODELITE>> LLDB started (normal)"); m_connector.Run(); break; } } wxCommandEvent e2(wxEVT_DEBUG_STARTED); EventNotifier::Get()->AddPendingEvent(e2); }
void LLDBPlugin::OnLLDBStarted(LLDBEvent& event) { event.Skip(); const auto settings = LLDBSettings().Load(); m_showThreadNames = settings.HasFlag(kLLDBOptionShowThreadNames); m_showFileNamesOnly = settings.HasFlag(kLLDBOptionShowFileNamesOnly); InitializeUI(); LoadLLDBPerspective(); // If this is a normal debug session, a start notification // should follow a 'Run' command switch(event.GetSessionType()) { case kDebugSessionTypeCore: CL_DEBUG("CODELITE>> LLDB started (core file)"); break; case kDebugSessionTypeAttach: { m_raisOnBpHit = settings.IsRaiseWhenBreakpointHit(); CL_DEBUG("CODELITE>> LLDB started (attached)"); m_connector.SetAttachedToProcess(event.GetSessionType() == kDebugSessionTypeAttach); // m_connector.Continue(); break; } case kDebugSessionTypeNormal: { m_raisOnBpHit = settings.IsRaiseWhenBreakpointHit(); CL_DEBUG("CODELITE>> LLDB started (normal)"); m_connector.Run(); break; } } // notify plugins that the debugger just started { clDebugEvent eventStarted(wxEVT_DEBUG_STARTED); eventStarted.SetClientData(NULL); EventNotifier::Get()->ProcessEvent(eventStarted); } }