BartmanAbyss / vscode-amiga-debug

One-stop Visual Studio Code Extension to compile, debug and profile Amiga C/C++ programs compiled by the bundled gcc 12.2 with the bundled WinUAE/FS-UAE.
GNU General Public License v3.0
315 stars 39 forks source link

View memory for symbols in assembly #174

Closed grahambates closed 1 year ago

grahambates commented 1 year ago

Due to not having structured variables in assembly code, you'll typically want to find the address of a given symbol (i.e. label) and inspect the memory at that location when debugging.

I've added a new variable scope to list symbols that don't correspond to C variables. They already exist in the symbols table and we can identify them by their type (normal) and size (0). Giving these a memoryReference property means you get a View Binary Data icon which opens the address in the View Memory view.

image

In addition I've added a View Memory context menu item for this and a View Memory (pointer) option which adds indirection to open the memory address at that location.

image

The input dialog for the Amiga: View Memory command now accepts Symbol names as well as numeric addresses. You can also add a & prefix for indirection when using this method.

image

For completeness I've also added a scope for constants defined in assembly. These look pretty similar in the symbol table but have a base of 0.

image