I see that other people are running into issues with the Python 2.7 dependency of the GDB bundled with 11.2, but I'm having trouble starting it even with Python 2.7 installed.
I've installed on Windows 10 using the official installer, gcc-arm-11.2-2022.02-mingw-w64-i686-arm-none-eabi.exe. I have Python 2.7 first in my PATH, so python --version shows Python 2.7.15. There is no PYTHONPATH or PYTHON_HOME environment variable set.
gcc-arm-11.2-2022.02-mingw-w64-i686-arm-none-eabi.exe
python --version
Python 2.7.15
PYTHONPATH
PYTHON_HOME
When I try to start GDB with no arguments by running .\arm-none-eabi-gdb from the installation's bin directory, it prints ImportError: No module named site and exits. No arguments seem to have any effect or produce any useful debugging info. Curiously, on my other machine (also running Windows 10, same environment settings, and same Python 2 version), GDB exits immediately with no output.
.\arm-none-eabi-gdb
bin
ImportError: No module named site
What can I do to further troubleshoot this?
My Python install is under C:\Python27 on both machines (tried upgrading to 2.7.18 with no change). I'm wondering how Python is being invoked to cause it to give that error, since the Python interpreter starts without issue, and import site succeeds, FWIW. Do you know if there's a build flag or some other means to make GDB log how it starts Python?
import site
On the other machine, where GDB simply exits with code 0xC000007B, do you have any ideas what to look at next?
PS C:\Program Files (x86)\Arm GNU Toolchain arm-none-eabi\11.2 2022.02\bin> .\arm-none-eabi-gdb PS C:\Program Files (x86)\Arm GNU Toolchain arm-none-eabi\11.2 2022.02\bin> echo $LASTEXITCODE -1073741701
Also tried invoking from a MinGW shell just for kicks:
doug@Excelsior MINGW64 /c/Program Files (x86)/Arm GNU Toolchain arm-none-eabi/11.2 2022.02/bin $ ./arm-none-eabi-gdb.exe C:/Program Files (x86)/Arm GNU Toolchain arm-none-eabi/11.2 2022.02/bin/arm-none-eabi-gdb.exe: error while loading shared libraries: ?: cannot open shared object file: No such file or directory
./arm-none-eabi-gcc launches fine from the same shell.
./arm-none-eabi-gcc
Update: I found that the problem, on both machines, was that it needed the 32-bit version of Python. I finally had the thought of searching through the install tree to find share\doc\arm-none-eabi\readme.txt, which mentioned this requirement.
share\doc\arm-none-eabi\readme.txt
The readme feels a bit buried, since I couldn't find it on the toolchain page, and the installer doesn't display it even with the box checked. GDB itself should have produced some sort of useful error message, which I'm guessing should be reported upstream.