Made default value of reserveSteppingBreakpoint target config param vary across targets
This commit is contained in:
@@ -204,9 +204,7 @@ TargetConfig::TargetConfig(const YAML::Node& targetNode) {
|
||||
}
|
||||
|
||||
if (targetNode["reserveSteppingBreakpoint"]) {
|
||||
this->reserveSteppingBreakpoint = targetNode["reserveSteppingBreakpoint"].as<bool>(
|
||||
this->reserveSteppingBreakpoint
|
||||
);
|
||||
this->reserveSteppingBreakpoint = targetNode["reserveSteppingBreakpoint"].as<bool>(false);
|
||||
}
|
||||
|
||||
this->targetNode = targetNode;
|
||||
|
||||
@@ -72,7 +72,7 @@ struct TargetConfig
|
||||
/**
|
||||
* Determines if Bloom will reserve a single hardware breakpoint for stepping operations.
|
||||
*/
|
||||
bool reserveSteppingBreakpoint = true;
|
||||
std::optional<bool> reserveSteppingBreakpoint = std::nullopt;
|
||||
|
||||
/**
|
||||
* For extracting any target specific configuration. See Avr8TargetConfig::Avr8TargetConfig() and
|
||||
|
||||
@@ -819,7 +819,7 @@ namespace Targets::Microchip::Avr8
|
||||
maxHardwareBreakpoints,
|
||||
std::nullopt,
|
||||
std::min(
|
||||
static_cast<std::uint16_t>(this->targetConfig.reserveSteppingBreakpoint ? 1 : 0),
|
||||
static_cast<std::uint16_t>(this->targetConfig.reserveSteppingBreakpoint.value_or(true) ? 1 : 0),
|
||||
maxHardwareBreakpoints
|
||||
)
|
||||
};
|
||||
|
||||
@@ -65,7 +65,7 @@ namespace Targets::RiscV::Wch
|
||||
hardwareBreakpointCount,
|
||||
std::nullopt,
|
||||
static_cast<std::uint16_t>(
|
||||
this->targetConfig.reserveSteppingBreakpoint && hardwareBreakpointCount > 0 ? 1 : 0
|
||||
this->targetConfig.reserveSteppingBreakpoint.value_or(false) && hardwareBreakpointCount > 0 ? 1 : 0
|
||||
)
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user