Commit 69e00d8f authored by hjk's avatar hjk
Browse files

debugger: fix thumb mode breakpoint setting in trk adapter

parent 54e022a9
......@@ -750,7 +750,7 @@ void TrkGdbAdapter::handleGdbServerCommand(const QByteArray &cmd)
//qDebug() << "ADDR: " << hexNumber(addr) << " LEN: " << len;
logMessage(QString::fromLatin1("Inserting breakpoint at 0x%1, %2")
.arg(addr, 0, 16).arg(len));
const QByteArray ba = trkBreakpointMessage(addr, len, m_session.pid);
const QByteArray ba = trkBreakpointMessage(addr, len, len == 4);
sendTrkMessage(0x1B, TrkCB(handleAndReportSetBreakpoint), ba, addr);
}
......@@ -1266,6 +1266,10 @@ void TrkGdbAdapter::handleAndReportSetBreakpoint(const TrkResult &result)
// Command: 0x80 Acknowledge
// Error: 0x00
// [80 09 00 00 00 00 0A]
if (result.errorCode()) {
logMessage("ERROR: " + result.errorString());
return;
}
uint bpnr = extractInt(result.data.data() + 1);
uint addr = result.cookie.toUInt();
m_session.addressToBP[addr] = bpnr;
......
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