summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhjk <qtc-committer@nokia.com>2010-01-29 15:47:51 +0100
committerhjk <qtc-committer@nokia.com>2010-01-29 15:48:17 +0100
commit0653843d472c820ae9995fbbdbfef2ccda6f4346 (patch)
tree00edd5a963122add89c6125548e0428f4afbe4b1 /src
parent67bf3f2333b4e28903dc2335758ffd34aef582d4 (diff)
downloadqt-creator-0653843d472c820ae9995fbbdbfef2ccda6f4346.tar.gz
debugger: implement stub for qThreadExtraInfo, add some debugging aid
Diffstat (limited to 'src')
-rw-r--r--src/plugins/debugger/gdb/gdbengine.cpp2
-rw-r--r--src/plugins/debugger/gdb/trkgdbadapter.cpp25
2 files changed, 24 insertions, 3 deletions
diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp
index 9ea8aaf673..02d03eab3d 100644
--- a/src/plugins/debugger/gdb/gdbengine.cpp
+++ b/src/plugins/debugger/gdb/gdbengine.cpp
@@ -1510,7 +1510,7 @@ QString GdbEngine::fullName(const QString &fileName)
{
if (fileName.isEmpty())
return QString();
- QTC_ASSERT(!m_sourcesListOutdated, /* */)
+ //QTC_ASSERT(!m_sourcesListOutdated, /* */)
QTC_ASSERT(!m_sourcesListUpdating, /* */)
return m_shortToFullName.value(fileName, QString());
}
diff --git a/src/plugins/debugger/gdb/trkgdbadapter.cpp b/src/plugins/debugger/gdb/trkgdbadapter.cpp
index a8dcbd7d35..5b883f424f 100644
--- a/src/plugins/debugger/gdb/trkgdbadapter.cpp
+++ b/src/plugins/debugger/gdb/trkgdbadapter.cpp
@@ -655,16 +655,28 @@ void TrkGdbAdapter::handleGdbServerCommand(const QByteArray &cmd)
else if (cmd == "g") {
// Read general registers.
if (m_snapshot.registerValid) {
+ //qDebug() << "Using cached register contents";
logMessage(msgGdbPacket(QLatin1String("Read registers")));
sendGdbServerAck();
reportRegisters();
} else {
+ //qDebug() << "Fetching register contents";
+ sendGdbServerAck();
sendTrkMessage(0x12,
TrkCB(handleAndReportReadRegisters),
trkReadRegistersMessage());
}
}
+ else if (cmd == "gg") {
+ // Force re-reading general registers for debugging purpose.
+ sendGdbServerAck();
+ m_snapshot.registerValid = false;
+ sendTrkMessage(0x12,
+ TrkCB(handleAndReportReadRegisters),
+ trkReadRegistersMessage());
+ }
+
else if (cmd.startsWith("Hc")) {
logMessage(msgGdbPacket(QLatin1String("Set thread & continue")));
// Set thread for subsequent operations (`m', `M', `g', `G', et.al.).
@@ -741,6 +753,7 @@ void TrkGdbAdapter::handleGdbServerCommand(const QByteArray &cmd)
//sendGdbServerMessage("E01", "read single unknown register");
}
} else {
+ //qDebug() << "Fetching single register";
sendTrkMessage(0x12,
TrkCB(handleAndReportReadRegister),
trkReadRegistersMessage(), registerNumber);
@@ -796,6 +809,12 @@ void TrkGdbAdapter::handleGdbServerCommand(const QByteArray &cmd)
"qXfer:features:read+");
}
+ else if (cmd.startsWith("qThreadExtraInfo")) {
+ // $qThreadExtraInfo,1f9#55
+ sendGdbServerAck();
+ sendGdbServerMessage(QByteArray("Nothing special").toHex());
+ }
+
else if (cmd == "qfDllInfo") {
// That's the _first_ query package.
// Happens with gdb 6.4.50.20060226-cvs / CodeSourcery.
@@ -1092,6 +1111,7 @@ void TrkGdbAdapter::handleTrkResult(const TrkResult &result)
#if 1
// We almost always need register values, so get them
// now before informing gdb about the stop.s
+ //qDebug() << "Auto-fetching registers";
sendTrkMessage(0x12,
TrkCB(handleAndReportReadRegistersAfterStop),
trkReadRegistersMessage());
@@ -1100,7 +1120,8 @@ void TrkGdbAdapter::handleTrkResult(const TrkResult &result)
// several instruction steps, better avoid the multiple
// roundtrips through TRK in favour of an additional
// roundtrip through gdb. But gdb will ask for all registers.
- sendGdbServerMessage("S05", "Target stopped");
+ //sendGdbServerMessage("S05", "Target stopped");
+ // -- or --
QByteArray ba = "T05";
appendRegister(&ba, RegisterPSGdb, addr);
sendGdbServerMessage(ba, "Registers");
@@ -1453,7 +1474,7 @@ void TrkGdbAdapter::tryAnswerGdbMemoryRequest(bool buffered)
it = m_snapshot.memory.begin();
et = m_snapshot.memory.end();
for ( ; it != et; ++it)
- qDebug() << it.key().from << it.key().to;
+ qDebug() << hexNumber(it.key().from) << hexNumber(it.key().to);
qDebug() << "WANTED" << wanted.from << wanted.to;
#endif
sendGdbServerMessage("E22", "");