forked from qt-creator/qt-creator
remove fixMac hack
it's broken and nobody seems to have noticed. that might be because the interpreter doesn't care whether something is a list or a tuple. if this is reintroduced for some reason, it should be done directly in the affected code path.
This commit is contained in:
@@ -590,35 +590,6 @@ void GdbEngine::handleResponse()
|
||||
lastTime = QTime::currentTime();
|
||||
}
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
static void fixMac(QByteArray &out)
|
||||
{
|
||||
// HACK: gdb on Mac mixes MI1 and MI2 syntax. Not nice.
|
||||
// it returns: 9^done,locals={{name="a"},{name="w"}}
|
||||
// instead of: 9^done,locals=[{name="a"},{name="w"}]
|
||||
if (!out.contains("locals={{name"))
|
||||
return;
|
||||
|
||||
static const QByteArray termArray("(gdb) ");
|
||||
int pos = out.indexOf(termArray);
|
||||
if (pos == -1)
|
||||
return;
|
||||
|
||||
int pos1 = out.indexOf("={{");
|
||||
if (pos1 == -1)
|
||||
return;
|
||||
|
||||
int pos2 = out.indexOf("]]");
|
||||
if (pos2 == -1)
|
||||
return;
|
||||
|
||||
if (pos1 < pos && pos2 < pos) {
|
||||
out[pos1 + 1] = '[';
|
||||
out[pos2 + 1] = ']';
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void GdbEngine::readGdbStandardError()
|
||||
{
|
||||
qWarning() << "Unexpected gdb stderr:" << m_gdbProc.readAllStandardError();
|
||||
@@ -637,10 +608,6 @@ void GdbEngine::readGdbStandardOutput()
|
||||
|
||||
//qDebug() << "\n\n\nPLUGIN OUT: '" << out.data() << "'\n\n\n";
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
fixMac(out);
|
||||
#endif
|
||||
|
||||
m_inbuffer.append(out);
|
||||
//QTC_ASSERT(!m_inbuffer.isEmpty(), return);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user