本文整理汇总了C++中IDebugger类的典型用法代码示例。如果您正苦于以下问题:C++ IDebugger类的具体用法?C++ IDebugger怎么用?C++ IDebugger使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了IDebugger类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: FindBreakpointById
bool BreakptMgr::DelBreakpoint(const int id)
{
int index = FindBreakpointById(id, m_bps);
if (index == wxNOT_FOUND) {
return false;
}
//remove it from the debugger if it's running
IDebugger *dbgr = DebuggerMgr::Get().GetActiveDebugger();
if (dbgr && dbgr->IsRunning()) {
if (id > FIRST_INTERNAL_ID) {
// This shouldn't happen while the debugger is running (debugger_id should be valid)
// But if it does, assume it was a bp that gdb couldn't create, and just remove from the bp list
} else {
bool contIsNeeded = PauseDebuggerIfNeeded();
if (dbgr->RemoveBreak(id)) {
// Strangely, -break-delete doesn't output any confirmation except for ^done. So do it here
wxString msg = ((m_bps.at(index).bp_type == BP_type_watchpt) ? _("Watchpoint ") : _("Breakpoint "));
ManagerST::Get()->UpdateAddLine(msg + wxString::Format(_("%u deleted"), id));
}
if (contIsNeeded) {
dbgr->Continue();
}
}
}
// Delete all markers before removing bp from the vector. Otherwise if id was the last in a file...
DeleteAllBreakpointMarkers();
m_bps.erase(m_bps.begin()+index);
RefreshBreakpointMarkers();
return true;
}
示例2: dlg
// Add a breakpoint using the 'Properties' dialog
void BreakptMgr::AddBreakpoint()
{
BreakptPropertiesDlg dlg(NULL);
dlg.SetTitle(_("Create a breakpoint or watchpoint"));
LEditor* const editor = clMainFrame::Get()->GetMainBook()->GetActiveEditor();
BreakpointInfo bp;
bp.Create(editor ? editor->GetFileName().GetFullPath() : wxString(), editor ? editor->GetCurrentLine() : -1, GetNextID());
dlg.EnterBPData(bp);
if (dlg.ShowModal() != wxID_OK) {
return;
}
if (AddBreakpoint(dlg.b)) {
IDebugger *dbgr = DebuggerMgr::Get().GetActiveDebugger();
if ((!dlg.b.is_enabled) && dbgr && dbgr->IsRunning()) {
SetBPEnabledState(dlg.b.debugger_id, dlg.b.is_enabled);
}
wxString msg;
if (dlg.b.bp_type == BP_type_watchpt) {
msg = _("Watchpoint successfully added");
} else {
msg = _("Breakpoint successfully added");
}
clMainFrame::Get()->SetStatusMessage(msg, 0);
}
}
示例3: OnMouseMove
void DisplayVariableDlg::OnMouseMove(wxMouseEvent& event)
{
DebuggerInformation debuggerInfo;
IDebugger *dbgr = DebuggerMgr::Get().GetActiveDebugger();
if (dbgr) {
DebuggerMgr::Get().GetDebuggerInformation(dbgr->GetName(), debuggerInfo);
}
if (debuggerInfo.autoExpandTipItems) {
int flags (0);
wxTreeItemId item = m_treeCtrl->HitTest(event.GetPosition(), flags);
if (item.IsOk() && (flags & wxTREE_HITTEST_ONITEMLABEL)) {
if (item != m_hoveredItem) {
m_timer2->Stop();
m_hoveredItem = item;
m_timer2->Start(500, true);
return;
} else
return;
}
m_hoveredItem = wxTreeItemId();
m_timer2->Stop();
}
}
示例4: AddBreakpoint
bool BreakptMgr::AddBreakpoint(const BreakpointInfo &bp)
{
if (bp.bp_type != BP_type_watchpt &&
bp.file.IsEmpty() && bp.function_name.IsEmpty() && bp.memory_address.IsEmpty() && bp.lineno == wxNOT_FOUND) {
// no function nor file? no memory address?
// do nothing then
return true;
}
IDebugger *dbgr = DebuggerMgr::Get().GetActiveDebugger();
if (dbgr && dbgr->IsRunning()) {
// If the debugger is already running, tell it we want a new bp
// If not, they'll all be added together when the debugger does start
bool contIsNeeded = PauseDebuggerIfNeeded();
dbgr->Break(bp);
if (contIsNeeded) {
dbgr->Continue();
}
}
BreakpointInfo newBreakpoint(bp);
SetBestBPType(newBreakpoint);
BreakpointInfoVec_t::const_iterator iter = std::find(m_bps.begin(), m_bps.end(), newBreakpoint);
if ( iter == m_bps.end() ) {
// new breakpoint
m_bps.push_back( newBreakpoint );
}
DeleteAllBreakpointMarkers();
RefreshBreakpointMarkers();
return true;
}
示例5: IsNativeDebuggerRunning
bool DebuggerMgr::IsNativeDebuggerRunning() const
{
std::map<wxString, IDebugger*>::const_iterator iter = m_debuggers.find(m_activeDebuggerName);
if(iter == m_debuggers.end()) { return false; }
IDebugger* d = iter->second;
return d && d->IsRunning();
}
示例6: OnFrameSelected
void DebuggerCallstackView::OnFrameSelected(clCommandEvent& e)
{
e.Skip();
IDebugger* dbgr = DebuggerMgr::Get().GetActiveDebugger();
if(dbgr && dbgr->IsRunning() && ManagerST::Get()->DbgCanInteract()) {
// set the frame
dbgr->QueryFileLine();
}
}
示例7: GetColumnText
void WatchesTable::DoShowMoreDetails(long item)
{
if( item != wxNOT_FOUND ) {
wxString value = GetColumnText(item, 0);
IDebugger *dbgr = DebuggerMgr::Get().GetActiveDebugger();
if ( dbgr && dbgr->IsRunning() && ManagerST::Get()->DbgCanInteract() ) {
dbgr->CreateVariableObject( value, DBG_USERR_WATCHTABLE );
}
}
}
示例8: PauseDebuggerIfNeeded
// If the debugger is running but can't interact, pause it and return true (to flag needs restart)
bool BreakptMgr::PauseDebuggerIfNeeded()
{
IDebugger *dbgr = DebuggerMgr::Get().GetActiveDebugger();
if (dbgr && dbgr->IsRunning() && !ManagerST::Get()->DbgCanInteract()) {
SetExpectingControl(true);
dbgr->Interrupt();
return true;
}
return false;
}
示例9: OnRefreshView
void DebuggerDisassemblyTab::OnRefreshView(clCommandEvent& e)
{
e.Skip();
IDebugger* debugger = DebuggerMgr::Get().GetActiveDebugger();
if(debugger && debugger->IsRunning() && ManagerST::Get()->DbgCanInteract()) {
// Only update disass view if the view is visible
if(ManagerST::Get()->IsDebuggerViewVisible(DebuggerPane::DISASSEMBLY)) {
debugger->ListRegisters();
debugger->Disassemble("", -1);
}
}
}
示例10: RefreshValues
void WatchesTable::RefreshValues()
{
//ask the debugger to update the table
//to trigger the update for the table we issue a simple
//file line update request from the debugger
if (ManagerST::Get()->DbgCanInteract()) {
IDebugger *dbgr = DebuggerMgr::Get().GetActiveDebugger();
if (dbgr && dbgr->IsRunning()) {
dbgr->QueryFileLine();
}
}
}
示例11: SetBPEnabledState
bool BreakptMgr::SetBPEnabledState(const int bid, const bool enable)
{
IDebugger *dbgr = DebuggerMgr::Get().GetActiveDebugger();
if (dbgr && dbgr->IsRunning()) {
// If the debugger is already running, tell it about the new 'enable' level
// If not, it'll happen automatically when the debugger does start
bool contIsNeeded = PauseDebuggerIfNeeded();
bool result = dbgr->SetEnabledState(bid, enable);
if (contIsNeeded) {
dbgr->Continue();
}
return result;
}
return true;
}
示例12: SetBPConditon
bool BreakptMgr::SetBPConditon(const BreakpointInfo& bp)
{
IDebugger *dbgr = DebuggerMgr::Get().GetActiveDebugger();
if (dbgr && dbgr->IsRunning()) {
// If the debugger is already running, tell it about the condition
// If not, it'll happen automatically when the debugger does start
bool contIsNeeded = PauseDebuggerIfNeeded();
bool result = dbgr->SetCondition(bp);
if (contIsNeeded) {
dbgr->Continue();
}
return result;
}
return false;
}
示例13: SetBPIgnoreCount
bool BreakptMgr::SetBPIgnoreCount(const int bid, const int ignorecount)
{
IDebugger *dbgr = DebuggerMgr::Get().GetActiveDebugger();
if (dbgr && dbgr->IsRunning()) {
// If the debugger is already running, tell it about the new ignore level
// If not, it'll happen automatically when the debugger does start
bool contIsNeeded = PauseDebuggerIfNeeded();
bool result = dbgr->SetIgnoreLevel(bid, ignorecount);
if (contIsNeeded) {
dbgr->Continue();
}
return result;
}
return true;
}
示例14: UpdateVariableObjects
void DebuggerTreeListCtrlBase::UpdateVariableObjects()
{
IDebugger *debugger = DebuggerMgr::Get().GetActiveDebugger();
if(!debugger)
return;
wxTreeItemId root = m_listTable->GetRootItem();
wxTreeItemIdValue cookieOne;
wxTreeItemId item = m_listTable->GetFirstChild(root, cookieOne);
while( item.IsOk() ) {
wxString gdbID = DoGetGdbId(item);
if(gdbID.IsEmpty() == false) {
debugger->UpdateVariableObject(gdbID, m_DBG_USERR);
}
item = m_listTable->GetNextChild(root, cookieOne);
}
}
示例15: DelAllBreakpoints
void BreakptMgr::DelAllBreakpoints()
{
IDebugger *dbgr = DebuggerMgr::Get().GetActiveDebugger();
if (dbgr && dbgr->IsRunning()) {
bool contIsNeeded = PauseDebuggerIfNeeded();
dbgr->RemoveAllBreaks();
if (contIsNeeded) {
dbgr->Continue();
}
}
// Delete all markers before clearing m_bps, otherwise we won't know which files they were in
DeleteAllBreakpointMarkers();
m_bps.clear();
m_pendingBreakpointsList.clear(); // Delete any pending bps too
clMainFrame::Get()->GetDebuggerPane()->GetBreakpointView()->Initialize();
}