Code::Blocks
SVN r11506
|
#include <debuggerstate.h>
Public Member Functions | |
DebuggerState (DebuggerGDB *plugin) | |
~DebuggerState () | |
BreakpointsList const & | GetBreakpoints () const |
bool | StartDriver (ProjectBuildTarget *target) |
void | StopDriver () |
bool | HasDriver () const |
Check so see if Driver exists before getting it. More... | |
DebuggerDriver * | GetDriver () |
Will always return a driver, or throw a code assertion error. More... | |
const DebuggerDriver * | GetDriver () const |
void | CleanUp () |
int | AddBreakpoint (cb::shared_ptr< DebuggerBreakpoint > bp) |
cb::shared_ptr< DebuggerBreakpoint > | AddBreakpoint (const wxString &file, int line, bool temp=false, const wxString &lineText=wxEmptyString) |
cb::shared_ptr< DebuggerBreakpoint > | AddBreakpoint (const wxString &dataAddr, bool onRead=false, bool onWrite=true) |
void | RemoveBreakpoint (int idx, bool removeFromDriver=true) |
void | RemoveBreakpoint (cb::shared_ptr< DebuggerBreakpoint > bp, bool removeFromDriver=true) |
void | RemoveAllBreakpoints () |
void | RemoveAllProjectBreakpoints (cbProject *prj) |
void | ShiftBreakpoint (cb::shared_ptr< DebuggerBreakpoint > bp, int nroflines) |
int | HasBreakpoint (const wxString &file, int line, bool temp) |
cb::shared_ptr< DebuggerBreakpoint > | GetBreakpoint (int idx) |
cb::shared_ptr< DebuggerBreakpoint > | GetBreakpointByNumber (int num) |
const cb::shared_ptr< DebuggerBreakpoint > | GetBreakpointByNumber (int num) const |
void | ResetBreakpoint (cb::shared_ptr< DebuggerBreakpoint > bp) |
void | ApplyBreakpoints () |
Protected Member Functions | |
wxString | ConvertToValidFilename (const wxString &filename) |
Protected Attributes | |
DebuggerGDB * | m_pPlugin |
DebuggerDriver * | m_pDriver |
BreakpointsList | m_Breakpoints |
Definition at line 16 of file debuggerstate.h.
DebuggerState::DebuggerState | ( | DebuggerGDB * | plugin | ) |
Definition at line 28 of file debuggerstate.cpp.
DebuggerState::~DebuggerState | ( | ) |
Definition at line 34 of file debuggerstate.cpp.
int DebuggerState::AddBreakpoint | ( | cb::shared_ptr< DebuggerBreakpoint > | bp | ) |
Definition at line 141 of file debuggerstate.cpp.
References DebuggerDriver::AddBreakpoint(), ConvertToValidFilename(), m_Breakpoints, and m_pDriver.
Referenced by AddBreakpoint(), DebuggerGDB::AddBreakpoint(), DebuggerGDB::AddDataBreakpoint(), GetBreakpoints(), and DebuggerGDB::RunToCursor().
cb::shared_ptr< DebuggerBreakpoint > DebuggerState::AddBreakpoint | ( | const wxString & | file, |
int | line, | ||
bool | temp = false , |
||
const wxString & | lineText = wxEmptyString |
||
) |
Definition at line 103 of file debuggerstate.cpp.
References AddBreakpoint(), DebuggerBreakpoint::bptCode, ConvertToValidFilename(), ProjectManager::FindProjectForFile(), Manager::Get(), Manager::GetProjectManager(), HasBreakpoint(), and RemoveBreakpoint().
cb::shared_ptr< DebuggerBreakpoint > DebuggerState::AddBreakpoint | ( | const wxString & | dataAddr, |
bool | onRead = false , |
||
bool | onWrite = true |
||
) |
Definition at line 129 of file debuggerstate.cpp.
References AddBreakpoint(), and DebuggerBreakpoint::bptData.
void DebuggerState::ApplyBreakpoints | ( | ) |
Definition at line 288 of file debuggerstate.cpp.
References _(), DebuggerDriver::AddBreakpoint(), cbDebuggerPlugin::Log(), m_Breakpoints, m_pDriver, m_pPlugin, and DebuggerDriver::RemoveBreakpoint().
Referenced by DebuggerGDB::DoDebug(), and GetBreakpoints().
void DebuggerState::CleanUp | ( | ) |
Definition at line 83 of file debuggerstate.cpp.
References m_Breakpoints, m_pDriver, DebuggerDriver::RemoveBreakpoint(), and StopDriver().
Referenced by GetBreakpoints(), and DebuggerGDB::OnReleaseReal().
Definition at line 96 of file debuggerstate.cpp.
References _T, and wxString::Replace().
Referenced by AddBreakpoint(), GetBreakpoints(), and HasBreakpoint().
cb::shared_ptr< DebuggerBreakpoint > DebuggerState::GetBreakpoint | ( | int | idx | ) |
Definition at line 243 of file debuggerstate.cpp.
References m_Breakpoints.
Referenced by GetBreakpoints(), and GDB_driver::ParseOutput().
cb::shared_ptr< DebuggerBreakpoint > DebuggerState::GetBreakpointByNumber | ( | int | num | ) |
Definition at line 250 of file debuggerstate.cpp.
References m_Breakpoints.
Referenced by GetBreakpoints(), and GDB_driver::ParseOutput().
const cb::shared_ptr< DebuggerBreakpoint > DebuggerState::GetBreakpointByNumber | ( | int | num | ) | const |
Definition at line 260 of file debuggerstate.cpp.
References m_Breakpoints.
|
inline |
Definition at line 22 of file debuggerstate.h.
References AddBreakpoint(), ApplyBreakpoints(), CleanUp(), ConvertToValidFilename(), GetBreakpoint(), GetBreakpointByNumber(), GetDriver(), HasBreakpoint(), HasDriver(), m_Breakpoints, RemoveAllBreakpoints(), RemoveAllProjectBreakpoints(), RemoveBreakpoint(), ResetBreakpoint(), ShiftBreakpoint(), StartDriver(), StopDriver(), and wxEmptyString.
Referenced by DebuggerGDB::GetBreakpoint(), DebuggerGDB::GetBreakpointsCount(), DebuggerGDB::ShiftBreakpoint(), and DebuggerGDB::UpdateBreakpoint().
DebuggerDriver * DebuggerState::GetDriver | ( | ) |
Will always return a driver, or throw a code assertion error.
Definition at line 72 of file debuggerstate.cpp.
References cbAssert, m_pDriver, and NULL.
Referenced by DebuggerGDB::AddSourceDir(), DebuggerGDB::AddWatch(), DebuggerGDB::DetachFromProcess(), DebuggerGDB::DetermineLanguage(), DebuggerGDB::DoBreak(), DebuggerGDB::DoDebug(), DebuggerGDB::DoWatches(), DebuggerGDB::GetActiveStackFrame(), GetBreakpoints(), DebuggerGDB::GetCurrentPosition(), DebuggerGDB::GetStackFrame(), DebuggerGDB::GetStackFrameCount(), DebuggerGDB::GetThread(), DebuggerGDB::GetThreadsCount(), DebuggerGDB::IsBusy(), DebuggerGDB::IsStopped(), DebuggerGDB::OnCatchThrow(), DebuggerGDB::OnCursorChanged(), DebuggerGDB::OnInfoDLL(), DebuggerGDB::OnInfoFiles(), DebuggerGDB::OnInfoFPU(), DebuggerGDB::OnInfoFrame(), DebuggerGDB::OnInfoSignals(), DebuggerGDB::OnPrintElements(), DebuggerGDB::OnValueTooltip(), DebuggerGDB::ParseOutput(), DebuggerGDB::RunCommand(), DebuggerGDB::SendCommand(), DebuggerGDB::SetNextStatement(), DebuggerGDB::SetWatchValue(), DebuggerGDB::ShowValueTooltip(), DebuggerGDB::Stop(), DebuggerGDB::SwitchToFrame(), DebuggerGDB::SwitchToThread(), and DebuggerGDB::UpdateWatch().
const DebuggerDriver * DebuggerState::GetDriver | ( | ) | const |
Definition at line 77 of file debuggerstate.cpp.
int DebuggerState::HasBreakpoint | ( | const wxString & | file, |
int | line, | ||
bool | temp | ||
) |
Definition at line 230 of file debuggerstate.cpp.
References ConvertToValidFilename(), DebuggerBreakpoint::filename, DebuggerBreakpoint::filenameAsPassed, DebuggerBreakpoint::line, m_Breakpoints, and DebuggerBreakpoint::temporary.
Referenced by AddBreakpoint(), GetBreakpoints(), and GDB_driver::ParseOutput().
bool DebuggerState::HasDriver | ( | ) | const |
Check so see if Driver exists before getting it.
Definition at line 67 of file debuggerstate.cpp.
References m_pDriver, and NULL.
Referenced by DebuggerGDB::AddSourceDir(), DebuggerGDB::Debug(), DebuggerGDB::DetermineLanguage(), DebuggerGDB::DoDebug(), DebuggerGDB::GetActiveStackFrame(), GetBreakpoints(), DebuggerGDB::GetCurrentPosition(), DebuggerGDB::GetThreadsCount(), DebuggerGDB::IsBusy(), DebuggerGDB::IsStopped(), DebuggerGDB::OnCursorChanged(), DebuggerGDB::OnInfoDLL(), DebuggerGDB::OnInfoFiles(), DebuggerGDB::OnInfoFPU(), DebuggerGDB::OnInfoFrame(), DebuggerGDB::OnInfoSignals(), DebuggerGDB::OnReleaseReal(), DebuggerGDB::ParseOutput(), DebuggerGDB::RunCommand(), DebuggerGDB::SendCommand(), DebuggerGDB::SetNextStatement(), DebuggerGDB::SetWatchValue(), DebuggerGDB::ShowValueTooltip(), DebuggerGDB::SwitchToFrame(), DebuggerGDB::SwitchToThread(), and DebuggerGDB::UpdateWatch().
void DebuggerState::RemoveAllBreakpoints | ( | ) |
Definition at line 185 of file debuggerstate.cpp.
References m_Breakpoints, m_pDriver, and DebuggerDriver::RemoveBreakpoint().
Referenced by DebuggerGDB::DeleteAllBreakpoints(), and GetBreakpoints().
void DebuggerState::RemoveAllProjectBreakpoints | ( | cbProject * | prj | ) |
Definition at line 206 of file debuggerstate.cpp.
References m_Breakpoints, m_pDriver, and DebuggerDriver::RemoveBreakpoint().
Referenced by DebuggerGDB::DeleteAllProjectBreakpoints(), and GetBreakpoints().
void DebuggerState::RemoveBreakpoint | ( | int | idx, |
bool | removeFromDriver = true |
||
) |
Definition at line 169 of file debuggerstate.cpp.
References m_Breakpoints, m_pDriver, and DebuggerDriver::RemoveBreakpoint().
Referenced by AddBreakpoint(), DebuggerGDB::DeleteBreakpoint(), GetBreakpoints(), GDB_driver::ParseOutput(), and RemoveBreakpoint().
void DebuggerState::RemoveBreakpoint | ( | cb::shared_ptr< DebuggerBreakpoint > | bp, |
bool | removeFromDriver = true |
||
) |
Definition at line 156 of file debuggerstate.cpp.
References m_Breakpoints, and RemoveBreakpoint().
void DebuggerState::ResetBreakpoint | ( | cb::shared_ptr< DebuggerBreakpoint > | bp | ) |
Definition at line 270 of file debuggerstate.cpp.
References DebuggerDriver::AddBreakpoint(), m_pDriver, and DebuggerDriver::RemoveBreakpoint().
Referenced by DebuggerGDB::EnableBreakpoint(), GetBreakpoints(), and DebuggerGDB::UpdateBreakpoint().
void DebuggerState::ShiftBreakpoint | ( | cb::shared_ptr< DebuggerBreakpoint > | bp, |
int | nroflines | ||
) |
Definition at line 217 of file debuggerstate.cpp.
References DebuggerDriver::AddBreakpoint(), m_pDriver, and DebuggerDriver::RemoveBreakpoint().
Referenced by GetBreakpoints(), and DebuggerGDB::ShiftBreakpoint().
bool DebuggerState::StartDriver | ( | ProjectBuildTarget * | target | ) |
Definition at line 38 of file debuggerstate.cpp.
References DebuggerGDB::GetActiveConfigEx(), DebuggerConfiguration::IsGDB(), m_pDriver, m_pPlugin, and DebuggerDriver::SetTarget().
Referenced by DebuggerGDB::DoDebug(), and GetBreakpoints().
void DebuggerState::StopDriver | ( | ) |
Definition at line 59 of file debuggerstate.cpp.
References m_Breakpoints, and m_pDriver.
Referenced by CleanUp(), GetBreakpoints(), and DebuggerGDB::OnGDBTerminated().
|
protected |
Definition at line 61 of file debuggerstate.h.
Referenced by AddBreakpoint(), ApplyBreakpoints(), CleanUp(), GetBreakpoint(), GetBreakpointByNumber(), GetBreakpoints(), HasBreakpoint(), RemoveAllBreakpoints(), RemoveAllProjectBreakpoints(), RemoveBreakpoint(), and StopDriver().
|
protected |
Definition at line 60 of file debuggerstate.h.
Referenced by AddBreakpoint(), ApplyBreakpoints(), CleanUp(), GetDriver(), HasDriver(), RemoveAllBreakpoints(), RemoveAllProjectBreakpoints(), RemoveBreakpoint(), ResetBreakpoint(), ShiftBreakpoint(), StartDriver(), and StopDriver().
|
protected |
Definition at line 59 of file debuggerstate.h.
Referenced by ApplyBreakpoints(), and StartDriver().