Code::Blocks
SVN r11506
|
Base class for debugger plugins. More...
#include <cbplugin.h>
Classes | |
struct | WatchesDisabledMenuItems |
Public Types | |
enum | DebugWindows { Backtrace, CPURegisters, Disassembly, ExamineMemory, Threads, Watches } |
enum | SyncEditorResult { SyncOk = 0, SyncFileNotFound, SyncFileUnknown } |
Public Member Functions | |
cbDebuggerPlugin (const wxString &guiName, const wxString &settingsName) | |
void | OnAttach () override |
Any descendent plugin should override this virtual method and perform any necessary initialization. More... | |
void | OnRelease (bool appShutDown) override |
void | BuildMenu (wxMenuBar *menuBar) override |
void | BuildModuleMenu (const ModuleType type, wxMenu *menu, const FileTreeData *data=nullptr) override |
bool | BuildToolBar (wxToolBar *toolBar) override |
virtual void | EditorLinesAddedOrRemoved (cbEditor *editor, int startline, int lines) |
Notify the debugger that lines were added or removed in an editor. More... | |
virtual void | OnAttachReal ()=0 |
virtual void | OnReleaseReal (bool appShutDown)=0 |
virtual void | SetupToolsMenu (wxMenu &menu)=0 |
virtual bool | ToolMenuEnabled () const |
virtual bool | SupportsFeature (cbDebuggerFeature::Flags flag)=0 |
virtual cbDebuggerConfiguration * | LoadConfig (const ConfigManagerWrapper &config)=0 |
cbDebuggerConfiguration & | GetActiveConfig () |
void | SetActiveConfig (int index) |
int | GetIndexOfActiveConfig () const |
virtual void | OnConfigurationChange (bool isActive) |
Called when the user clicks OK in Settings -> Debugger... More... | |
virtual bool | Debug (bool breakOnEntry)=0 |
Start a new debugging process. More... | |
virtual void | Continue ()=0 |
Continue running the debugged program. More... | |
virtual bool | RunToCursor (const wxString &filename, int line, const wxString &line_text)=0 |
Run the debugged program until it reaches the cursor at the current editor. More... | |
virtual void | SetNextStatement (const wxString &filename, int line)=0 |
Sets the position of the Program counter to the specified filename:line. More... | |
virtual void | Next ()=0 |
Execute the next instruction and return control to the debugger. More... | |
virtual void | NextInstruction ()=0 |
Execute the next instruction and return control to the debugger. More... | |
virtual void | StepIntoInstruction ()=0 |
Execute the next instruction and return control to the debugger, if the instruction is a function call step into it. More... | |
virtual void | Step ()=0 |
Execute the next instruction, stepping into function calls if needed, and return control to the debugger. More... | |
virtual void | StepOut ()=0 |
Execute the next instruction, stepping out of function calls if needed, and return control to the debugger. More... | |
virtual void | Break ()=0 |
Break the debugging process (stop the debuggee for debugging). More... | |
virtual void | Stop ()=0 |
Stop the debugging process (exit debugging). More... | |
virtual bool | IsRunning () const =0 |
Is the plugin currently debugging? More... | |
virtual bool | IsStopped () const =0 |
Is the plugin stopped on breakpoint? More... | |
virtual bool | IsBusy () const =0 |
Is the plugin processing something? More... | |
virtual int | GetExitCode () const =0 |
Get the exit code of the last debug process. More... | |
virtual int | GetStackFrameCount () const =0 |
virtual cb::shared_ptr< const cbStackFrame > | GetStackFrame (int index) const =0 |
virtual void | SwitchToFrame (int number)=0 |
virtual int | GetActiveStackFrame () const =0 |
virtual cb::shared_ptr< cbBreakpoint > | AddBreakpoint (const wxString &filename, int line)=0 |
Request to add a breakpoint. More... | |
virtual cb::shared_ptr< cbBreakpoint > | AddDataBreakpoint (const wxString &dataExpression)=0 |
Request to add a breakpoint based on a data expression. More... | |
virtual int | GetBreakpointsCount () const =0 |
virtual cb::shared_ptr< cbBreakpoint > | GetBreakpoint (int index)=0 |
virtual cb::shared_ptr< const cbBreakpoint > | GetBreakpoint (int index) const =0 |
virtual void | UpdateBreakpoint (cb::shared_ptr< cbBreakpoint > breakpoint)=0 |
virtual void | DeleteBreakpoint (cb::shared_ptr< cbBreakpoint > breakpoint)=0 |
virtual void | DeleteAllBreakpoints ()=0 |
virtual void | ShiftBreakpoint (int index, int lines_to_shift)=0 |
virtual void | EnableBreakpoint (cb::shared_ptr< cbBreakpoint > breakpoint, bool enable)=0 |
virtual int | GetThreadsCount () const =0 |
virtual cb::shared_ptr< const cbThread > | GetThread (int index) const =0 |
virtual bool | SwitchToThread (int thread_number)=0 |
virtual cb::shared_ptr< cbWatch > | AddWatch (const wxString &symbol)=0 |
virtual void | DeleteWatch (cb::shared_ptr< cbWatch > watch)=0 |
virtual bool | HasWatch (cb::shared_ptr< cbWatch > watch)=0 |
virtual void | ShowWatchProperties (cb::shared_ptr< cbWatch > watch)=0 |
virtual bool | SetWatchValue (cb::shared_ptr< cbWatch > watch, const wxString &value)=0 |
virtual void | ExpandWatch (cb::shared_ptr< cbWatch > watch)=0 |
virtual void | CollapseWatch (cb::shared_ptr< cbWatch > watch)=0 |
virtual void | UpdateWatch (cb::shared_ptr< cbWatch > watch)=0 |
virtual void | OnWatchesContextMenu (wxMenu &menu, const cbWatch &watch, wxObject *property, int &disabledMenus) |
virtual void | SendCommand (const wxString &cmd, bool debugLog)=0 |
virtual void | AttachToProcess (const wxString &pid)=0 |
virtual void | DetachFromProcess ()=0 |
virtual bool | IsAttachedToProcess () const =0 |
virtual void | GetCurrentPosition (wxString &filename, int &line)=0 |
virtual void | OnValueTooltip (const wxString &token, const wxRect &evalRect) |
virtual bool | ShowValueTooltip (int style) |
virtual void | RequestUpdate (DebugWindows window)=0 |
virtual wxString | GetEditorWordAtCaret (const wxPoint *mousePosition=NULL) |
void | ClearActiveMarkFromAllEditors () |
SyncEditorResult | SyncEditor (const wxString &filename, int line, bool setMarker=true) |
void | BringCBToFront () |
void | ShowLog (bool clear) |
void | Log (const wxString &msg, Logger::level level=Logger::info) |
void | DebugLog (const wxString &msg, Logger::level level=Logger::info) |
bool | HasDebugLog () const |
void | ClearLog () |
void | SetupLog (int normalIndex) |
wxString | GetGUIName () const |
wxString | GetSettingsName () const |
Public Member Functions inherited from cbPlugin | |
cbPlugin () | |
In default cbPlugin's constructor the associated PluginInfo structure is filled with default values. More... | |
~cbPlugin () override | |
cbPlugin destructor. More... | |
virtual PluginType | GetType () const |
The plugin must return its type on request. More... | |
virtual int | GetConfigurationPriority () const |
Return the plugin's configuration priority. More... | |
virtual int | GetConfigurationGroup () const |
Return the configuration group for this plugin. More... | |
virtual cbConfigurationPanel * | GetConfigurationPanel (cb_optional wxWindow *parent) |
Return plugin's configuration panel. More... | |
virtual cbConfigurationPanel * | GetProjectConfigurationPanel (cb_optional wxWindow *parent, cb_optional cbProject *project) |
Return plugin's configuration panel for projects. More... | |
virtual void | BuildMenu (cb_optional wxMenuBar *menuBar) |
This method is called by Code::Blocks and is used by the plugin to add any menu items it needs on Code::Blocks's menu bar. More... | |
virtual void | BuildModuleMenu (cb_optional const ModuleType type, cb_optional wxMenu *menu, cb_optional const FileTreeData *data=nullptr) |
This method is called by Code::Blocks core modules (EditorManager, ProjectManager etc) and is used by the plugin to add any menu items it needs in the module's popup menu. More... | |
virtual bool | BuildToolBar (cb_optional wxToolBar *toolBar) |
This method is called by Code::Blocks and is used by the plugin to add any toolbar items it needs on Code::Blocks's toolbar. More... | |
virtual int | GetToolBarPriority () |
This method return the priority of the plugin's toolbar, the less value indicates a more preceding position when C::B starts with no configuration file. More... | |
virtual void | CreateStatusField (cbStatusBar *statusBar) |
This method is called by Code::Blocks and is used by the plugin to add a field on Code::Blocks's statusbar. More... | |
bool | IsAttached () const |
See whether this plugin is attached or not. More... | |
virtual bool | CanDetach () const |
See whether this plugin can be detached (unloaded) or not. More... | |
Protected Types | |
enum | StartType { StartTypeUnknown = 0, StartTypeRun, StartTypeStepInto } |
Protected Member Functions | |
virtual void | ConvertDirectory (wxString &str, wxString base=_T(""), bool relative=true)=0 |
virtual cbProject * | GetProject ()=0 |
virtual void | ResetProject ()=0 |
virtual void | CleanupWhenProjectClosed (cbProject *project)=0 |
virtual bool | CompilerFinished (bool compilerFailed, StartType startType) |
Called when the compilation has finished. More... | |
void | SwitchToDebuggingLayout () |
void | SwitchToPreviousLayout () |
bool | GetDebuggee (wxString &pathToDebuggee, wxString &workingDirectory, ProjectBuildTarget *target) |
bool | EnsureBuildUpToDate (StartType startType) |
bool | WaitingCompilerToFinish () const |
int | RunNixConsole (wxString &consoleTty) |
void | MarkAsStopped () |
Protected Member Functions inherited from cbPlugin | |
virtual void | OnRelease (cb_optional bool appShutDown) |
Any descendent plugin should override this virtual method and perform any necessary de-initialization. More... | |
virtual void | NotImplemented (const wxString &log) const |
This method logs a "Not implemented" message and is provided for convenience only. More... | |
Private Member Functions | |
void | RegisterValueTooltip () |
void | ProcessValueTooltip (CodeBlocksEvent &event) |
void | CancelValueTooltip (CodeBlocksEvent &event) |
void | OnEditorOpened (CodeBlocksEvent &event) |
void | OnProjectActivated (CodeBlocksEvent &event) |
void | OnProjectClosed (CodeBlocksEvent &event) |
void | OnCompilerFinished (CodeBlocksEvent &event) |
Private Attributes | |
wxString | m_PreviousLayout |
cbCompilerPlugin * | m_pCompiler |
bool | m_WaitingCompilerToFinish |
StartType | m_StartType |
int | m_ActiveConfig |
int | m_LogPageIndex |
bool | m_lastLineWasNormal |
wxString | m_guiName |
wxString | m_settingsName |
Additional Inherited Members | |
Protected Attributes inherited from cbPlugin | |
PluginType | m_Type |
Holds the plugin's type. More... | |
bool | m_IsAttached |
Holds the "attached" state. More... | |
Base class for debugger plugins.
This plugin type must offer some pre-defined debug facilities, on top of the generic plugin's.
Definition at line 397 of file cbplugin.h.
Enumerator | |
---|---|
Backtrace | |
CPURegisters | |
Disassembly | |
ExamineMemory | |
Threads | |
Watches |
Definition at line 581 of file cbplugin.h.
|
protected |
Enumerator | |
---|---|
StartTypeUnknown | |
StartTypeRun | |
StartTypeStepInto |
Definition at line 561 of file cbplugin.h.
Enumerator | |
---|---|
SyncOk | |
SyncFileNotFound | |
SyncFileUnknown |
Definition at line 597 of file cbplugin.h.
Definition at line 127 of file cbplugin.cpp.
References cbPlugin::m_Type, and ptDebugger.
|
pure virtual |
Request to add a breakpoint.
file | The file to add the breakpoint based on a file/line pair. |
line | The line number to put the breakpoint in file . |
Implemented in DebuggerGDB.
Referenced by BreakpointsDlg::AddBreakpoint(), and BreakpointsDlg::OnBreakpointAdd().
|
pure virtual |
Request to add a breakpoint based on a data expression.
dataExpression | The data expression to add the breakpoint. |
Implemented in DebuggerGDB.
Referenced by WatchesDlg::OnMenuAddDataBreak().
Implemented in DebuggerGDB.
Referenced by WatchesDropTarget::OnDropText(), and WatchesDlg::RenameWatch().
|
pure virtual |
Implemented in DebuggerGDB.
Referenced by CodeBlocksApp::AttachDebugger().
|
pure virtual |
Break the debugging process (stop the debuggee for debugging).
Implemented in DebuggerGDB.
void cbDebuggerPlugin::BringCBToFront | ( | ) |
Definition at line 913 of file cbplugin.cpp.
References Manager::Get(), and Manager::GetAppWindow().
Referenced by DebuggerGDB::OnCursorChanged(), CDB_driver::ParseOutput(), and GDB_driver::ParseOutput().
|
override |
Definition at line 170 of file cbplugin.cpp.
References Manager::Get(), Manager::GetDebuggerManager(), DebuggerManager::GetMenu(), and cbPlugin::IsAttached().
|
override |
Definition at line 232 of file cbplugin.cpp.
References DebuggerManager::BuildContextMenu(), Manager::Get(), DebuggerManager::GetActiveDebugger(), Manager::GetDebuggerManager(), GetEditorWordAtCaret(), cbPlugin::IsAttached(), IsRunning(), and mtEditorManager.
|
override |
Definition at line 253 of file cbplugin.cpp.
|
private |
Definition at line 978 of file cbplugin.cpp.
References Manager::Get(), Manager::GetDebuggerManager(), DebuggerManager::GetInterfaceFactory(), and cbDebugInterfaceFactory::HideValueTooltip().
Referenced by RegisterValueTooltip().
|
protectedpure virtual |
Implemented in DebuggerGDB.
Referenced by OnProjectClosed().
void cbDebuggerPlugin::ClearActiveMarkFromAllEditors | ( | ) |
Definition at line 290 of file cbplugin.cpp.
References Manager::Get(), EditorManager::GetBuiltinEditor(), Manager::GetEditorManager(), EditorManager::GetEditorsCount(), and cbEditor::SetDebugLine().
Referenced by DebuggerGDB::OnGDBTerminated(), and DebuggerGDB::RunCommand().
void cbDebuggerPlugin::ClearLog | ( | ) |
Definition at line 556 of file cbplugin.cpp.
References TextCtrlLogger::Clear(), Manager::Get(), Manager::GetDebuggerManager(), and DebuggerManager::GetLogger().
|
pure virtual |
Implemented in DebuggerGDB.
Referenced by WatchesDlg::OnCollapse(), and ValueTooltip::OnCollapse().
|
inlineprotectedvirtual |
Called when the compilation has finished.
The compilation is started when EnsureBuildUpToDate is called.
compilerFailed | the compilation failed for some reason. |
startType | it is the same value given to the Debug method, when the debugger session was started. |
Reimplemented in DebuggerGDB.
Definition at line 578 of file cbplugin.h.
Referenced by OnCompilerFinished().
|
pure virtual |
Continue running the debugged program.
Implemented in DebuggerGDB.
|
protectedpure virtual |
Implemented in DebuggerGDB.
Referenced by GetDebuggee().
|
pure virtual |
Start a new debugging process.
Implemented in DebuggerGDB.
void cbDebuggerPlugin::DebugLog | ( | const wxString & | msg, |
Logger::level | level = Logger::info |
||
) |
Definition at line 540 of file cbplugin.cpp.
References Manager::Get(), Manager::GetLogManager(), HasDebugLog(), cbPlugin::IsAttached(), LogManager::Log(), m_lastLineWasNormal, m_LogPageIndex, and wxT.
Referenced by DebuggerDriver::DebugLog(), DebuggerGDB::DoBreak(), DebuggerGDB::DoDebug(), DebuggerGDB::DoSendCommand(), DebuggerGDB::EnableBreakpoint(), DebuggerGDB::LaunchProcess(), CDB_driver::ParseOutput(), GDB_driver::ParseOutput(), RunNixConsole(), and DebuggerGDB::Stop().
|
pure virtual |
Implemented in DebuggerGDB.
|
pure virtual |
Implemented in DebuggerGDB.
Referenced by EditorLinesAddedOrRemoved(), and BreakpointsDlg::OnRemove().
|
pure virtual |
Implemented in DebuggerGDB.
Referenced by ValueTooltip::ClearWatch(), WatchesDlg::DeleteProperty(), WatchesDlg::OnMenuDeleteAll(), and WatchesDlg::RenameWatch().
|
pure virtual |
Implemented in DebuggerGDB.
|
virtual |
Notify the debugger that lines were added or removed in an editor.
This causes the debugger to keep the breakpoints list in-sync with the editors (i.e. what the user sees).
editor | The editor in question. |
startline | The starting line this change took place. |
lines | The number of lines added or removed. If it's a positive number, lines were added. If it's a negative number, lines were removed. |
Definition at line 373 of file cbplugin.cpp.
References DeleteBreakpoint(), GetBreakpoint(), GetBreakpointsCount(), EditorBase::GetFilename(), and ShiftBreakpoint().
Referenced by cbEditor::OnEditorModified().
|
pure virtual |
Implemented in DebuggerGDB.
Referenced by BreakpointsDlg::OnEnable().
|
protected |
Definition at line 670 of file cbplugin.cpp.
References _(), cbDebuggerCommonConfig::AutoBuild, cbCompilerPlugin::Build(), cbMessageBox(), Manager::Get(), PluginManager::GetCompilerPlugins(), cbDebuggerCommonConfig::GetFlag(), Manager::GetPluginManager(), IsAttachedToProcess(), cbCompilerPlugin::IsRunning(), Log(), m_pCompiler, m_StartType, m_WaitingCompilerToFinish, and wxICON_WARNING.
Referenced by DebuggerGDB::Debug().
|
pure virtual |
Implemented in DebuggerGDB.
Referenced by WatchesDlg::OnExpand(), and ValueTooltip::OnExpand().
cbDebuggerConfiguration & cbDebuggerPlugin::GetActiveConfig | ( | ) |
Definition at line 266 of file cbplugin.cpp.
References cbAssert, Manager::Get(), DebuggerManager::GetAllDebuggers(), Manager::GetDebuggerManager(), and m_ActiveConfig.
Referenced by DebuggerGDB::GetActiveConfigEx(), and SwitchToDebuggingLayout().
|
pure virtual |
Implemented in DebuggerGDB.
Referenced by BacktraceDlg::Reload().
|
pure virtual |
Implemented in DebuggerGDB.
Referenced by EditorLinesAddedOrRemoved(), HasBreakpoint(), and cbEditor::RefreshBreakpointMarkers().
|
pure virtual |
Implemented in DebuggerGDB.
|
pure virtual |
Implemented in DebuggerGDB.
Referenced by EditorLinesAddedOrRemoved(), HasBreakpoint(), and cbEditor::RefreshBreakpointMarkers().
|
pure virtual |
Implemented in DebuggerGDB.
Referenced by OnEditorOpened().
|
protected |
Definition at line 612 of file cbplugin.cpp.
References _(), cbMessageBox(), ConvertDirectory(), wxString::empty(), Logger::error, Manager::Get(), CompileTargetBase::GetBasePath(), wxFileName::GetFullPath(), CompileTargetBase::GetHostApplication(), Manager::GetMacrosManager(), CompileTargetBase::GetOutputFilename(), ProjectBuildTarget::GetParentProject(), CompileTargetBase::GetTargetType(), CompileTargetBase::GetWorkingDir(), wxString::IsEmpty(), wxFileName::IsRelative(), Log(), wxFileName::MakeAbsolute(), MacrosManager::ReplaceEnvVars(), ttCommandsOnly, ttConsoleOnly, ttDynamicLib, ttExecutable, ttNative, ttStaticLib, and UnixFilename().
Referenced by DebuggerGDB::DoDebug().
Definition at line 177 of file cbplugin.cpp.
References wxString::find(), Manager::Get(), EditorManager::GetBuiltinActiveEditor(), cbEditor::GetControl(), wxScintilla::GetCurrentPos(), Manager::GetEditorManager(), wxScintilla::GetSelectedText(), wxScintilla::GetSelectionEnd(), wxScintilla::GetSelectionStart(), wxScintilla::GetTextRange(), wxString::length(), wxString::npos, wxScintilla::PositionFromPoint(), wxScintilla::PositionFromPointClose(), wxString::Remove(), wxString::Trim(), wxScintilla::WordEndPosition(), wxScintilla::WordStartPosition(), wxEmptyString, wxSCI_INVALID_POSITION, wxT, wxPoint::x, and wxPoint::y.
Referenced by BuildModuleMenu(), and ProcessValueTooltip().
|
pure virtual |
Get the exit code of the last debug process.
Implemented in DebuggerGDB.
|
inline |
Definition at line 618 of file cbplugin.h.
Referenced by CodeBlocksApp::AttachDebugger(), DebuggerSettingsDlg::CreateConfig(), DebuggerManager::RegisterDebugger(), and SwitchToDebuggingLayout().
int cbDebuggerPlugin::GetIndexOfActiveConfig | ( | ) | const |
Definition at line 285 of file cbplugin.cpp.
References m_ActiveConfig.
|
protectedpure virtual |
Implemented in DebuggerGDB.
Referenced by OnProjectActivated(), and OnProjectClosed().
|
inline |
Definition at line 619 of file cbplugin.h.
Referenced by CodeBlocksApp::AttachDebugger(), DebuggerManager::ProcessSettings(), and DebuggerManager::RegisterDebugger().
|
pure virtual |
Implemented in DebuggerGDB.
Referenced by BacktraceDlg::Reload().
|
pure virtual |
Implemented in DebuggerGDB.
Referenced by BacktraceDlg::Reload().
|
pure virtual |
Implemented in DebuggerGDB.
Referenced by ThreadsDlg::Reload().
|
pure virtual |
Implemented in DebuggerGDB.
Referenced by ThreadsDlg::Reload().
bool cbDebuggerPlugin::HasDebugLog | ( | ) | const |
Definition at line 551 of file cbplugin.cpp.
References cbDebuggerCommonConfig::GetFlag(), and cbDebuggerCommonConfig::ShowDebuggersLog.
Referenced by DebugLog(), and DebuggerGDB::DoSendCommand().
|
pure virtual |
Implemented in DebuggerGDB.
|
pure virtual |
Implemented in DebuggerGDB.
Referenced by EnsureBuildUpToDate(), DebuggerToolbarHandler::OnStop(), DebuggerToolbarHandler::OnUpdateUI(), and ToolMenuEnabled().
|
pure virtual |
Is the plugin processing something?
Implemented in DebuggerGDB.
|
pure virtual |
Is the plugin currently debugging?
Implemented in DebuggerGDB.
Referenced by BuildModuleMenu(), DisassemblyDlg::Clear(), BacktraceDlg::IsSwitchFrameEnabled(), OnEditorOpened(), OnProjectActivated(), OnProjectClosed(), DebuggerToolbarHandler::OnUpdateUI(), DebugLogPanel::OnUpdateUI(), CompilerGCC::StopRunningDebugger(), and ToolMenuEnabled().
|
pure virtual |
Is the plugin stopped on breakpoint?
Implemented in DebuggerGDB.
Referenced by BacktraceDlg::IsSwitchFrameEnabled(), DebuggerToolbarHandler::OnStop(), DebuggerToolbarHandler::OnUpdateUI(), and DebugLogPanel::OnUpdateUI().
|
pure virtual |
Implemented in DebuggerGDB.
Referenced by DebuggerSettingsDlg::CreateConfig(), and DebuggerManager::ProcessSettings().
void cbDebuggerPlugin::Log | ( | const wxString & | msg, |
Logger::level | level = Logger::info |
||
) |
Definition at line 530 of file cbplugin.cpp.
References Manager::Get(), Manager::GetLogManager(), cbPlugin::IsAttached(), LogManager::Log(), m_lastLineWasNormal, m_LogPageIndex, wxEmptyString, and wxT.
Referenced by DebuggerGDB::AddSourceDir(), DebuggerState::ApplyBreakpoints(), DebuggerGDB::DoBreak(), DebuggerGDB::DoDebug(), EnsureBuildUpToDate(), GetDebuggee(), GDB_driver::HandleMainBreakPoint(), DebuggerGDB::LaunchProcess(), DebuggerGDB::LaunchProcessWithShell(), DebuggerDriver::Log(), DebuggerGDB::OnCursorChanged(), DebuggerGDB::OnGDBTerminated(), GDB_driver::ParseOutput(), DebuggerGDB::RunCommand(), RunNixConsole(), DebuggerGDB::SendCommand(), and SyncEditor().
|
protected |
Definition at line 908 of file cbplugin.cpp.
References Manager::Get(), Manager::GetProjectManager(), and ProjectManager::SetIsRunning().
Referenced by DebuggerGDB::OnGDBTerminated(), and DebuggerGDB::RunCommand().
|
pure virtual |
Execute the next instruction and return control to the debugger.
Implemented in DebuggerGDB.
|
pure virtual |
Execute the next instruction and return control to the debugger.
Implemented in DebuggerGDB.
|
overridevirtual |
Any descendent plugin should override this virtual method and perform any necessary initialization.
This method is called by Code::Blocks (PluginManager actually) when the plugin has been loaded and should attach in Code::Blocks. When Code::Blocks starts up, it finds and loads all plugins but does not activate (attaches) them. It then activates all plugins that the user has selected to be activated on start-up.
This means that a plugin might be loaded but not activated...
Think of this method as the actual constructor...
Reimplemented from cbPlugin.
Definition at line 141 of file cbplugin.cpp.
References cbEVT_COMPILER_FINISHED, cbEVT_EDITOR_OPEN, cbEVT_PROJECT_ACTIVATE, cbEVT_PROJECT_CLOSE, Manager::Get(), Manager::GetDebuggerManager(), m_StartType, OnAttachReal(), OnCompilerFinished(), OnEditorOpened(), OnProjectActivated(), OnProjectClosed(), DebuggerManager::RegisterDebugger(), Manager::RegisterEventSink(), RegisterValueTooltip(), StartTypeUnknown, SupportsFeature(), and cbDebuggerFeature::ValueTooltips.
|
pure virtual |
Implemented in DebuggerGDB.
Referenced by OnAttach().
|
private |
Definition at line 713 of file cbplugin.cpp.
References _(), wxString::AfterFirst(), wxString::BeforeFirst(), CompilerFinished(), wxString::Contains(), wxString::Format(), Manager::Get(), wxArrayString::GetCount(), cbCompilerPlugin::GetExitCode(), ProjectManager::GetIsRunning(), Manager::GetProjectManager(), wxArrayString::Item(), m_pCompiler, m_StartType, m_WaitingCompilerToFinish, AnnoyingDialog::rtNO, AnnoyingDialog::rtYES, ProjectManager::SetIsRunning(), ShowLog(), AnnoyingDialog::ShowModal(), wxString::ToLong(), wxString::Trim(), wxART_QUESTION, wxEmptyString, wxEXEC_SYNC, wxExecute(), wxGetProcessId(), wxT, and AnnoyingDialog::YES_NO.
Referenced by OnAttach().
|
inlinevirtual |
Called when the user clicks OK in Settings -> Debugger...
Reimplemented in DebuggerGDB.
Definition at line 435 of file cbplugin.h.
References UpdateWatch().
|
private |
Definition at line 426 of file cbplugin.cpp.
References GetCurrentPosition(), EditorBase::GetFilename(), wxFileName::GetFullPath(), EditorBase::IsBuiltinEditor(), IsRunning(), wxString::IsSameAs(), wxFileName::Normalize(), cbEditor::RefreshBreakpointMarkers(), and cbEditor::SetDebugLine().
Referenced by OnAttach().
|
private |
Definition at line 456 of file cbplugin.cpp.
References _(), cbMessageBox(), Manager::Get(), CodeBlocksEvent::GetProject(), GetProject(), Manager::GetProjectManager(), IsRunning(), ProjectManager::SetProject(), Stop(), wxICON_WARNING, wxID_YES, and wxYES_NO.
Referenced by OnAttach().
|
private |
Definition at line 485 of file cbplugin.cpp.
References _(), CleanupWhenProjectClosed(), Manager::Get(), CodeBlocksEvent::GetProject(), GetProject(), IsRunning(), AnnoyingDialog::OK, ResetProject(), AnnoyingDialog::ShowModal(), Stop(), and wxART_WARNING.
Referenced by OnAttach().
|
override |
Definition at line 161 of file cbplugin.cpp.
References Manager::Get(), Manager::GetDebuggerManager(), OnReleaseReal(), Manager::RemoveAllEventSinksFor(), and DebuggerManager::UnregisterDebugger().
|
pure virtual |
Implemented in DebuggerGDB.
Referenced by OnRelease().
Reimplemented in DebuggerGDB.
Definition at line 934 of file cbplugin.cpp.
Referenced by ProcessValueTooltip().
|
inlinevirtual |
[out] | disabledMenus | A combination of WatchesDisabledMenuItems, which controls which of the default menu items are disabled |
Reimplemented in DebuggerGDB.
Definition at line 541 of file cbplugin.h.
Referenced by WatchesDlg::OnPropertyRightClick().
|
private |
Definition at line 938 of file cbplugin.cpp.
References wxScintilla::CallTipActive(), cbStyledTextCtrl::CallTipCancel(), wxString::empty(), Manager::Get(), cbEditor::GetControl(), GetEditorWordAtCaret(), cbDebuggerCommonConfig::GetFlag(), EditorBase::IsBuiltinEditor(), EditorBase::IsContextMenuOpened(), OnValueTooltip(), cbDebuggerCommonConfig::RequireCtrlForTooltips, ShowValueTooltip(), wxGetKeyState(), WXK_CONTROL, wxPoint::x, and wxPoint::y.
Referenced by RegisterValueTooltip().
|
private |
Definition at line 920 of file cbplugin.cpp.
References CancelValueTooltip(), cbEVT_EDITOR_TOOLTIP, cbEVT_EDITOR_TOOLTIP_CANCEL, Manager::Get(), ProcessValueTooltip(), and Manager::RegisterEventSink().
Referenced by OnAttach().
|
pure virtual |
Implemented in DebuggerGDB.
Referenced by DebuggerMenuHandler::DebuggerMenuHandler(), ExamineMemoryDlg::OnGo(), DisassemblyDlg::OnMixedModeCB(), DisassemblyDlg::OnRefresh(), and ExamineMemoryDlg::SetBaseAddress().
|
protectedpure virtual |
Implemented in DebuggerGDB.
Referenced by OnProjectClosed().
|
protected |
Definition at line 831 of file cbplugin.cpp.
References _(), _T, DebugLog(), DEFAULT_CONSOLE_TERM, Logger::error, F(), Manager::Get(), Manager::GetConfigManager(), Manager::GetMacrosManager(), Log(), ConfigManager::Read(), wxString::Replace(), MacrosManager::ReplaceEnvVars(), wxString::wx_str(), wxEmptyString, wxEXEC_ASYNC, wxExecute(), wxKill(), wxMilliSleep(), wxT, and Manager::Yield().
Referenced by DebuggerGDB::DoDebug().
|
pure virtual |
Run the debugged program until it reaches the cursor at the current editor.
Implemented in DebuggerGDB.
|
pure virtual |
Implemented in DebuggerGDB.
Referenced by DebugLogPanel::OnEntryCommand(), and DebugLogPanel::OnLoadFile().
void cbDebuggerPlugin::SetActiveConfig | ( | int | index | ) |
Definition at line 280 of file cbplugin.cpp.
References m_ActiveConfig.
Referenced by CodeBlocksApp::AttachDebugger(), DebuggerManager::FindTargetsDebugger(), DebuggerManager::RegisterDebugger(), and DebuggerManager::SetActiveDebugger().
|
pure virtual |
Sets the position of the Program counter to the specified filename:line.
Implemented in DebuggerGDB.
void cbDebuggerPlugin::SetupLog | ( | int | normalIndex | ) |
Definition at line 561 of file cbplugin.cpp.
References m_LogPageIndex.
Referenced by DebuggerSettingsDlg::OnOK(), and DebuggerManager::RegisterDebugger().
|
pure virtual |
Implemented in DebuggerGDB.
Referenced by DebuggerToolbarHandler::OnToolInfo().
|
pure virtual |
Implemented in DebuggerGDB.
Referenced by SetValue().
|
pure virtual |
Implemented in DebuggerGDB.
Referenced by EditorLinesAddedOrRemoved().
void cbDebuggerPlugin::ShowLog | ( | bool | clear | ) |
Definition at line 514 of file cbplugin.cpp.
References cbEVT_SHOW_LOG_MANAGER, cbEVT_SWITCH_TO_LOG_WINDOW, TextCtrlLogger::Clear(), Manager::Get(), Manager::GetDebuggerManager(), DebuggerManager::GetLogger(), and Manager::ProcessEvent().
Referenced by OnCompilerFinished(), SwitchToDebuggingLayout(), and SyncEditor().
|
virtual |
Reimplemented in DebuggerGDB.
Definition at line 928 of file cbplugin.cpp.
Referenced by ProcessValueTooltip().
|
pure virtual |
Implemented in DebuggerGDB.
Referenced by WatchesDlg::OnMenuProperties().
|
pure virtual |
Execute the next instruction, stepping into function calls if needed, and return control to the debugger.
Implemented in DebuggerGDB.
|
pure virtual |
Execute the next instruction and return control to the debugger, if the instruction is a function call step into it.
Implemented in DebuggerGDB.
|
pure virtual |
Execute the next instruction, stepping out of function calls if needed, and return control to the debugger.
Implemented in DebuggerGDB.
|
pure virtual |
Stop the debugging process (exit debugging).
Implemented in DebuggerGDB.
Referenced by OnProjectActivated(), OnProjectClosed(), and CompilerGCC::StopRunningDebugger().
|
pure virtual |
Implemented in DebuggerGDB.
Referenced by DebuggerMenuHandler::BuildContextMenu(), OnAttach(), cbEditor::OnBeforeBuildContextMenu(), WatchesDropTarget::OnDropText(), WatchesDlg::OnKeyDown(), WatchesDlg::OnPropertyRightClick(), WatchesDlg::OnPropertySelected(), WatchesDlg::RefreshUI(), DebuggerManager::RefreshUI(), and cbEditor::ToggleBreakpoint().
|
protected |
Definition at line 566 of file cbplugin.cpp.
References _(), cbEVT_QUERY_VIEW_LAYOUT, cbEVT_SWITCH_VIEW_LAYOUT, LogManager::DebugLog(), F(), Manager::Get(), GetActiveConfig(), GetGUIName(), Manager::GetLogManager(), cbDebuggerConfiguration::GetName(), cbDebuggerCommonConfig::GetPerspective(), CodeBlocksLayoutEvent::layout, m_PreviousLayout, cbDebuggerCommonConfig::OnePerDebugger, cbDebuggerCommonConfig::OnePerDebuggerConfig, cbDebuggerCommonConfig::OnlyOne, Manager::ProcessEvent(), ShowLog(), wxString::wx_str(), and wxT.
Referenced by DebuggerGDB::DoDebug().
|
pure virtual |
Implemented in DebuggerGDB.
Referenced by BacktraceDlg::OnSwitchFrame().
|
protected |
Definition at line 600 of file cbplugin.cpp.
References _(), cbEVT_SWITCH_VIEW_LAYOUT, LogManager::DebugLog(), F(), Manager::Get(), Manager::GetLogManager(), wxString::IsEmpty(), CodeBlocksLayoutEvent::layout, m_PreviousLayout, Manager::ProcessEvent(), and wxString::wx_str().
Referenced by DebuggerGDB::OnGDBTerminated().
|
pure virtual |
Implemented in DebuggerGDB.
Referenced by ThreadsDlg::OnSwitchThread().
cbDebuggerPlugin::SyncEditorResult cbDebuggerPlugin::SyncEditor | ( | const wxString & | filename, |
int | line, | ||
bool | setMarker = true |
||
) |
Definition at line 301 of file cbplugin.cpp.
References _(), InfoWindow::Display(), Logger::error, FileTypeOf(), ftHeader, ftOther, ftResource, ftSource, ftTemplateSource, Manager::Get(), ProjectManager::GetActiveProject(), CompileTargetBase::GetBasePath(), EditorManager::GetBuiltinEditor(), Manager::GetEditorManager(), EditorManager::GetEditorsCount(), cbProject::GetFileByFilename(), wxFileName::GetLongPath(), cbEditor::GetProjectFile(), Manager::GetProjectManager(), cbEditor::GotoLine(), wxFileName::IsRelative(), Log(), wxFileName::MakeAbsolute(), EditorManager::Open(), cbEditor::SetDebugLine(), cbEditor::SetProjectFile(), ShowLog(), SyncFileNotFound, SyncFileUnknown, SyncOk, and UnixFilename().
Referenced by DebuggerGDB::OnCursorChanged(), BacktraceDlg::OnJump(), and DebuggerGDB::OnShowFile().
|
virtual |
Definition at line 258 of file cbplugin.cpp.
References Manager::Get(), ProjectManager::GetActiveProject(), cbProject::GetCurrentlyCompilingTarget(), Manager::GetProjectManager(), IsAttachedToProcess(), and IsRunning().
Referenced by DebuggerToolbarHandler::OnUpdateUI().
|
pure virtual |
Implemented in DebuggerGDB.
Referenced by BreakpointsDlg::BreakpointProperties().
|
pure virtual |
Implemented in DebuggerGDB.
Referenced by WatchesDlg::OnMenuUpdate().
|
inlineprotected |
Definition at line 627 of file cbplugin.h.
Referenced by DebuggerGDB::Debug().
|
private |
Definition at line 644 of file cbplugin.h.
Referenced by GetActiveConfig(), GetIndexOfActiveConfig(), and SetActiveConfig().
|
private |
Definition at line 648 of file cbplugin.h.
|
private |
Definition at line 647 of file cbplugin.h.
Referenced by DebugLog(), and Log().
|
private |
Definition at line 646 of file cbplugin.h.
Referenced by DebugLog(), Log(), and SetupLog().
|
private |
Definition at line 639 of file cbplugin.h.
Referenced by EnsureBuildUpToDate(), and OnCompilerFinished().
|
private |
Definition at line 638 of file cbplugin.h.
Referenced by SwitchToDebuggingLayout(), and SwitchToPreviousLayout().
|
private |
Definition at line 648 of file cbplugin.h.
|
private |
Definition at line 642 of file cbplugin.h.
Referenced by EnsureBuildUpToDate(), OnAttach(), and OnCompilerFinished().
|
private |
Definition at line 640 of file cbplugin.h.
Referenced by EnsureBuildUpToDate(), and OnCompilerFinished().