Code::Blocks  SVN r11506
Classes | Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
DebuggerManager Class Reference

#include <debuggermanager.h>

Inheritance diagram for DebuggerManager:
Collaboration diagram for DebuggerManager:

Classes

struct  PluginData
 

Public Types

typedef std::vector< cbDebuggerConfiguration * > ConfigurationVector
 
typedef std::map< cbDebuggerPlugin *, PluginDataRegisteredPlugins
 

Public Member Functions

bool RegisterDebugger (cbDebuggerPlugin *plugin)
 Called to register a debugger plugin. More...
 
bool UnregisterDebugger (cbDebuggerPlugin *plugin)
 Called to unregister a debugger plugin. More...
 
ConfigManagerWrapper NewConfig (cbDebuggerPlugin *plugin, const wxString &name)
 
void RebuildAllConfigs ()
 
wxMenuGetMenu ()
 
bool HasMenu () const
 
void BuildContextMenu (wxMenu &menu, const wxString &word_at_caret, bool is_running)
 
TextCtrlLoggerGetLogger (int &index)
 
TextCtrlLoggerGetLogger ()
 
void HideLogger ()
 
void SetInterfaceFactory (cbDebugInterfaceFactory *factory)
 
cbDebugInterfaceFactoryGetInterfaceFactory ()
 
void SetMenuHandler (cbDebuggerMenuHandler *handler)
 
cbDebuggerMenuHandlerGetMenuHandler ()
 
cbBacktraceDlgGetBacktraceDialog ()
 
cbBreakpointsDlgGetBreakpointDialog ()
 Returns a pointer to the breakpoints dialog. More...
 
cbCPURegistersDlgGetCPURegistersDialog ()
 Returns a pointer to the CPU registers dialog. More...
 
cbDisassemblyDlgGetDisassemblyDialog ()
 Returns a pointer to the disassembly dialog. More...
 
cbExamineMemoryDlgGetExamineMemoryDialog ()
 Returns a pointer to the memory dialog. More...
 
cbThreadsDlgGetThreadsDialog ()
 Returns a pointer to the threads dialog. More...
 
cbWatchesDlgGetWatchesDialog ()
 Returns a pointer to the watches dialog. More...
 
bool ShowBacktraceDialog ()
 
bool UpdateBacktrace ()
 
bool UpdateCPURegisters ()
 
bool UpdateDisassembly ()
 
bool UpdateExamineMemory ()
 
bool UpdateThreads ()
 
cbDebuggerPluginGetDebuggerHavingWatch (cb::shared_ptr< cbWatch > watch)
 
bool ShowValueTooltip (const cb::shared_ptr< cbWatch > &watch, const wxRect &rect)
 
RegisteredPlugins const & GetAllDebuggers () const
 
RegisteredPluginsGetAllDebuggers ()
 
cbDebuggerPluginGetActiveDebugger ()
 
void SetActiveDebugger (cbDebuggerPlugin *activeDebugger, ConfigurationVector::const_iterator config)
 
void SetTargetsDefaultAsActiveDebugger ()
 
bool IsActiveDebuggerTargetsDefault () const
 
bool IsDisassemblyMixedMode ()
 
void SetDisassemblyMixedMode (bool mixed)
 

Private Member Functions

 DebuggerManager ()
 
 ~DebuggerManager () override
 
void ProcessSettings (RegisteredPlugins::iterator it)
 
void FindTargetsDebugger ()
 
void RefreshUI ()
 
void CreateWindows ()
 
void DestoryWindows ()
 
void OnProjectActivated (CodeBlocksEvent &event)
 
void OnTargetSelected (CodeBlocksEvent &event)
 
void OnSettingsChanged (CodeBlocksEvent &event)
 
void OnPluginLoadingComplete (CodeBlocksEvent &event)
 

Private Attributes

cbDebugInterfaceFactorym_interfaceFactory
 
RegisteredPlugins m_registered
 
cbDebuggerPluginm_activeDebugger
 
cbDebuggerMenuHandlerm_menuHandler
 
cbBacktraceDlgm_backtraceDialog
 
cbBreakpointsDlgm_breakPointsDialog
 
cbCPURegistersDlgm_cpuRegistersDialog
 
cbDisassemblyDlgm_disassemblyDialog
 
cbExamineMemoryDlgm_examineMemoryDialog
 
cbThreadsDlgm_threadsDialog
 
cbWatchesDlgm_watchesDialog
 
TextCtrlLoggerm_logger
 
