You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We can introduce a notion of "label aliases" that associate a second label with a single file offset.
I've found a couple of projects in the wild that were trying to do something similar by using the address region pre-label feature, but that's not intended for this purpose.
Things to be figured out:
How to display on screen. Probably just put the label on a line by itself, like we do for address region pre-labels. The alias comes first, on its own line, immediately before the primary definition. (It'd be nifty to figure out how to put long comments between the alias and primary, but that might be awkward.)
Editor UI definition. Could add an always-present second text field to Edit Label, or add an "add alias" button. Assuming the feature is used rarely, a multi-click but low-clutter option would be preferred. I do think this belongs within the Edit Label dialog; adding to the app menu seems wrong.
Double-clicking on the alias must open the correct editor. Could allow deletion with the Del key, or require use of the dialog.
Various minor symbol stuff:
Add the alias to the Symbols list. (Don't think we need a new filter button for them.)
Make cross-references work, i.e. show the correct References when the alias line is selected.
Make sure "goto symbol" works.
Impact on label localization during asm generation. We'd presumably want to allow the alias to be local or global, so the label localizer would need to be updated to handle them. (Pre-labels are always global.)
Address resolution. The primary label is always the one used when automatically resolving an address reference. The alias label must be specified explicitly. (Could have an affordance in the Edit Operand dialogs that lets you switch between them with one click.)
The text was updated successfully, but these errors were encountered:
Sometimes an address represents more than one thing. A somewhat contrived example:
It might be more readable to separate the entry point from the loop:
This can also be useful for data items. For example, suppose we have variables that are accessed directly and by index:
We'd really prefer it to be:
We can introduce a notion of "label aliases" that associate a second label with a single file offset.
I've found a couple of projects in the wild that were trying to do something similar by using the address region pre-label feature, but that's not intended for this purpose.
Things to be figured out:
The text was updated successfully, but these errors were encountered: