6 #ifndef GDB_DEBUGGER_COMMANDS_H 7 #define GDB_DEBUGGER_COMMANDS_H 43 std::size_t count = 0;
47 if (str[pos] ==
_T(
'0'))
51 if (str[pos] ==
_T(
'x') || str[pos] ==
_T(
'X'))
56 while (str[pos] ==
_T(
'0'))
62 while (count <
sizeof(T) * 2)
64 #if wxCHECK_VERSION(3, 0, 0) 65 switch (str[pos].GetValue())
81 ret |= str[pos] -
_T(
'0');
92 ret |= str[pos] -
_T(
'a') + 10;
103 ret |= str[pos] -
_T(
'A') + 10;
125 static wxRegEx reBT0(
_T(
"#([0-9]+)[ \t]+(.+)[ \t]at[ \t](.+):([0-9]+)"));
126 static wxRegEx reBT1(
_T(
"#([0-9]+)[ \t]+0x([A-Fa-f0-9]+)[ \t]+in[ \t]+(.+)[ \t]+(\\([^)]*\\))[ \t]"));
127 static wxRegEx reBTX(
_T(
"#([0-9]+)[ \t]+0x([A-Fa-f0-9]+)[ \t]+in[ \t]+([^(]+)[ \t]*(\\([^)]*\\)[ \t]*\\([^)]*\\))"));
128 static wxRegEx reBT2(
_T(
"\\)[ \t]+[atfrom]+[ \t]+(.*):([0-9]+)"));
130 static wxRegEx reBT4(
_T(
"#([0-9]+)[ \\t]+(.+)[ \\t]in[ \\t](.+)"));
216 static wxRegEx reNextI(
_T(
"\x1a\x1a(([a-zA-Z]:)?.*?):([0-9]*):([0-9]*):(middle|beg):(.*)"),
233 m_Cmd <<
_T(
"directory ") << dir;
279 m_Cmd <<
_T(
"add-symbol-file ") << file;
307 m_Cmd <<
_T(
"set args ") << args;
326 m_pDriver->
Log(wxString::Format(
_(
"Attaching to program with pid: %d"), pid));
335 for (
unsigned int i = 0; i < lines.
GetCount(); ++i)
337 if (lines[i].StartsWith(
_T(
"Attaching")))
339 else if (lines[i].StartsWith(
wxT(
"Can't "))
340 || lines[i].StartsWith(
wxT(
"Could not attach to process"))
341 || lines[i].StartsWith(
wxT(
"ptrace: No such process")))
372 for (
unsigned int i = 0; i < lines.
GetCount(); ++i)
374 if (lines[i].StartsWith(
_T(
"Detaching")))
389 cb::shared_ptr<DebuggerBreakpoint>
m_BP;
397 if (m_BP->useCondition)
398 m_Cmd <<
_T(
" ") << m_BP->condition;
405 "the debugger responded with the following error:\n" 407 "Do you want to make this an un-conditional breakpoint?"),
409 m_BP->filename.
c_str(),
415 m_BP->useCondition =
false;
418 else if ( m_BP->alreadySet )
434 cb::shared_ptr<DebuggerBreakpoint>
m_BP;
451 if (!m_BP->temporary)
454 m_Cmd << _T(
"tbreak ");
459 if (m_BP->breakOnRead && m_BP->breakOnWrite)
461 else if (m_BP->breakOnRead)
462 m_Cmd << _T(
"rwatch ");
464 m_Cmd << _T(
"watch ");
465 m_Cmd << m_BP->breakAddress;
473 m_Cmd <<
_T(
"rbreak ") << m_BP->func;
477 m_BP->alreadySet =
true;
492 if (!m_BP->func.IsEmpty())
493 m_pDriver->
Log(
_(
"GDB workaround for constructor/destructor breakpoints activated."));
499 if (m_BP->useCondition && !m_BP->condition.IsEmpty())
505 if (m_BP->useIgnoreCount && m_BP->ignoreCount > 0)
514 if (!m_BP->func.IsEmpty())
515 m_pDriver->
Log(
_(
"GDB workaround for constructor/destructor breakpoints activated."));
521 if (m_BP->useCondition && !m_BP->condition.IsEmpty())
523 m_BP->wantsCondition =
true;
527 if (m_BP->useIgnoreCount && m_BP->ignoreCount > 0)
557 cb::shared_ptr<DebuggerBreakpoint>
m_BP;
565 m_Cmd <<
_T(
"output &") << m_BP->breakAddress;
577 m_BP->breakAddress =
_T(
"*") + contents;
600 m_Cmd <<
_T(
"delete breakpoints");
625 cb::shared_ptr<DebuggerBreakpoint>
m_BP;
640 m_resultIndex(resultIndex),
651 m_regExp.
GetMatch(output, 1).ToLong(&index);
652 *m_resultIndex = index;
686 for (
size_t ii = 0; ii < lines.
GetCount(); ++ii)
688 if ( lines[ii].StartsWith(
wxT(
"No symbol table loaded"))
689 || lines[ii].StartsWith(
wxT(
"No executable file specified"))
690 || lines[ii].StartsWith(
wxT(
"No executable specified"))
691 || lines[ii].StartsWith(
wxT(
"Don't know how to run")))
694 m_pDriver->
Log(
_(
"Starting the debuggee failed: ")+lines[ii]);
724 if (pid_str.
ToLong(&pid, 10) && pid != 0)
746 for (
unsigned int i = 0; i < lines.
GetCount(); ++i)
759 long long int number;
767 threads.push_back(cb::shared_ptr<cbThread>(
new cbThread(!active.
empty(), number, info)));
788 m_watch->GetSymbol(symbol);
789 m_watch->GetType(type);
793 switch (m_watch->GetFormat())
797 case Hex:
m_Cmd << _T(
"/x ");
break;
810 if (!m_watch->IsArray() && m_watch->GetFormat() ==
Undefined && type.
Contains(_T(
'[')))
811 m_watch->SetArray(
true);
813 if (m_watch->IsArray() && m_watch->GetArrayCount() > 0)
823 if (m_watch->IsArray() && m_watch->GetArrayCount() > 0)
825 if (m_watch->GetArrayStart() < 1)
826 m_watch->SetArrayParams(1, m_watch->GetArrayCount());
843 m_watch->GetSymbol(symbol);
844 wxString const &msg =
wxT(
"Parsing GDB output failed for '") + symbol +
wxT(
"'!");
845 m_watch->SetValue(msg);
867 m_Cmd << wxT(
"whatis &");
869 m_watch->GetSymbol(symbol);
875 if (m_firstTry && output ==
wxT(
"Attempt to take contents of a non-pointer value."))
882 m_watch->RemoveChildren();
884 m_watch->SetValue(
_(
"Not available in current context!"));
895 if (!m_firstTry && !tmp.
empty())
899 m_watch->GetType(old_type);
902 m_watch->RemoveChildren();
903 m_watch->SetType(tmp);
926 const wxString& w_type = wxEmptyString,
const wxString& address = wxEmptyString)
932 m_autoDereferenced(false)
938 m_What =
wxT(
"*") + m_What;
939 m_autoDereferenced =
true;
949 contents.
Trim(
false);
951 cb::shared_ptr<GDBWatch> watch(
new GDBWatch(m_What));
952 watch->SetType(m_Type);
955 if (!m_Address.
empty() && m_autoDereferenced)
960 watch->GetValue(value);
962 watch->SetValue(m_Address);
963 else if (!value.
Contains(m_Address))
964 watch->SetValue(m_Address +
wxT(
": ") + value);
966 watch->SetForTooltip(
true);
967 if (watch->GetChildCount() > 0)
970 if (
Manager::Get()->GetDebuggerManager()->ShowValueTooltip(watch, m_WinRect))
997 if (m_Type.
Last() != _T(
'*'))
1042 singleUsage =
false;
1059 bool GdbCmd_FindTooltipType::singleUsage =
false;
1069 m_doLocals(doLocals)
1078 if ((m_doLocals && output ==
wxT(
"No locals.")) || (!m_doLocals && output ==
wxT(
"No arguments.")))
1080 m_watch->RemoveChildren();
1084 std::vector<GDBLocalVariable> watchStrings;
1087 m_watch->MarkChildsAsRemoved();
1088 for (std::vector<GDBLocalVariable>::const_iterator it = watchStrings.begin(); it != watchStrings.end(); ++it)
1092 cb::shared_ptr<GDBWatch> watch =
AddChild(m_watch, it->name);
1095 m_watch->RemoveMarkedChildren();
1111 ,m_addrchgmode(p_addrchgmode)
1113 m_Cmd <<
_T(
"frame ") << frameno;
1134 int validFrameNumber = -1;
1139 for (
unsigned int i = 0; i < lines.
GetCount(); ++i)
1143 bool matched = MatchLine(sf, hasLineInfo, lines[i]);
1146 if (hasLineInfo && validFrameNumber == -1)
1154 if (validFrameNumber > 0)
1169 if (validFrameNumber >= 0 && validFrameNumber <= static_cast<int>(frames.size()))
1170 validSF = *frames[validFrameNumber];
1171 else if (!frames.empty())
1172 validSF = *frames.front();
1206 hasLineInfo =
false;
1273 m_disassemblyFlavor(disassemblyFlavor)
1275 m_Cmd <<
_T(
"info registers");
1300 if(m_disassemblyFlavor ==
_T(
"set disassembly-flavor or32"))
1302 ParseOutputFromOR32gdbPort(output);
1310 for (
unsigned int i = 0; i < lines.
GetCount(); ++i)
1343 if((output ==
_T(
"")) || (lines.
GetCount()<2))
1349 for (
unsigned int i = 0; i < lines.
GetCount(); i+=2)
1357 RegisterValueString =lines.
Item(i+1);
1364 regValues.
Add(RegisterValueStringToken);
1367 RegisterMnemonicString =lines.
Item(i);
1374 regMnemonics.
Add(RegisterMnemonicStringToken);
1378 for (
unsigned int j = 0; j < regMnemonics.
GetCount(); j++)
1400 , m_mixedMode(MixedMode)
1419 m_Cmd << _T(
" $pc");
1420 else if(
wxT(
"0x") == hexAddrStr.
Left(2) ||
wxT(
"0X") == hexAddrStr.
Left(2))
1454 const wxString disasmerror(
_T(
"No function contains specified address."));
1457 for (
unsigned int i = 0; i < lines.
GetCount(); ++i)
1459 if (lines[i].StartsWith(disasmerror))
1496 m_disassemblyFlavor(disassemblyFlavor),
1497 m_hexAddrStr(hexAddrStr)
1500 if(m_hexAddrStr.
empty())
1504 m_Cmd << _T(
"disassemble $pc,$pc+50\n") ;
1507 m_Cmd << _T(
"disassemble ") << cursor.
address << _T(
"\n") ;
1511 m_Cmd << _T(
"disassemble ") << m_hexAddrStr << _T(
"\n") ;
1513 m_Cmd << _T(
"info frame\n") << _T(
"end");
1520 wxString frame_output, reg_output ;
1522 apos = p_output.
find(
_T(
"Stack level "));
1526 apos = p_output.
length();
1528 reg_output = p_output.
substr(0,apos);
1529 frame_output = p_output.
substr(apos, p_output.
length()-apos);
1533 if(m_hexAddrStr.
empty())
1544 if (lines.Count() <= 2)
1546 size_t firstLine = 0;
1549 if (firstLine + 1 < lines.Count())
1551 bool sameSymbol =
false;
1556 sameSymbol = (LastSymbol == symbol);
1559 LastSymbol = symbol;
1564 if (addr == LastAddr && sameSymbol)
1573 if(!m_hexAddrStr.
empty())
1577 acursor.
address = m_hexAddrStr;
1624 for (
unsigned int i = 0; i < lines.
GetCount(); ++i)
1633 if (lines[i].First(
_T(
':')) == -1)
1638 addr = lines[i].BeforeFirst(
_T(
':'));
1639 memory = lines[i].AfterFirst(
_T(
':'));
1642 size_t pos = memory.
find(
_T(
'x'));
1646 hexbyte << memory[pos + 1];
1647 hexbyte << memory[pos + 2];
1649 pos = memory.find(
_T(
'x'), pos + 1);
1662 m_Cmd <<
_T(
"set remotebaud ") << baud;
1663 driver->
Log(
_(
"Setting serial connection speed to ") + baud);
1706 driver->
Log(
_(
"Connecting to remote target"));
1708 m_pDriver->
Log(
_(
"Invalid settings for remote debugging!"));
1737 errMsg <<
_(
"Can't connect to the remote system.\nVerify your connection settings and that\nthe remote system is reachable/powered-on.");
1738 else if (output.
Contains(
_T(
"Connection refused")))
1739 errMsg <<
_(
"Connection refused by the remote system.\nVerify your connection settings and that\nthe GDB server/proxy is running on the remote system.");
1740 else if (output.
Contains(
_T(
"Malformed response")) ||
1743 errMsg <<
_(
"Connection can't be established.\nVerify your connection settings and that\nthe GDB server/proxy is running on the remote system.");
1745 else if (output.
Contains(
_T(
"Invalid argument")))
1746 errMsg <<
_(
"Invalid argument.\nVerify your connection settings (probably some typo).");
1747 else if (output.
Contains(
_T(
"unknown host")))
1748 errMsg <<
_(
"Unknown host.\nVerify your connection settings (probably some typo).");
1755 errMsg <<
_(
"\nThe exact error message was:\n\n");
1804 if (addrstr.
empty())
1842 if (lines.Count() <= 2)
1844 size_t firstLine = 0;
1848 if (firstLine < lines.Count())
1860 addr.
ToULong((
unsigned long int*)&longAddress, 16);
1896 #endif // DEBUGGER_COMMANDS_H
Command to get a watched variable's type.
DLLIMPORT wxArrayString GetArrayFromString(const wxString &text, const wxString &separator=DEFAULT_ARRAY_SEP, bool trimSpaces=true)
Command that notifies the debugger plugin that the debuggee has been continued.
Command to add a data breakpoint.
GdbCmd_StepInstruction(GDB_driver *driver)
static void Display(const wxString &title, const wxString &message, unsigned int delay=5000, unsigned int hysteresis=1)
GdbCmd_InfoProgram(DebuggerDriver *driver)
virtual void AddHexByte(const wxString &addr, const wxString &hexbyte)=0
virtual void RemoveBreakpoint(cb::shared_ptr< DebuggerBreakpoint > bp)=0
Remove a breakpoint.
void ParseOutput(const wxString &output)
Parses the command's output.
void SetCursor(const Cursor &cursor)
Set debugger's cursor.
void ParseOutput(const wxString &output)
Parses the command's output.
bool IsDisassemblyMixedMode()
DebuggerLanguage g_DebugLanguage
void NotifyCursorChanged()
Called by implementations to notify cursor changes.
cbExamineMemoryDlg * GetExamineMemoryDialog()
Returns a pointer to the memory dialog.
const wxString & GetLine() const
virtual void CenterCurrentLine()=0
void ParseOutput(const wxString &output)
Parses the command's output.
static wxRegEx reBreakpoint(_T("Breakpoint ([0-9]+) at (0x[0-9A-Fa-f]+)"))
static bool GetFlag(Flags flag)
static wxRegEx reExamineMemoryLine(wxT("[ \*(0x[0-9a-f]+)[ <.+>:[ \+(.+)"))
wxString m_disassemblyFlavor
void ShowFile(const wxString &file, int line)
Show a file/line without changing the cursor.
static wxRegEx reDisassemblySource(_T("([0-9]+)[ \(.*)"))
Command to the add symbol files.
static Manager * Get()
Use Manager::Get() to get a pointer to its instance Manager::Get() is guaranteed to never return an i...
Command to setup an exception breakpoint (for a throw or a catch).
wxString substr(size_t nStart=0, size_t nLen=npos) const
void ParseOutput(const wxString &output)
Parses the command's output.
Base class for all Continue type of commands.
void ParseOutput(const wxString &output)
Parses the command's output.
virtual void Continue()=0
cb::shared_ptr< DebuggerBreakpoint > m_BP
GdbCmd_StepIntoInstruction(GDB_driver *driver)
Command to remove a breakpoint.
GdbCmd_ExamineMemory(DebuggerDriver *driver)
static wxString LastSymbol
cb::shared_ptr< GDBWatch > m_watch
virtual void AddSourceLine(int lineno, const wxString &line)=0
void ParseOutput(const wxString &output)
Parses the command's output.
GdbCmd_ChangeFrame(DebuggerDriver *driver, int frameno, int p_addrchgmode=1)
wxString m_Cmd
the actual command
cbCPURegistersDlg * GetCPURegistersDialog()
Returns a pointer to the CPU registers dialog.
bool Matches(const wxString &text, int flags=0) const
static wxRegEx reBT0(_T("#([0-9]+)[ \+(.+)[ \at[ \(.+):([0-9]+)"))
void ParseOutput(const wxString &output)
Parses the command's output.
virtual void Action()
Executes an action.
wxString BeforeLast(wxUniChar ch, wxString *rest=NULL) const
void ParseOutput(const wxString &output)
Parses the command's output.
Command to get info about running threads.
void TokenizeGDBLocals(std::vector< GDBLocalVariable > &results, wxString const &value)
GdbCmd_Continue(DebuggerDriver *driver)
void ParseOutput(const wxString &output)
Parses the command's output.
static wxRegEx reBT4(_T("#([0-9]+)[ \]+(.+)[ \]in[ \](.+)"))
Command to set the arguments to the debuggee.
cb::shared_ptr< DebuggerBreakpoint > m_BP
GdbCmd_StepOrNextInstruction(GDB_driver *driver, const wxChar *command)
void ParseOutput(const wxString &output)
Parses the command's output.
void ParseOutputFromOR32gdbPort(const wxString &output)
void ParseOutput(const wxString &output)
Parses the command's output.
cb::shared_ptr< GDBWatch > m_watch
const ThreadsContainer & GetThreads() const
returns the thread container with the current list of threads
bool ToULong(unsigned long *val, int base=10) const
GdbCmd_Backtrace(DebuggerDriver *driver)
long int line
If -1, no line info.
void ParseOutput(const wxString &output)
Parses the command's output.
void Log(const wxString &msg)
static wxRegEx reDisassemblyInit(_T("^[ \*Stack level [0-9]+, frame at (0x[A-Fa-f0-9]+):"))
wxString AfterFirst(wxUniChar ch) const
void ParseOutput(const wxString &p_output)
Parses the command's output.
std::vector< cb::shared_ptr< cbStackFrame > > StackFrameContainer
bool IsPointerType(wxString type)
DebuggerGDB * GetDebugger()
size_t find(const wxString &str, size_t nStart=0) const
const StackFrameContainer & GetStackFrames() const
returns the container with the current backtrace
Command which tries to find the current cursor position.
Command to initialize a disassembly.
static wxRegEx reTemporaryBreakpoint(wxT("^[Tt]emporary[ \breakpoint[ \([0-9]+)[ \at.*"))
EditorManager * GetEditorManager() const
void SetAddress(uint64_t address)
Command to get info about current program and state.
void LogError(const wxString &msg, int i=app_log)
cb::shared_ptr< GDBWatch > m_watch
void ParseOutput(cb_unused const wxString &output)
Command to get info about a watched variable.
wxUSE_UNICODE_dependent wxChar
static wxRegEx reHWBreakpoint(_T("Hardware assisted breakpoint ([0-9]+) at (0x[0-9A-Fa-f]+)"))
wxString BeforeFirst(wxUniChar ch, wxString *rest=NULL) const
bool Contains(const wxString &str) const
DebuggerManager * GetDebuggerManager() const
GdbCmd_Watch(DebuggerDriver *driver, cb::shared_ptr< GDBWatch > watch)
GdbCmd_SetDebuggee(DebuggerDriver *driver, const wxString &file)
Command to determine the debugging (working) language.
static wxRegEx reBT2(_T("\[ \+[atfrom]+[ \+(.*):([0-9]+)"))
static wxRegEx reDisassemblyInitFunc(_T("eip = (0x[A-Fa-f0-9]+) in ([^;]*)"))
GdbCmd_FindWatchType(DebuggerDriver *driver, cb::shared_ptr< GDBWatch > watch, bool firstTry=true)
GdbCmd_Disassembly(DebuggerDriver *driver, bool MixedMode, wxString hexAddrStr)
Command to add a search directory for source files in debugger's paths.
bool extendedRemote
connect with extended remote or not
static wxRegEx reStepI4(_T("^(0x[A-Fa-f0-9]+) in (.*)? at (.*)"))
EditorBase * GetActiveEditor()
bool ParseGDBWatchValue(cb::shared_ptr< GDBWatch > watch, wxString const &value, int &start, int length)
cbDisassemblyDlg * GetDisassemblyDialog()
Returns a pointer to the disassembly dialog.
Command to change the current frame.
wxString Left(size_t count) const
DebuggerCmd(DebuggerDriver *driver, const wxString &cmd=_T(""), bool logToNormalLog=false)
const wxString & GetFilename() const
static wxRegEx reStepI(wxT("(((.*)[a-zA-Z]:)?.*)?:(\+):(middle|beg):(.*)"), wxRE_ADVANCED)
GdbCmd_Threads(DebuggerDriver *driver)
cbThreadsDlg * GetThreadsDialog()
Returns a pointer to the threads dialog.
virtual bool SetActiveAddress(uint64_t addr)=0
static wxRegEx reBT3(_T("\[ \+[atfrom]+[ \+(.*)"))
void NotifyDebuggeeContinued()
void SetChildPID(long pid)
Set child PID (debuggee's).
bool GetMatch(size_t *start, size_t *len, size_t index=0) const
Command to the set the file to be debugged.
static wxRegEx reInfoProgramThread(_T("\LWP[ \([0-9]+)\"))
LogManager * GetLogManager() const
wxString m_disassemblyFlavor
wxString & Item(size_t nIndex)
virtual void ParseOutput(const wxString &output)
Parses the command's output.
Command to run a backtrace.
Utility command to set a breakpoint condition.
virtual void SetRegisterValue(const wxString ®_name, const wxString &hexValue, const wxString &interpreted)=0
Command to add a breakpoint.
static wxRegEx reBTX(_T("#([0-9]+)[ \+0x([A-Fa-f0-9]+)[ \+in[ \+([^(]+)[ \*(\[^)]*\[ \*\[^)]*\)"))
void QueueCommand(DebuggerCmd *dcmd, QueuePriority prio=Low)
add a command in the queue. The DebuggerCmd will be deleted automatically when finished.
virtual wxString GetBaseAddress()=0
static wxRegEx reDisassemblyCurPC(_T("=>[ \+(0x[A-Fa-f0-9]+)"))
static wxRegEx reStepI2(_T("\(0x[A-Fa-f0-9]+)\+(\+)\+in (.*)"), wxRE_ADVANCED)
GdbCmd_SetCatch(DebuggerDriver *driver, const wxString &type, int *resultIndex)
std::vector< cb::shared_ptr< cbThread > > ThreadsContainer
void SetNumber(int number)
GdbCmd_Start(DebuggerDriver *driver, const wxString &cmd)
virtual void Clear(const cbStackFrame &frame)=0
GdbCmd_AttachToProcess(DebuggerDriver *driver, int pid)
DLLIMPORT uint64_t cbDebuggerStringToAddress(const wxString &address)
Convert a string in hex form to a uint64_t number.
void ParseOutput(const wxString &output)
Parses the command's output.
GdbCmd_DisassemblyInit(DebuggerDriver *driver, wxString disassemblyFlavor=wxEmptyString, wxString hexAddrStr=wxT(""))
void AddWatchNoUpdate(const cb::shared_ptr< GDBWatch > &watch)
GdbCmd_Detach(DebuggerDriver *driver)
MacrosManager * GetMacrosManager() const
const wxString & _(const wxString &string)
wxString & Trim(bool fromRight=true)
GdbCmd_DebugLanguage(DebuggerDriver *driver)
Normal file/line breakpoint.
cb::shared_ptr< GDBWatch > AddChild(cb::shared_ptr< GDBWatch > parent, wxString const &full_value, Token &name)
GdbCmd_RemoveBreakpoint(DebuggerDriver *driver, cb::shared_ptr< DebuggerBreakpoint > bp)
static wxRegEx reGenericHexAddress(_T("(0x[A-Fa-f0-9]+)"))
static wxRegEx reRegisters(_T("([A-z0-9]+)[ \+(0x[0-9A-Fa-f]+)[ \+(.*)"))
void ParseOutput(const wxString &output)
Parses the command's output.
bool ToLong(long *val, int base=10) const
bool HasMoreTokens() const
void ParseOutput(const wxString &output)
Parses the command's output.
static wxRegEx reStepI3(_T("^(0x[A-Fa-f0-9]+) in (.*)? from (.*)"))
Command to the attach to a process.
void SetCurrentFrame(int number, bool user_selected)
static wxRegEx rePendingBreakpoint(_T("Breakpoint ([0-9]+)[ \\\.+):([0-9]+)(\)\[ \pending\"))
bool IsContinueCommand() const override
Tells if the command is a continue type command (continue, step, next and run to cursor commands shou...
virtual void AddAssemblerLine(uint64_t addr, const wxString &line)=0
static wxRegEx reInfoProgramProcess(_T("child process ([0-9]+)"))
static wxRegEx reNextI(_T("\a\a(([a-zA-Z]:)?.*?):([0-9]*):([0-9]*):(middle|beg):(.*)"), wxRE_ADVANCED)
void ReplaceEnvVars(wxString &buffer)
GdbCmd_AddBreakpointCondition(DebuggerDriver *driver, cb::shared_ptr< DebuggerBreakpoint > bp)
cbBacktraceDlg * GetBacktraceDialog()
void ParseOutput(const wxString &output)
Parses the command's output.
cbBreakpointsDlg * GetBreakpointDialog()
Returns a pointer to the breakpoints dialog.
wxString CleanStringValue(wxString value)
GdbCmd_LocalsFuncArgs(DebuggerDriver *driver, cb::shared_ptr< GDBWatch > watch, bool doLocals)
static wxRegEx reDisassembly(_T("(0x[0-9A-Za-z]+)[ \+<.*>:[ \+(.*)"))
GdbCmd_FindCursor(GDB_driver *driver)
void ParseOutput(const wxString &output)
Parses the command's output.
bool ToLongLong(wxLongLong_t *val, int base=10) const
GdbCmd_AddSourceDir(DebuggerDriver *driver, const wxString &dir)
If dir is empty, resets all search dirs to $cdir:$cwd, the default.
void ParseOutput(const wxString &output)
Parses the command's output.
cb::shared_ptr< DebuggerBreakpoint > m_BP
virtual void AddError(const wxString &err)=0
bool EndsWith(const wxString &suffix, wxString *rest=NULL) const
GdbCmd_AddSymbolFile(DebuggerDriver *driver, const wxString &file)
void ParseOutput(const wxString &output)
Parses the command's output.
void MakeValid(bool flag)
void SetFile(const wxString &filename, const wxString &line)
GdbCmd_RemoteBaud(DebuggerDriver *driver, const wxString &baud)
DebuggerDriver * m_pDriver
the driver
GdbCmd_AddBreakpoint(DebuggerDriver *driver, cb::shared_ptr< DebuggerBreakpoint > bp)
cb::shared_ptr< DebuggerBreakpoint > m_BP
size_t Add(const wxString &str, size_t copies=1)
Command to examine a memory region.
void ParseOutput(const wxString &output)
Parses the command's output.
static wxRegEx reDataBreakpoint(_T("Hardware watchpoint ([0-9]+):.*"))
bool StartsWith(const wxString &prefix, wxString *rest=NULL) const
const Cursor & GetCursor() const
Get debugger's cursor.
GdbCmd_SetArguments(DebuggerDriver *driver, const wxString &args)
void ParseOutput(const wxString &output)
Parses the command's output.
Command to obtain register info.
int Find(wxUniChar ch, bool fromEnd=false) const
GdbCmd_AddDataBreakpoint(DebuggerDriver *driver, cb::shared_ptr< DebuggerBreakpoint > bp)
static wxRegEx reDisassemblyInitSymbol(_T("[ \*[er]ip[ \+=[ \+0x[0-9a-f]+[ \+in[ \+(.+)\(.+):([0-9]+)\;"))
GdbCmd_InfoRegisters(DebuggerDriver *driver, wxString disassemblyFlavor=wxEmptyString)
GdbCmd_RemoteTarget(DebuggerDriver *driver, RemoteDebugging *rd)
Command to the detach from the process.
static wxRegEx reDisassemblyInitFuncOR32(_T("PC = (0x[A-Fa-f0-9]+) in ([^;]*)"))
int Printf(const wxString &pszFormat,...)
void ParseOutput(cb_unused const wxString &output)
void SetSymbol(const wxString &symbol)
void ParseOutput(const wxString &output)
Parses the command's output.
Basic interface for debugger commands.
static wxRegEx reInfoThreads(_T("(\*)[ \*([0-9]+)[ \(.*)"))
int GetUserSelectedFrame() const
static wxRegEx reBT1(_T("#([0-9]+)[ \+0x([A-Fa-f0-9]+)[ \+in[ \+(.+)[ \+(\[^)]*\)[ \"))
void ParseOutput(const wxString &output)
Parses the command's output.
Command to run a disassembly.
static wxString Format(const wxString &format,...)
void MarkProgramStopped(bool stopped)
static bool MatchLine(cbStackFrame &sf, bool &hasLineInfo, const wxString &line)
DLLIMPORT int cbMessageBox(const wxString &message, const wxString &caption=wxEmptyString, int style=wxOK, wxWindow *parent=NULL, int x=-1, int y=-1)
wxMessageBox wrapper.
void ParseOutput(const wxString &output)
Parses the command's output.