Fixed command execution and detection of gdb. This resolves issue #8.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/11/head
Michele Calgaro 3 years ago
parent a4307635e1
commit ce9107072e
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -220,12 +220,13 @@ void DebuggerDriver::writeCommand()
m_activeCmd = cmd;
TRACE("in writeCommand: " + cmd->m_cmdString);
const char* str = cmd->m_cmdString.local8Bit();
writeStdin(str, cmd->m_cmdString.local8Bit().length());
const char* str = cmd->m_cmdString.local8Bit().data();
size_t cmdStrLen = strlen(str);
writeStdin(str, cmdStrLen);
// write also to log file
if (m_logFile.isOpen()) {
m_logFile.writeBlock(str, cmd->m_cmdString.local8Bit().length());
m_logFile.writeBlock(str, cmdStrLen);
m_logFile.flush();
}

@ -2072,7 +2072,8 @@ bool GdbDriver::parseChangeExecutable(const char* output, TQString& message)
strncmp(output, "Missing separate debuginfo", 26) == 0 ||
strncmp(output, "Try: ", 5) == 0 ||
strncmp(output, "Using host libthread_db", 23) == 0 ||
strncmp(output, "(no debugging symbols found)", 28) == 0)
strncmp(output, "(no debugging symbols found", 27) == 0 ||
strncmp(output, "(No debugging symbols found", 27) == 0)
{
// this line is good, go to the next one
const char* end = strchr(output, '\n');

Loading…
Cancel
Save