Commit ce9ea72c authored by hjk's avatar hjk Committed by hjk

debugger: allow partial updates to the register set

Change-Id: Iafa2f9a235e3c44e0d225a1700a9c4d202f13959
Reviewed-on: http://codereview.qt-project.org/4887Reviewed-by: default avatarhjk <qthjk@ovi.com>
parent 038c6959
......@@ -1802,8 +1802,8 @@ void CdbEngine::handlePid(const CdbExtensionCommandPtr &reply)
}
}
// Parse CDB gdbmi register syntax
static inline Register parseRegister(const GdbMi &gdbmiReg)
// Parse CDB gdbmi register syntax.
static Register parseRegister(const GdbMi &gdbmiReg)
{
Register reg;
reg.name = gdbmiReg.findChild("name").data();
......@@ -1813,7 +1813,7 @@ static inline Register parseRegister(const GdbMi &gdbmiReg)
reg.name += description.data();
reg.name += ')';
}
reg.value = QString::fromAscii(gdbmiReg.findChild("value").data());
reg.value = gdbmiReg.findChild("value").data();
return reg;
}
......
......@@ -3651,10 +3651,10 @@ void GdbEngine::handleRegisterListValues(const GdbResponse &response)
// 24^done,register-values=[{number="0",value="0xf423f"},...]
const GdbMi values = response.data.findChild("register-values");
QTC_ASSERT(registerCount == values.children().size(), return);
for (int i = 0; i != registerCount; ++i) {
const GdbMi &item = values.children().at(i);
GdbMi val = item.findChild("value");
registers[i].value = _(val.data());
foreach (const GdbMi &item, values.children()) {
const int number = item.findChild("number").data().toInt();
if (number >= 0 && number < registerCount)
registers[number].value = item.findChild("value").data();
}
registerHandler()->setAndMarkRegisters(registers);
}
......
......@@ -54,7 +54,7 @@ public:
* base=0 to QString::toULongLong() should work (C-language conventions).
* Values that cannot be converted (such as 128bit MMX-registers) are
* passed through. */
QString value;
QByteArray value;
int type;
bool changed;
};
......
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