Corrected bug where memory inspection panes were not automatically fetching data upon the first target halt
This commit is contained in:
@@ -212,8 +212,8 @@ namespace Bloom::Widgets
|
||||
readMemoryTask,
|
||||
&ReadTargetMemory::targetMemoryRead,
|
||||
this,
|
||||
[this] (const Targets::TargetMemoryBuffer& buffer) {
|
||||
this->onMemoryRead(buffer);
|
||||
[this] (const Targets::TargetMemoryBuffer& data) {
|
||||
this->onMemoryRead(data);
|
||||
|
||||
// Refresh the stack pointer if this is RAM.
|
||||
if (this->targetMemoryDescriptor.type == Targets::TargetMemoryType::RAM) {
|
||||
@@ -264,7 +264,7 @@ namespace Bloom::Widgets
|
||||
|
||||
void TargetMemoryInspectionPane::postActivate() {
|
||||
if (
|
||||
this->settings.refreshOnActivation
|
||||
(this->settings.refreshOnActivation || !this->data.has_value())
|
||||
&& this->targetState == Targets::TargetState::STOPPED
|
||||
) {
|
||||
this->refreshMemoryValues([this] {
|
||||
@@ -344,7 +344,7 @@ namespace Bloom::Widgets
|
||||
this->targetState = newState;
|
||||
|
||||
if (newState == TargetState::STOPPED && this->activated) {
|
||||
if (this->settings.refreshOnTargetStop) {
|
||||
if (this->settings.refreshOnTargetStop || !this->data.has_value()) {
|
||||
this->refreshMemoryValues([this] {
|
||||
this->hexViewerWidget->setDisabled(false);
|
||||
});
|
||||
@@ -368,8 +368,11 @@ namespace Bloom::Widgets
|
||||
this->settings.refreshOnActivation = enabled;
|
||||
}
|
||||
|
||||
void TargetMemoryInspectionPane::onMemoryRead(const Targets::TargetMemoryBuffer& buffer) {
|
||||
this->hexViewerWidget->updateValues(buffer);
|
||||
void TargetMemoryInspectionPane::onMemoryRead(const Targets::TargetMemoryBuffer& data) {
|
||||
assert(data.size() == this->targetMemoryDescriptor.size());
|
||||
|
||||
this->data = data;
|
||||
this->hexViewerWidget->updateValues(this->data.value());
|
||||
}
|
||||
|
||||
void TargetMemoryInspectionPane::openMemoryRegionManagerWindow() {
|
||||
|
||||
@@ -48,6 +48,8 @@ namespace Bloom::Widgets
|
||||
const Targets::TargetMemoryDescriptor& targetMemoryDescriptor;
|
||||
InsightWorker& insightWorker;
|
||||
|
||||
std::optional<Targets::TargetMemoryBuffer> data;
|
||||
|
||||
QWidget* container = nullptr;
|
||||
|
||||
QWidget* titleBar = nullptr;
|
||||
@@ -69,7 +71,7 @@ namespace Bloom::Widgets
|
||||
void onTargetStateChanged(Targets::TargetState newState);
|
||||
void setRefreshOnTargetStopEnabled(bool enabled);
|
||||
void setRefreshOnActivationEnabled(bool enabled);
|
||||
void onMemoryRead(const Targets::TargetMemoryBuffer& buffer);
|
||||
void onMemoryRead(const Targets::TargetMemoryBuffer& data);
|
||||
void openMemoryRegionManagerWindow();
|
||||
void onMemoryRegionsChange();
|
||||
void onProgrammingModeEnabled();
|
||||
|
||||
Reference in New Issue
Block a user