int m_loggerIndex
 
bool m_isDisassemblyMixedMode
 
bool m_useTargetsDefault
 

Friends

class Mgr< DebuggerManager >
 
class Manager
 

Additional Inherited Members

- Static Public Member Functions inherited from Mgr< DebuggerManager >
static bool Valid ()
 
static DebuggerManagerGet ()
 
static void Free ()
 
- Protected Member Functions inherited from Mgr< DebuggerManager >
 Mgr ()
 
virtual ~Mgr ()
 

Detailed Description

Definition at line 233 of file debuggermanager.h.

Member Typedef Documentation

◆ ConfigurationVector

Definition at line 242 of file debuggermanager.h.

◆ RegisteredPlugins

Definition at line 264 of file debuggermanager.h.

Constructor & Destructor Documentation

◆ DebuggerManager()

DebuggerManager::DebuggerManager ( )
private

◆ ~DebuggerManager()

DebuggerManager::~DebuggerManager ( )
overrideprivate

Member Function Documentation

◆ BuildContextMenu()

void DebuggerManager::BuildContextMenu ( wxMenu menu,
const wxString word_at_caret,
bool  is_running 
)

◆ CreateWindows()

void DebuggerManager::CreateWindows ( )
private

◆ DestoryWindows()

void DebuggerManager::DestoryWindows ( )
private

◆ FindTargetsDebugger()

void DebuggerManager::FindTargetsDebugger ( )
private

◆ GetActiveDebugger()

cbDebuggerPlugin * DebuggerManager::GetActiveDebugger ( )

◆ GetAllDebuggers() [1/2]

DebuggerManager::RegisteredPlugins const & DebuggerManager::GetAllDebuggers ( ) const

◆ GetAllDebuggers() [2/2]

DebuggerManager::RegisteredPlugins & DebuggerManager::GetAllDebuggers ( )

Definition at line 1161 of file debuggermanager.cpp.

References m_registered.

◆ GetBacktraceDialog()

cbBacktraceDlg * DebuggerManager::GetBacktraceDialog ( )

◆ GetBreakpointDialog()

cbBreakpointsDlg * DebuggerManager::GetBreakpointDialog ( )

◆ GetCPURegistersDialog()

cbCPURegistersDlg * DebuggerManager::GetCPURegistersDialog ( )

Returns a pointer to the CPU registers dialog.

It will return nullptr if there are no debugger plugins loaded. Debugger plugin writers can treat it as always returning non-null value.

Definition at line 1075 of file debuggermanager.cpp.

References m_cpuRegistersDialog.

Referenced by CdbCmd_InfoRegisters::ParseOutput(), GdbCmd_InfoRegisters::ParseOutput(), GdbCmd_InfoRegisters::ParseOutputFromOR32gdbPort(), and DebuggerMenuHandler::RegisterDefaultWindowItems().

◆ GetDebuggerHavingWatch()

cbDebuggerPlugin * DebuggerManager::GetDebuggerHavingWatch ( cb::shared_ptr< cbWatch watch)

◆ GetDisassemblyDialog()

cbDisassemblyDlg * DebuggerManager::GetDisassemblyDialog ( )

Returns a pointer to the disassembly dialog.

It will return nullptr if there are no debugger plugins loaded. Debugger plugin writers can treat it as always returning non-null value.

Definition at line 1080 of file debuggermanager.cpp.

References m_disassemblyDialog.

Referenced by DebuggerGDB::OnCursorChanged(), CdbCmd_Disassembly::ParseOutput(), CdbCmd_DisassemblyInit::ParseOutput(), GdbCmd_Disassembly::ParseOutput(), GdbCmd_DisassemblyInit::ParseOutput(), GdbCmd_StepOrNextInstruction::ParseOutput(), DebuggerMenuHandler::RegisterDefaultWindowItems(), and GDB_driver::Start().

◆ GetExamineMemoryDialog()

cbExamineMemoryDlg * DebuggerManager::GetExamineMemoryDialog ( )

Returns a pointer to the memory dialog.

It will return nullptr if there are no debugger plugins loaded. Debugger plugin writers can treat it as always returning non-null value.

Definition at line 1085 of file debuggermanager.cpp.

References m_examineMemoryDialog.

Referenced by GdbCmd_ExamineMemory::GdbCmd_ExamineMemory(), WatchesDlg::OnMenuExamineMemory(), GdbCmd_ExamineMemory::ParseOutput(), and DebuggerMenuHandler::RegisterDefaultWindowItems().

