cesanta / mos-tool

The Mongoose OS command line tool
https://mongoose-os.com/software.html
24 stars 14 forks source link

Debug core dump on windows does not translate cwd to a valid Docker path #6

Closed nliviu closed 6 years ago

nliviu commented 6 years ago

Snippet from https://github.com/cesanta/mongoose-os/issues/428:

Running docker run --rm -v D:\malotian\iot\strata.sphere\build\objs\fw.elf:/fw.elf -v C:\Users\harjinder_dhanjal\AppData\Local\Temp\core--ESP32-20180516-115305.939998991:/core 
-v D:\malotian\iot\strata.sphere\deps\mongoose-os:/mongoose-os 
-v D:\malotian\iot\strata.sphere:D:/malotian/iot/strata.sphere 
docker.cesanta.com/esp32-build:3.0-rc1-r8 bash -c /usr/local/bin/serve_core.py --rom=/opt/Espressif/rom/rom.bin --rom_addr=0x40000000 --xtensa_addr_fixup=true /fw.elf /core & $MGOS_TARGET_GDB /fw.elf -ex 'target remote 127.0.0.1:1234' -ex 'set confirm off' -ex bt -ex quit
docker: Error response from daemon: Mount denied:
The source path "D:/malotian/iot/strata.sphere:D"
doesn't exist and is not known to Docker.

D:\malotian\iot\strata.sphere:D:/malotian/iot/strata.sphere should translate to D:\malotian\iot\strata.sphere:/d/malotian/iot/strata.sphere

Maybe filepath.ToSlash(cwd) should be modified to getPathForDocker(cwd) here

rojer commented 6 years ago

good point, will do. thanks!

malotian commented 6 years ago
  1. Where $MGOS_TARGET_GDB is/will be defined ?
  2. docker.cesanta.com/esp32-build:3.0-rc1-r8 this should be updated r9, as --local option d/l and compile it with r9 only (not r8).
rojer commented 6 years ago

@malotian

  1. in the docker file - https://github.com/cesanta/mongoose-os/blob/a2a2edbf01b3ad00a85306a196220101170010a1/fw/tools/docker/esp32/Dockerfile-esp32-toolchain#L36
  2. shouldn't be necessary, firmware built after https://github.com/cesanta/mongoose-os/commit/00da0813da39d03f350294fb744b851d86933e16#diff-0389972c9db2f0663ed97c3dde8b4b16R95 will use build image name from core dump itself.