1
0
mirror of https://github.com/fadden/6502bench.git synced 2024-06-12 08:29:29 +00:00

Fix multi-byte local var xrefs

The cross-references for multi-byte local variable table entries were
not showing adjustment values.
This commit is contained in:
Andy McFadden 2020-09-05 18:18:09 -07:00
parent d984e8013a
commit 3f154406d4

View File

@ -1601,10 +1601,9 @@ namespace SourceGen {
} else if (dfd.SymbolRef.IsVariable) {
DefSymbol defSym = lvLookup.GetSymbol(offset, dfd.SymbolRef);
if (defSym != null) {
int adj = 0;
if (operandOffset >= 0) {
adj = defSym.Value - operandOffset;
}
// The operand address and defSym value are both zero-page
// locations, likely outside the file (so no OperandOffset).
int adj = defSym.Value - attr.OperandAddress;
defSym.Xrefs.Add(new XrefSet.Xref(offset, true, xrefType, accType,
accessFlags, adj));
}