Analyzing Core Dump

Is there an updated way to analyze the core dump? The Mongoose docs seem to be out of date. There isn’t a Makefile in mongoose-os/platforms/esp32, so I can’t run the make command…

Run mos debug-core-dump in the root directory of your application. You will need to have docker installed on your computer.

If you run mos console in the root directory of your application and a core dump occurs, the mos tool will catch and analyse it, provided docker is installed.

1 Like

That worked. Thank you for your help :slight_smile:

What is docker. Is it an application? Please provide official link to it.

1 Like

I have installed docker in windows, tried running Docker quickstart with admin privileges, along with mos.exe, this is the output:

Using core-VersionJ-esp32-20210905-155535.093957099
Core dump by VersionJ/esp32 0.10.2e.H 20210905-051632
Using ELF file at: C:\mos\VersionJ\build\objs\VersionJ.elf
Using Docker image:
Running docker run --rm -i --tty=true -v /c/mos/VersionJ/build/objs/VersionJ.elf:/fw.elf -v /c/mos/VersionJ/core-VersionJ-esp32-20210905-155535.093957099:/core -v C:\mos\VersionJ:/c/mos/VersionJ bash -c /usr/local/bin/ --rom=/opt/Espressif/rom/rom.bin --rom_addr=0x40000000 --xtensa_addr_fixup=true /fw.elf /core & $MGOS_TARGET_GDB /fw.elf -ex ‘target remote’ -ex ‘set confirm off’ -ex bt
the input device is not a TTY. If you are using mintty, try prefixing the command with ‘winpty’
Error: exit status 1
/src/cli/main.go:198: debug-core-dump failed

some help possibly?
Possible to run mos commands within VS code perhaps?

For sure, from terminal you can run all the same mos commands as you would in the web browser.
eg: mos debug-core-dump will attempt to analyse the core dump file in the same directory, or mos console will connect do your device over serial and show messages in the terminal

If I try a mos command from the root directory of my app in VS Code, I get this:
“The term ‘mos’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path
is correct and try again.”