pygdbmi icon indicating copy to clipboard operation
pygdbmi copied to clipboard

GdbController cannot recognize window short path of gdb executable

Open Hoohaha opened this issue 3 years ago • 1 comments

Describe the bug When gdb executable is short format like this: C:/PROGRA~2/GNUARM~1/102021~1.10/bin/AR470E~1.EXE

Full path: "C:\PROGRA~2\GNUARM~1\102021~1.10\bin\arm-none-eabi-gdb.exe"

Then the consrtuctor will raise error: gdb executable could not be resolved from

Checked the code, function distutils.spawn.find_executable() will return None for C:/PROGRA~2/GNUARM~1/102021~1.10/bin/AR470E~1.EXE

To Reproduce

gdb = GdbController(`C:/PROGRA~2/GNUARM~1/102021~1.10/bin/AR470E~1.EXE`)

Hoohaha avatar May 31 '22 08:05 Hoohaha

I'm not a Windows user so I'm not sure if I can help. From a quick search on Google I didn't find any way to convert paths like that with pre-installed Python modules. Is there any chance you could help fixing this please?

What happens if you try shutil.which instead of distutils.spawn.find_executable (which is deprecated)? Same problem? If yes, maybe this is a Python bug not a pygdbmi one.

barisione avatar Aug 07 '22 17:08 barisione