platform-ststm32 icon indicating copy to clipboard operation
platform-ststm32 copied to clipboard

Bundled arm-none-eabi toolchain's GDB has no Python support

Open doppioandante opened this issue 3 years ago • 0 comments

Hello, I'm using platformio by CLI interface exclusively. The piodebuggdb is nice, I can attach to it using the mi3 interface. Sometimes though, I'd wish to use it directly along with gdb-dashboard.

Unfortunately, as it uses python scripting in gdb, it fails to work with the standard arm-none-eabi-gdb (path: packages/toolchain-gccarmnoneeabi/bin/arm-none-eabi-gdb). In the same folder, I can tell that there are more gdb executables that apparently support python:

  • packages/toolchain-gccarmnoneeabi/bin/arm-none-eabi-gdb-py
  • packages/toolchain-gccarmnoneeabi/bin/arm-none-eabi-gdb-py3 Even executing these two manually, though, doesn't work, e.g.:
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
ImportError: No module named site

I tried various solutions with no avail. Moreover, platformio messes with PYTHONPATH from what I could tell, so getting this right from inside pio debug gets even harder.

doppioandante avatar Nov 18 '22 02:11 doppioandante