Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempts to start debugging result in error Cannot evaluate 'execAddress' #110

Closed
vampirehunt2 opened this issue Mar 14, 2023 · 7 comments
Closed

Comments

@vampirehunt2
Copy link

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Create a file called test.asm with the following contents:
test_main:
	RET
  1. 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
  1. 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"
    }
    ]
}
  1. Click Run > Start Debugging

Expected behavior
A debugging session starts with the PC initialised to test_main

Screenshots
image

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.
@maziac
Copy link
Owner

maziac commented Mar 15, 2023

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.

@maziac
Copy link
Owner

maziac commented Mar 18, 2023

I just released 3.2.3 to the market place. Please let me know if the problem persists.

@maziac
Copy link
Owner

maziac commented Mar 18, 2023

OK. No need to do any further tests.
The problem is twofold:

  1. the SLD file is empty because the assembly file lacks a DEVICE statement. Use:
	DEVICE NOSLOT64K

test_main:
	RET
  1. 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'.

@maziac
Copy link
Owner

maziac commented Mar 19, 2023

Please try this fix:
dezog-3.2.3-rc1.vsix.zip

@vampirehunt2
Copy link
Author

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.

@vampirehunt2
Copy link
Author

I upgraded to 3.2.3 from the Marketplace and still have the same issue.

@vampirehunt2 vampirehunt2 reopened this Mar 20, 2023
@maziac
Copy link
Owner

maziac commented Mar 20, 2023

You need to upgrade to 3.2.3-rc1 that I attach few comments above. Unzip and 'Install from vsix...".

@maziac maziac closed this as completed Apr 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants