mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-18 19:06:10 +00:00
Fix debug seek to PC (#2527)
This commit is contained in:
parent
ac8c0e4175
commit
a78613904e
@ -1581,7 +1581,7 @@ RVA CutterCore::getProgramCounterValue()
|
|||||||
if (currentlyDebugging) {
|
if (currentlyDebugging) {
|
||||||
// Use cmd because cmdRaw would not work with inner command backticked
|
// Use cmd because cmdRaw would not work with inner command backticked
|
||||||
// TODO: Risky command due to changes in API, search for something safer
|
// TODO: Risky command due to changes in API, search for something safer
|
||||||
RVA addr = cmd("dr?`drn PC`").toULongLong(&ok, 16);
|
RVA addr = cmd("dr `drn PC`").toULongLong(&ok, 16);
|
||||||
if (ok) {
|
if (ok) {
|
||||||
return addr;
|
return addr;
|
||||||
}
|
}
|
||||||
@ -1746,9 +1746,7 @@ void CutterCore::attachRemote(const QString &uri)
|
|||||||
connected = true;
|
connected = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Use cmd because cmdRaw would not with inner command backticked
|
seekAndShow(getProgramCounterValue());
|
||||||
QString programCounterValue = cmd("dr?`drn PC`").trimmed();
|
|
||||||
seekAndShow(programCounterValue);
|
|
||||||
if (!connected) {
|
if (!connected) {
|
||||||
emit attachedRemote(false);
|
emit attachedRemote(false);
|
||||||
emit debugTaskStateChanged();
|
emit debugTaskStateChanged();
|
||||||
@ -1868,9 +1866,7 @@ void CutterCore::stopDebug()
|
|||||||
|
|
||||||
void CutterCore::syncAndSeekProgramCounter()
|
void CutterCore::syncAndSeekProgramCounter()
|
||||||
{
|
{
|
||||||
// Use cmd because cmdRaw would not work with inner command backticked
|
seekAndShow(getProgramCounterValue());
|
||||||
QString programCounterValue = cmd("dr?`drn PC`").trimmed();
|
|
||||||
seekAndShow(programCounterValue);
|
|
||||||
emit registersChanged();
|
emit registersChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user