mirror of
https://github.com/fadden/6502bench.git
synced 2026-04-20 19:16:34 +00:00
Add selectable auto-label styles
SourceGen creates "auto" labels when it finds a reference to an address that doesn't have a label associated with it. The label for address $1234 would be "L1234". This change allows the project to specify alternative label naming conventions, annotating them with information from the cross-reference data. For example, a subroutine entry point (i.e. the target of a JSR) would be "S_1234". (The underscore was added to avoid confusion when an annotation letter is the same as a hex digit.) Also, tweaked the way the preferred clipboard line format is stored in the settings file (was an integer, now an enumeration string).
This commit is contained in:
@@ -311,7 +311,7 @@ namespace SourceGen {
|
||||
// incorporates the address. It's possible through various means to end
|
||||
// up with a user or platform label that matches an auto label, so we
|
||||
// need to do some renaming in that case. Shouldn't happen often.
|
||||
Symbol sym = SymbolTable.GenerateUniqueForAddress(mAnattribs[targetOffset].Address,
|
||||
Symbol sym = AutoLabel.GenerateUniqueForAddress(mAnattribs[targetOffset].Address,
|
||||
mProject.SymbolTable, "L");
|
||||
mAnattribs[targetOffset].Symbol = sym;
|
||||
// This will throw if the symbol already exists. That is the desired
|
||||
|
||||
Reference in New Issue
Block a user