mirror of
https://github.com/SourMesen/Mesen2.git
synced 2025-04-02 10:21:44 -04:00
Debugger: Assembler - Allow using label name without +0 for the first byte of multi-byte labels
This commit is contained in:
parent
6ed7e45bd4
commit
41186ec85a
2 changed files with 5 additions and 5 deletions
|
@ -377,11 +377,6 @@ int32_t ExpressionEvaluator::Evaluate(ExpressionData &data, EvalResultType &resu
|
|||
int64_t labelIndex = token - EvalValues::FirstLabelIndex;
|
||||
if((size_t)labelIndex < data.Labels.size()) {
|
||||
token = _labelManager->GetLabelRelativeAddress(data.Labels[(uint32_t)labelIndex], _cpuType);
|
||||
if(token < -1) {
|
||||
//Label doesn't exist, try to find a matching multi-byte label
|
||||
string label = data.Labels[(uint32_t)labelIndex] + "+0";
|
||||
token = _labelManager->GetLabelRelativeAddress(label, _cpuType);
|
||||
}
|
||||
} else {
|
||||
token = -2;
|
||||
}
|
||||
|
|
|
@ -137,6 +137,11 @@ AddressInfo LabelManager::GetLabelAbsoluteAddress(string& label)
|
|||
int32_t LabelManager::GetLabelRelativeAddress(string &label, CpuType cpuType)
|
||||
{
|
||||
auto result = _codeLabelReverseLookup.find(label);
|
||||
if(result == _codeLabelReverseLookup.end()) {
|
||||
//Label doesn't exist, try to find a matching multi-byte label
|
||||
result = _codeLabelReverseLookup.find(label + "+0");
|
||||
}
|
||||
|
||||
if(result != _codeLabelReverseLookup.end()) {
|
||||
uint64_t key = result->second;
|
||||
MemoryType type = GetKeyMemoryType(key);
|
||||
|
|
Loading…
Add table
Reference in a new issue