In src\plugins\contrib-wip\debuggerGDB_MI\debuggergdb.cpp the OnTimer function is:void DebuggerGDB::OnTimer(cb_unused wxTimerEvent& event)
{
// send any buffered (previous) output
ParseOutput(wxEmptyString);
CheckIfConsoleIsClosed();
wxWakeUpIdle();
}
The ParseOutput function is:
void DebuggerGDB::ParseOutput(const wxString& output)
{
if (!output.IsEmpty() && m_State.HasDriver())
{
m_State.GetDriver()->ParseOutput(output);
}
}
So my conclusion is that the OnTimer line ParseOutput(wxEmptyString);
is redundant. Have I missed something?
Another code snippet to check out, but this one will not slow things down as much as the previous one:
buffer.Remove(idx);
// remove the '>>>>>>' part of the prompt (or whats left of it)
int cnt = 6; // max 6 '>'
while (!buffer.empty() && buffer.Last() == _T('>') && cnt--)
buffer.RemoveLast();
if (!buffer.empty() && buffer.Last() == _T('\n'))
buffer.RemoveLast();
cmd->ParseOutput(buffer.Left(idx));
Check the first line and then ask yourself why the last line is not cmd->ParseOutput(buffer);