Skip to content

Error with docker on windows  #114

@sam94dion

Description

@sam94dion

Hi,

There seems to be a problem when I try to run the debugger on WINDOWS.

First off this command does not seem to work on windows :

docker run -d -i --name gnucobol -w ${workspaceRoot} -v ${workspaceRoot}:${workspaceRoot} olegkunitsyn/gnucobol:3.1-dev

I get the same error as #89 so i tried his solution but it did not seem to work for me.

what I did :

Lunch.json
{
"version": "0.2.0",
"configurations": [
{
"name": "COBOL debugger",
"type": "gdb",
"request": "launch",
"cobcargs": ["-free", "-x"],
"docker": "olegkunitsyn/gnucobol:3.1-dev",
"coverage": true,
"verbose": true
}
]
}

Lunched docker :

docker run -d -i --name gnucobol -w /app -v C:\workspace\cobol-check:/app olegkunitsyn/gnucobol:3.1-dev

then every time i tried to lunch debug it couldn't find the path because it used the cwd

Mi2 file
if (!nativePath.isAbsolute(target) || (this.cobcpath === "docker" && this.gdbpath === "docker")) {
target = nativePath.resolve(cwd, target);
}

so i changed it tofix this
if (!nativePath.isAbsolute(target) || (this.cobcpath === "docker" && this.gdbpath === "docker")) {
target = "/app/src/main/cobol/TST.CBL";
}

after this I get the following error

image

log :

loading standard configuration file 'default.conf'

command line: cobc -free -x -g -fsource-location -ftraceall -Q --coverage -A --coverage -v /app/src/main/cobol/TST.CBL

preprocessing: /app/src/main/cobol/TST.CBL -> TST.i

return status: 0

parsing: TST.i (/app/src/main/cobol/TST.CBL)

return status: 0
translating: TST.i -> TST.c (/app/src/main/cobol/TST.CBL)

executing: gcc -c -pipe -I/usr/local/include -Wno-unused -fsigned-char
-Wno-pointer-sign -ggdb3 -fasynchronous-unwind-tables
--coverage -o "/tmp/cob8_0.o" "TST.c"

return status: 0
executing: gcc -Wl,--export-dynamic -o "TST" "/tmp/cob8_0.o" --coverage
-L/usr/local/lib -lcob -lm

return status: 0

COBOL file /app/src/main/cobol/TST.CBL compiled with exit code: 0
SourceMap created: lines 4, vars 3
/app/src/main/cobol/TST.CBL:11 > C:\workspace\cobol-check\TST.c:112
/app/src/main/cobol/TST.CBL:12 > C:\workspace\cobol-check\TST.c:119
/app/src/main/cobol/TST.CBL:13 > C:\workspace\cobol-check\TST.c:126
/app/src/main/cobol/TST.CBL:14 > C:\workspace\cobol-check\TST.c:133
obtaininput_.b_2[null] > RETURN-CODE
obtaininput_.b_8[null] > NAME
obtaininput_.f_8[a_2] > NAME
obtaininput_.RETURN-CODE[null] > b_2
obtaininput_.NAME[null] > b_8
obtaininput_.NAME.NAME[a_2] > f_8

Thank you :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions