本文整理汇总了C++中LLDBEvent类的典型用法代码示例。如果您正苦于以下问题:C++ LLDBEvent类的具体用法?C++ LLDBEvent怎么用?C++ LLDBEvent使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了LLDBEvent类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnLLDBStarted
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);
}
示例2: OnLLDBBreakpointsUpdated
void LLDBPlugin::OnLLDBBreakpointsUpdated(LLDBEvent& event)
{
event.Skip();
// update the ui (mainly editors)
// this is done by replacing the breakpoints list with a new one (the updated one we take from LLDB)
m_mgr->SetBreakpoints(LLDBBreakpoint::ToBreakpointInfoVector(event.GetBreakpoints()));
}
示例3: OnLLDBVariableExpanded
void LLDBTooltip::OnLLDBVariableExpanded(LLDBEvent& event)
{
int variableId = event.GetVariableId();
wxUnusedVar(variableId);
std::map<int, wxTreeItemId>::iterator iter = m_itemsPendingExpansion.find(event.GetVariableId());
if(iter == m_itemsPendingExpansion.end()) {
// does not belong to us
event.Skip();
return;
}
wxTreeItemId parentItem = iter->second;
// add the variables to the tree
for(size_t i = 0; i < event.GetVariables().size(); ++i) {
DoAddVariable(parentItem, event.GetVariables().at(i));
}
// Expand the parent item
if(m_treeCtrl->HasChildren(parentItem)) {
m_treeCtrl->Expand(parentItem);
}
// remove it
m_itemsPendingExpansion.erase(iter);
}
示例4: OnLLDBExpressionEvaluated
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));
}
}
示例5: OnLLDBLocalsUpdated
void LLDBLocalsView::OnLLDBLocalsUpdated(LLDBEvent& event)
{
// FIXME: optimize this to only retrieve the top levle variables
// the children should be obtained in the 'OnItemExpading' event handler
event.Skip();
wxWindowUpdateLocker locker(m_treeList);
Enable(true);
m_treeList->DeleteChildren(m_treeList->GetRootItem());
CL_DEBUG("Updating locals view");
DoAddVariableToView(event.GetVariables(), m_treeList->GetRootItem());
}
示例6: OnLLDBBreakpointsUpdated
void MainDialog::OnLLDBBreakpointsUpdated(LLDBEvent& e)
{
e.Skip();
wxString msg;
const LLDBBreakpoint::Vec_t &bps = e.GetBreakpoints();
for(size_t i=0; i<bps.size(); ++i) {
msg << bps.at(i)->ToString() << "\n";
}
m_textCtrlLog->AppendText("Breakpoints updated:\n");
m_textCtrlLog->AppendText( msg );
}
示例7: OnLLDBStopped
void LLDBDebuggerPlugin::OnLLDBStopped(LLDBEvent& event)
{
event.Skip();
wxFileName fn( event.GetFileName() );
CL_DEBUG(wxString() << "CODELITE>> LLDB stopped at " << event.GetFileName() << ":" << event.GetLinenumber() );
if ( fn.FileExists() ) {
if ( m_mgr->OpenFile( fn.GetFullPath(), "", event.GetLinenumber() ) ) {
IEditor* editor = m_mgr->GetActiveEditor();
if ( editor ) {
editor->GetSTC()->ScrollToLine( event.GetLinenumber() );
}
}
}
}
示例8: OnLLDBVariableExpanded
void LLDBLocalsView::OnLLDBVariableExpanded(LLDBEvent& event)
{
int variableId = event.GetVariableId();
// try to locate this item in our map
LLDBLocalsView::IntItemMap_t::iterator iter = m_pendingExpandItems.find(variableId);
if(iter == m_pendingExpandItems.end()) {
// does not belong to us - skip it
event.Skip();
return;
}
// add the variables
DoAddVariableToView(event.GetVariables(), iter->second);
m_pendingExpandItems.erase(iter);
}
示例9: OnLLDBExited
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);
}
}
示例10: OnLLDBRunning
void LLDBPlugin::OnLLDBRunning(LLDBEvent& event)
{
event.Skip();
m_connector.SetCanInteract(false);
// When the IDE loses the focus - clear the debugger marker
ClearDebuggerMarker();
}
示例11: OnLLDBCrashed
void LLDBPlugin::OnLLDBCrashed(LLDBEvent& event)
{
event.Skip();
// Report it as crash only if not going down (i.e. we got an LLDBExit event)
if(!m_connector.IsGoingDown()) {
::wxMessageBox(_("LLDB crashed! Terminating debug session"), "CodeLite", wxOK | wxICON_ERROR | wxCENTER);
}
OnLLDBExited(event);
}
示例12: OnLLDBStarted
void LLDBDebuggerPlugin::OnLLDBStarted(LLDBEvent& event)
{
event.Skip();
m_isRunning = true;
CL_DEBUG("CODELITE>> LLDB started");
wxCommandEvent e2(wxEVT_DEBUG_STARTED);
EventNotifier::Get()->AddPendingEvent( e2 );
}
示例13: OnLLDBExited
void LLDBDebuggerPlugin::OnLLDBExited(LLDBEvent& event)
{
event.Skip();
m_isRunning = false;
CL_DEBUG("CODELITE>> LLDB exited");
// Also notify codelite's event
wxCommandEvent e2(wxEVT_DEBUG_ENDED);
EventNotifier::Get()->AddPendingEvent( e2 );
}
示例14: OnLLDBLaunchSuccess
void LLDBPlugin::OnLLDBLaunchSuccess(LLDBEvent& event)
{
event.Skip();
m_connector.SetCanInteract(true);
m_connector.SetIsRunning(true);
CL_DEBUG("CODELITE>> Applying breakpoints...");
m_connector.ApplyBreakpoints();
m_connector.Next();
}
示例15: OnLLDBStoppedOnEntry
void LLDBPlugin::OnLLDBStoppedOnEntry(LLDBEvent& event)
{
event.Skip();
m_connector.SetCanInteract(true);
m_connector.SetIsRunning(true);
CL_DEBUG("CODELITE>> Applying breakpoints...");
m_connector.ApplyBreakpoints();
CL_DEBUG("CODELITE>> continue...");
m_connector.Continue();
}