Commit 73aa3e21 authored by hjk's avatar hjk
Browse files

debugger: make parsing of new dumper outpuit a bit more robust

parent e1c8bb40
...@@ -3416,6 +3416,12 @@ void GdbEngine::handleStackFrame2(const GdbResponse &response) ...@@ -3416,6 +3416,12 @@ void GdbEngine::handleStackFrame2(const GdbResponse &response)
out.chop(1); out.chop(1);
//qDebug() << "SECOND CHUNK: " << out; //qDebug() << "SECOND CHUNK: " << out;
out = m_firstChunk + out; out = m_firstChunk + out;
int pos = out.indexOf("locals=");
if (pos != 0) {
qDebug() << "DICARDING JUNK AT BEGIN OF RESPONSE: "
<< out.left(pos);
out = out.mid(pos);
}
GdbMi all("[" + out + "]"); GdbMi all("[" + out + "]");
//GdbMi all(out); //GdbMi all(out);
......
...@@ -1102,7 +1102,7 @@ void WatchHandler::insertData(const WatchData &data) ...@@ -1102,7 +1102,7 @@ void WatchHandler::insertData(const WatchData &data)
qWarning("%s:%d: Attempt to insert invalid watch item: %s", __FILE__, __LINE__, qPrintable(data.toString())); qWarning("%s:%d: Attempt to insert invalid watch item: %s", __FILE__, __LINE__, qPrintable(data.toString()));
return; return;
} }
if (data.isSomethingNeeded()) { if (data.isSomethingNeeded() && data.iname.contains('.')) {
MODEL_DEBUG("SOMETHING NEEDED: " << data.toString()); MODEL_DEBUG("SOMETHING NEEDED: " << data.toString());
m_manager->updateWatchData(data); m_manager->updateWatchData(data);
} else { } else {
......
...@@ -431,7 +431,7 @@ QString decodeData(const QByteArray &ba, int encoding) ...@@ -431,7 +431,7 @@ QString decodeData(const QByteArray &ba, int encoding)
case 5: { // base64 encoded 8 bit data, without quotes (see 1) case 5: { // base64 encoded 8 bit data, without quotes (see 1)
return quoteUnprintableLatin1(QByteArray::fromBase64(ba)); return quoteUnprintableLatin1(QByteArray::fromBase64(ba));
} }
case 7: { // %04x endoded 16 bit data case 7: { // %04x encoded 16 bit data
const QChar doubleQuote(QLatin1Char('"')); const QChar doubleQuote(QLatin1Char('"'));
const QByteArray decodedBa = QByteArray::fromHex(ba); const QByteArray decodedBa = QByteArray::fromHex(ba);
//qDebug() << quoteUnprintableLatin1(decodedBa) << "\n\n"; //qDebug() << quoteUnprintableLatin1(decodedBa) << "\n\n";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment