forked from qt-creator/qt-creator
debugger: replace artificial "{console,log}streamoutput" member in GdbMi
Use proper QByteArray member in GdbResponse instead. Less magic, and does not break array-style reponses where all children are assumed to be of the same "type". Change-Id: Ief1efdeb0412f59836e1b2d6f4cb751ddef3216e Reviewed-on: http://codereview.qt.nokia.com/1184 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
This commit is contained in:
@@ -124,16 +124,16 @@ void CoreGdbAdapter::handleTemporaryTargetCore(const GdbResponse &response)
|
||||
return;
|
||||
}
|
||||
|
||||
GdbMi console = response.data.findChild("consolestreamoutput");
|
||||
int pos1 = console.data().indexOf('`');
|
||||
int pos2 = console.data().indexOf('\'');
|
||||
QByteArray console = response.consoleStreamOutput;
|
||||
int pos1 = console.indexOf('`');
|
||||
int pos2 = console.indexOf('\'');
|
||||
if (pos1 == -1 || pos2 == -1) {
|
||||
showMessage(tr("Attach to core failed."), StatusBar);
|
||||
m_engine->notifyEngineSetupFailed();
|
||||
return;
|
||||
}
|
||||
|
||||
m_executable = console.data().mid(pos1 + 1, pos2 - pos1 - 1);
|
||||
m_executable = console.mid(pos1 + 1, pos2 - pos1 - 1);
|
||||
// Strip off command line arguments. FIXME: make robust.
|
||||
int idx = m_executable.indexOf(_c(' '));
|
||||
if (idx >= 0)
|
||||
|
||||
Reference in New Issue
Block a user