Updated MemoryInspectionPane to prevent it from enabling UI too early (before stack pointer retrieval) for RAM
This commit is contained in:
@@ -212,7 +212,7 @@ namespace Bloom::Widgets
|
|||||||
readMemoryTask,
|
readMemoryTask,
|
||||||
&ReadTargetMemory::targetMemoryRead,
|
&ReadTargetMemory::targetMemoryRead,
|
||||||
this,
|
this,
|
||||||
[this] (const Targets::TargetMemoryBuffer& data) {
|
[this, callback] (const Targets::TargetMemoryBuffer& data) {
|
||||||
this->onMemoryRead(data);
|
this->onMemoryRead(data);
|
||||||
|
|
||||||
// Refresh the stack pointer if this is RAM.
|
// Refresh the stack pointer if this is RAM.
|
||||||
@@ -227,31 +227,56 @@ namespace Bloom::Widgets
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
QObject::connect(
|
||||||
|
readStackPointerTask,
|
||||||
|
&InsightWorkerTask::finished,
|
||||||
|
this,
|
||||||
|
[this] {
|
||||||
|
this->refreshButton->stopSpin();
|
||||||
|
|
||||||
|
if (this->targetState == Targets::TargetState::STOPPED) {
|
||||||
|
this->refreshButton->setDisabled(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
if (callback.has_value()) {
|
||||||
|
QObject::connect(
|
||||||
|
readStackPointerTask,
|
||||||
|
&InsightWorkerTask::completed,
|
||||||
|
this,
|
||||||
|
callback.value()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
this->insightWorker.queueTask(readStackPointerTask);
|
this->insightWorker.queueTask(readStackPointerTask);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
QObject::connect(
|
// If we're refreshing RAM, the UI should only be updated once we've retrieved the current stack pointer.
|
||||||
readMemoryTask,
|
if (this->targetMemoryDescriptor.type != Targets::TargetMemoryType::RAM) {
|
||||||
&InsightWorkerTask::finished,
|
|
||||||
this,
|
|
||||||
[this] {
|
|
||||||
this->refreshButton->stopSpin();
|
|
||||||
|
|
||||||
if (this->targetState == Targets::TargetState::STOPPED) {
|
|
||||||
this->refreshButton->setDisabled(false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
if (callback.has_value()) {
|
|
||||||
QObject::connect(
|
QObject::connect(
|
||||||
readMemoryTask,
|
readMemoryTask,
|
||||||
&InsightWorkerTask::completed,
|
&InsightWorkerTask::finished,
|
||||||
this,
|
this,
|
||||||
callback.value()
|
[this] {
|
||||||
|
this->refreshButton->stopSpin();
|
||||||
|
|
||||||
|
if (this->targetState == Targets::TargetState::STOPPED) {
|
||||||
|
this->refreshButton->setDisabled(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (callback.has_value()) {
|
||||||
|
QObject::connect(
|
||||||
|
readMemoryTask,
|
||||||
|
&InsightWorkerTask::completed,
|
||||||
|
this,
|
||||||
|
callback.value()
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this->insightWorker.queueTask(readMemoryTask);
|
this->insightWorker.queueTask(readMemoryTask);
|
||||||
|
|||||||
Reference in New Issue
Block a user