Attempts to start debugging result in error Cannot evaluate 'execAddress'
vampirehunt2 opened this issue · 7 comments
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
- Create a file called test.asm with the following contents:
test_main:
RET
- Assemble with sjasmplus:
PS C:\8bit\git\aniol64ROM> C:\8bit\sjasmplus-1.20.2.win\sjasmplus.exe --raw=c:\8bit\git\aniol64ROM\test\test.bin --sld=c:\8bit\git\aniol64ROM\test\test.sld c:\8bit\git\aniol64ROM\test\test.asm
SjASMPlus Z80 Cross-Assembler v1.20.2 (https://github.com/z00m128/sjasmplus)
warning: missing --fullpath with --sld may produce incomplete file paths.
Pass 1 complete (0 errors)
Pass 2 complete (0 errors)
Pass 3 complete
Errors: 0, warnings: 1, compiled: 7 lines, work time: 0.015 seconds
- Create launch.json:
{
"configurations": [
{
"type": "dezog",
"request": "launch",
"name": "Simulator - Bare Z80",
"remoteType": "zsim",
"zsim": {
"visualMemory": true,
"memoryModel": "RAM"
},
"sjasmplus": [
{
"path": "C:/8bit/git/aniol64ROM/test/test.sld"
}
],
"commandsAfterLaunch": ["-mv 0x8700 100"],
"history": {
"reverseDebugInstructionCount": 1000000,
"spotCount": 10,
"codeCoverageEnabled": false
},
"startAutomatically": false,
"rootFolder": "${workspaceFolder}",
"loadObjs": [
{ "path": "C:/8bit/git/aniol64ROM/test/test.bin", "start": "0x0000" },
{ "path": "source.apl", "start": "0xC000" }
],
"execAddress": "test_main",
"topOfStack": "0xBFFF"
}
]
}
- Click Run > Start Debugging
Expected behavior
A debugging session starts with the PC initialised to test_main
Version etc. (please complete the following information):
- DeZog SW Version: v3.2.2
- OS: Windows 11
- Remote: zsim
Notes:
- The debugging sometimes randomly works, but after changing the execAddress to a different label it mostly doesn't work. After changing it back to the label with which it previously worked, it continues to not work anymore
- The labels are listed in the sld file as expected.
There're currently some severe problems with the 3.2.2 version.
Could you re-test with 3.2.1 jus to see if it is related.
I just released 3.2.3 to the market place. Please let me know if the problem persists.
OK. No need to do any further tests.
The problem is twofold:
- the SLD file is empty because the assembly file lacks a DEVICE statement. Use:
DEVICE NOSLOT64K
test_main:
RET
- There is an error in the dezog:
The exec_address is evaluated before the sld file is parsed. I.e. test_main is not known at this point.
Will work on a solution. Meanwhile please use '"exec_address:" 0'.
Please try this fix:
dezog-3.2.3-rc1.vsix.zip
Thank you.
I don't think it's a problem with my assembly. I omitted this in my example (not knowing it was important), but in my actual program, the very first line in my main file is
device NOSLOT64K
A workaround I found is to set exec address to 0x0000 (or any hex address, instead of a label), save, run, then change back to the label, save and run.
I will upgrade to 3.2.3 shortly. I appreciate the support.
I upgraded to 3.2.3 from the Marketplace and still have the same issue.
You need to upgrade to 3.2.3-rc1 that I attach few comments above. Unzip and 'Install from vsix...".