mirror of
https://github.com/fadden/6502bench.git
synced 2025-07-28 17:24:32 +00:00
Add offset to PlSymbol
It's useful for extension scripts to be able to get the file offset of symbols in non-addressable regions. One example of this is CHR ROM data for an NES cartridge. However, we were getting the offset by doing an address-to-offset mapping on the plugin side, which by definition doesn't work for non-addressable memory. So we now add the offset to PlSymbol objects for user labels and address region pre-labels. The NES visualizer has been updated to use the new field. Also, fixed a bogus complaint about bank overruns for non-addressable regions.
This commit is contained in:
@@ -3177,7 +3177,7 @@ namespace SourceGen {
|
||||
public void GoToLabel(Symbol sym) {
|
||||
int offset = mProject.FindLabelOffsetByName(sym.Label);
|
||||
if (offset >= 0) {
|
||||
// TODO(someday): jump to correct line for address region pre-labels
|
||||
// TODO(someday): jump to symbol line, not arstart, for address region pre-labels
|
||||
GoToLocation(new NavStack.Location(offset, 0, NavStack.GoToMode.JumpToCodeData),
|
||||
true);
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user