rohanrhu / gdb-frontend

☕ GDBFrontend is an easy, flexible and extensible gui debugger.
GNU General Public License v3.0
2.86k stars 100 forks source link

Error message when running on WSL2 Linux #65

Closed kingsumos closed 5 months ago

kingsumos commented 6 months ago

Hi,

When starting gdbfrontend on WSL2 Linux the following error message is shown:

sh: /mnt/c/windows/system32/rundll32.exe: No such file or directory

Basically this is caused by run.py:363 script, which incorrectly detects a Windows system due to a "microsoft-standard-WSL2" string appended to the kernel version... For instance:

user@97b155e8a200:/usr/lib/python3.6/site-packages/gdbfrontend> python3
Python 3.6.15 (default, Sep 23 2021, 15:41:43) [GCC] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import platform
>>> platform.uname()
uname_result(system='Linux', node='97b155e8a200', release='5.15.146.1-microsoft-standard-WSL2', version='#1 SMP Thu Jan 11 04:09:03 UTC 2024', machine='x86_64', processor='x86_64')
>>> CTRL+D
user@97b155e8a200:~/git/template/prod> uname -r
5.15.146.1-microsoft-standard-WSL2

So today it is required to use --dontopenuionstartup when using WSL2

Thanks! Sumo

rohanrhu commented 6 months ago

Hi, thank you for your feedback. 🙂 I don't have time to fix it right now, it would be so good if you can fix it and make a PR.

MS must've been changed something on WSL 2. It was working fine previously but I don't use Windows for long time, I use GDBFrontend on Docker mostly.

rohanrhu commented 5 months ago

Fixed.