Attached is a patch against 1.5.7 which implements symbols handling within Fuse. The idea is to read in a file of symbols and addresses as generated by an assembler or compiler. Once those symbols are loaded they can be used in the Fuse interface in place of addresses.
Symbols are initially loaded via a new command line flag, --symbols. The given file is parsed looking for lines with name/value pairs. The parser is rudimentary, using just a regular expression which picks out lines such as:
_key_action_tracetable C407
_main A24D
_loser BA4A
_game_over A247
_full_screen C414
_version C40C
It would be possible to support different symbol table formats, but since the common Spectrum development tools tend to produce varying outputs in this respect I went for the simplest option: assume the developer's makefile or build process converts the symbols file from their toolchain into the above format.
Once the table is loaded, it's accessible in the (GTK3-only) GUI from a new "File->Symbol Browser" menu option. See attached screenshot. The dialog is non-modal, so the user can leave it open. The symbols file can be reloaded, or a new one specified. Search is via the standard GTK3 just-start-typing approach. Selecting a line copies the symbol to the clipboard.
There are quite a few places in the Fuse GUI where symbol usage might be useful, but they don't use a standardised function or approach to parse the user's input, so for now I've only implemented symbol use in 2 places. First, the memory browser, which is nice and easy. I chose a # character to precede a symbol name since most other magic characters appear to be used in the valid symbol names of the popular Spectrum development tools. The # is prepended to the label placed in the clipboard, so the user can click the symbol and paste straight into the memory browser address offset.
The other place I implemented symbol lookup was the debugger command line. As shown, the user can select a label and, for example, set a breakpoint at that address as you'd expect. The symbol lookup is in the debugger's grammar parser, so this should work anywhere the debugger can take an address.
For the feature to be properly useful a reverse lookup needs to be implemented, so labels can appear in disassembly listings, etc. That's going to require some significant reworking of the interfaces, so I thought I'd offer what I have so far to see if there's any interest. Personally I find it very useful as it is. :)