◆ GetInterfaceFactory()

cbDebugInterfaceFactory * DebuggerManager::GetInterfaceFactory ( )

Definition at line 1050 of file debuggermanager.cpp.

References m_interfaceFactory.

Referenced by cbDebuggerPlugin::CancelValueTooltip().

◆ GetLogger() [1/2]

TextCtrlLogger * DebuggerManager::GetLogger ( int &  index)

◆ GetLogger() [2/2]

TextCtrlLogger * DebuggerManager::GetLogger ( )

Definition at line 979 of file debuggermanager.cpp.

Referenced by RegisterDebugger().

◆ GetMenu()

wxMenu * DebuggerManager::GetMenu ( )

◆ GetMenuHandler()

cbDebuggerMenuHandler * DebuggerManager::GetMenuHandler ( )

Definition at line 1060 of file debuggermanager.cpp.

References m_menuHandler.

◆ GetThreadsDialog()

cbThreadsDlg * DebuggerManager::GetThreadsDialog ( )

Returns a pointer to the threads dialog.

It will return nullptr if there are no debugger plugins loaded. Debugger plugin writers can treat it as always returning non-null value.

Definition at line 1090 of file debuggermanager.cpp.

References m_threadsDialog.

Referenced by GdbCmd_Threads::ParseOutput(), and DebuggerMenuHandler::RegisterDefaultWindowItems().

◆ GetWatchesDialog()

cbWatchesDlg * DebuggerManager::GetWatchesDialog ( )

Returns a pointer to the watches dialog.

It will return nullptr if there are no debugger plugins loaded. Debugger plugin writers can treat it as always returning non-null value.

Definition at line 1095 of file debuggermanager.cpp.

References m_watchesDialog.

Referenced by DbgCmd_UpdateWatchesTree::Action(), DebuggerGDB::DoWatches(), DebuggerMenuHandler::OnAddWatch(), DebuggerGDB::OnConfigurationChange(), DebuggerGDB::OnCursorChanged(), WatchesDropTarget::OnDropText(), DebuggerGDB::OnMenuWatchDereference(), and DebuggerMenuHandler::RegisterDefaultWindowItems().

◆ HasMenu()

bool DebuggerManager::HasMenu ( ) const

◆ HideLogger()

void DebuggerManager::HideLogger ( )

◆ IsActiveDebuggerTargetsDefault()

bool DebuggerManager::IsActiveDebuggerTargetsDefault ( ) const

Definition at line 1221 of file debuggermanager.cpp.

References m_activeDebugger, and m_useTargetsDefault.

Referenced by DebuggerMenuHandler::RebuildMenus().

◆ IsDisassemblyMixedMode()

bool DebuggerManager::IsDisassemblyMixedMode ( )

◆ NewConfig()

ConfigManagerWrapper DebuggerManager::NewConfig ( cbDebuggerPlugin plugin,
const wxString name 
)

◆ OnPluginLoadingComplete()

void DebuggerManager::OnPluginLoadingComplete ( CodeBlocksEvent event)
private

◆ OnProjectActivated()

void DebuggerManager::OnProjectActivated ( CodeBlocksEvent event)
private

Definition at line 1348 of file debuggermanager.cpp.

References FindTargetsDebugger(), and m_useTargetsDefault.

Referenced by DebuggerManager().

◆ OnSettingsChanged()

void DebuggerManager::OnSettingsChanged ( CodeBlocksEvent event)
private

◆ OnTargetSelected()

void DebuggerManager::OnTargetSelected ( CodeBlocksEvent event)
private

Definition at line 1354 of file debuggermanager.cpp.

References FindTargetsDebugger(), and m_useTargetsDefault.

Referenced by DebuggerManager().

◆ ProcessSettings()

void DebuggerManager::ProcessSettings ( RegisteredPlugins::iterator  it)
private

◆ RebuildAllConfigs()

void DebuggerManager::RebuildAllConfigs ( )

◆ RefreshUI()

void DebuggerManager::RefreshUI ( )
private

◆ RegisterDebugger()

bool DebuggerManager::RegisterDebugger ( cbDebuggerPlugin plugin)

◆ SetActiveDebugger()

void DebuggerManager::SetActiveDebugger ( cbDebuggerPlugin activeDebugger,
ConfigurationVector::const_iterator  config 
)

◆ SetDisassemblyMixedMode()

void DebuggerManager::SetDisassemblyMixedMode ( bool  mixed)

