maziac / DeZog

Visual Studio Code Debugger for Z80/ZX Spectrum.
MIT License
212 stars 35 forks source link

EISDIR: illegal operation on a directory, read #38

Closed githubtester2 closed 3 years ago

githubtester2 commented 3 years ago

Hello,

I cannot start debugging when using z88dk. When using sjasmplus, debugging works fine. The following error occurs: EISDIR: illegal operation on a directory, read

I attached my project as zip file.

Regards! CPrograms.zip

maziac commented 3 years ago

Thanks for your report.

Actually the DeZog error reporting needs improvement here. The problem is simply that the "z88dkMapfile" property has been renamed to "mapFile" meanwhile as it is anyhow under the "z88dk" property.

So rename "z88dkMapfile" to "mapFile" and the parsing will work.

However the next problem is that "stack_top" is not defined by your program as a label. For now you can simply omit the line in launch.json.

Here is a launch.json that works:

{
    "configurations": [
        {
            "rootFolder": "${workspaceFolder}",
            "type": "dezog",
            "request": "launch",
            "name": "DeZog",
            "remoteType": "zrcp",
            "zrcp": {
                "port": 10000
            },
            "cspect": {
                "port": 10000
            },
            "zsim": {},
            "zxnext": {
                "port": "/dev/tty.usbserial"
            },
            //"topOfStack": "stack_top",
            "z88dk": [
                {
                    "path": "black_border.c.lis",
                    "srcDirs": [],
                    "mapFile": "black_border.map",
                }
            ],
            "disassemblerArgs": {
                "esxdosRst": true
            },
            "load": "black_border.sna",
            "skipInterrupt": true
        }
    ]
}

Anyhow I noticed that there is another problem in DeZog when trying to set a breakpoint at exactly line 257 just below '_main' in black_Border.c.lis. The other lines do work but for this line you get an 'unverified' breakpoint error. Reason is that line 364 has the exact same address. I will fix that in the next DeZog version.

githubtester2 commented 3 years ago

Thank you so much for your instructions! Now it works!

Best Regards!