Skip to content
This repository was archived by the owner on Feb 20, 2024. It is now read-only.

Commit cb92b4a

Browse files
committed
* debugger: Fire cbEVT_DEBUGGER_PAUSED event
Fire the event if the debugger is paused and no future commands are in the queue. Don't send debugger commands within this event, or you will end in a endless loop
1 parent 6decccc commit cb92b4a

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

src/plugins/debuggergdb/cdb_driver.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,14 @@ void CDB_driver::ParseOutput(const wxString& output)
409409
if (notifyChange)
410410
NotifyCursorChanged();
411411

412+
if(m_ProgramIsStopped)
413+
{
414+
// Notify debugger plugins for pause of debug session
415+
PluginManager *plm = Manager::Get()->GetPluginManager();
416+
CodeBlocksEvent evt(cbEVT_DEBUGGER_PAUSED);
417+
plm->NotifyPlugins(evt);
418+
}
419+
412420
buffer.Clear();
413421
}
414422

src/plugins/debuggergdb/gdb_driver.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1074,7 +1074,16 @@ void GDB_driver::ParseOutput(const wxString& output)
10741074
}
10751075

10761076
if (m_ProgramIsStopped)
1077+
{
1078+
if(m_DCmds.GetCount() == 0)
1079+
{
1080+
PluginManager *plm = Manager::Get()->GetPluginManager();
1081+
CodeBlocksEvent evt(cbEVT_DEBUGGER_PAUSED);
1082+
plm->NotifyPlugins(evt);
1083+
}
10771084
RunQueue();
1085+
}
1086+
10781087
}
10791088

10801089

0 commit comments

Comments
 (0)