◆ SetInterfaceFactory()

void DebuggerManager::SetInterfaceFactory ( cbDebugInterfaceFactory factory)

◆ SetMenuHandler()

void DebuggerManager::SetMenuHandler ( cbDebuggerMenuHandler handler)

Definition at line 1055 of file debuggermanager.cpp.

References m_menuHandler.

Referenced by MainFrame::CreateMenubar().

◆ SetTargetsDefaultAsActiveDebugger()

void DebuggerManager::SetTargetsDefaultAsActiveDebugger ( )

◆ ShowBacktraceDialog()

bool DebuggerManager::ShowBacktraceDialog ( )

◆ ShowValueTooltip()

bool DebuggerManager::ShowValueTooltip ( const cb::shared_ptr< cbWatch > &  watch,
const wxRect rect 
)

◆ UnregisterDebugger()

bool DebuggerManager::UnregisterDebugger ( cbDebuggerPlugin plugin)

Called to unregister a debugger plugin.

It is called by cbDebuggerPlugin::OnRelease and it should not be called by the debugger plugins explicitly in their OnReleaseReal methods.

Definition at line 804 of file debuggermanager.cpp.

References DestoryWindows(), Manager::Get(), Manager::GetDebuggerManager(), HideLogger(), Manager::IsAppShuttingDown(), m_activeDebugger, m_menuHandler, m_registered, cbDebuggerMenuHandler::RebuildMenus(), RefreshUI(), and cbDebuggerMenuHandler::SetActiveDebugger().

Referenced by cbDebuggerPlugin::OnRelease().

◆ UpdateBacktrace()

bool DebuggerManager::UpdateBacktrace ( )

◆ UpdateCPURegisters()

bool DebuggerManager::UpdateCPURegisters ( )

◆ UpdateDisassembly()

bool DebuggerManager::UpdateDisassembly ( )

◆ UpdateExamineMemory()

bool DebuggerManager::UpdateExamineMemory ( )

◆ UpdateThreads()

bool DebuggerManager::UpdateThreads ( )

Friends And Related Function Documentation

◆ Manager

friend class Manager
friend

Definition at line 240 of file debuggermanager.h.

◆ Mgr< DebuggerManager >

friend class Mgr< DebuggerManager >
friend

Definition at line 239 of file debuggermanager.h.

Member Data Documentation

◆ m_activeDebugger

cbDebuggerPlugin* DebuggerManager::m_activeDebugger
private

◆ m_backtraceDialog

cbBacktraceDlg* DebuggerManager::m_backtraceDialog
private

◆ m_breakPointsDialog

cbBreakpointsDlg* DebuggerManager::m_breakPointsDialog
private

Definition at line 372 of file debuggermanager.h.

Referenced by CreateWindows(), DestoryWindows(), GetBreakpointDialog(), and RefreshUI().

◆ m_cpuRegistersDialog

cbCPURegistersDlg* DebuggerManager::m_cpuRegistersDialog
private

◆ m_disassemblyDialog

cbDisassemblyDlg* DebuggerManager::m_disassemblyDialog
private

◆ m_examineMemoryDialog

cbExamineMemoryDlg* DebuggerManager::m_examineMemoryDialog
private

◆ m_interfaceFactory

cbDebugInterfaceFactory* DebuggerManager::m_interfaceFactory
private

◆ m_isDisassemblyMixedMode

bool DebuggerManager::m_isDisassemblyMixedMode
private

◆ m_logger

TextCtrlLogger* DebuggerManager::m_logger
private

Definition at line 379 of file debuggermanager.h.

Referenced by GetLogger(), and HideLogger().

◆ m_loggerIndex

int DebuggerManager::m_loggerIndex
private

Definition at line 380 of file debuggermanager.h.

Referenced by GetLogger(), and HideLogger().

◆ m_menuHandler

cbDebuggerMenuHandler* DebuggerManager::m_menuHandler
private

◆ m_registered

RegisteredPlugins DebuggerManager::m_registered
private

◆ m_threadsDialog

cbThreadsDlg* DebuggerManager::m_threadsDialog
private

◆ m_useTargetsDefault

bool DebuggerManager::m_useTargetsDefault
private

◆ m_watchesDialog

cbWatchesDlg* DebuggerManager::m_watchesDialog
private

Definition at line 377 of file debuggermanager.h.

Referenced by CreateWindows(), DestoryWindows(), GetWatchesDialog(), and RefreshUI().


The documentation for this class was generated from the following files: