gdbgui icon indicating copy to clipboard operation
gdbgui copied to clipboard

Problems arise using gdbgui with mingw64 on Windows 10 x64

Open pidgeon777 opened this issue 7 years ago • 6 comments

Describe the bug

gdbgui doesn't seem to work as expected.

To Reproduce

Steps to reproduce the behavior:

  1. Click on 'Load Binary' to load 'output.exe' (a simple hello world c project compiled with mingw64):

image

The following error appears after having clicked on "Load binary":

image

image

  1. Click on 'Fetch source files'. The following appears:

image

I can't see any reference to the source file where the main has been originally declared (e.g. Out_Converter.c)

  1. Click on winnt.h source file. the following error appears:

image

Expected behavior

I would expect gdbgui to correctly load the Out_Converter.c source file to start debugging the program (output.exe).

Please complete the following information:

  • OS: Windows 10 Pro x64
  • gdbgui version (gdbgui -v): 0.13.1.1
  • gdb version (gdb -v): GNU gdb (GDB) 8.2
  • browser [e.g. chrome, safari]: Chrome x64 v72.0.3626.81
  • python packages (pip freeze):

intelhex==2.2.1 numpy==1.15.2 Pygments==2.3.1

  • Python version (python -v): 2.7.15

Additional context

Add any other context about the problem here.

mingw64 is currently installed into C:\msys64:

image

I'm running gdbgui_0.13.1.1.exe with no arguments.

'Out_Converter.c' is placed into its project folder.

pidgeon777 avatar Feb 05 '19 16:02 pidgeon777

3. Click on winnt.h source file. the following error appears:

https://github.com/cs01/gdbgui/issues/227#issuecomment-425693030 provides a solution: gdbgui --remap-sources='{"/": ""}'

bjorn3 avatar Feb 05 '19 16:02 bjorn3

First of all, thanks for the prompt reply. I tried as you suggested, but it led to a failure:

c:\Users\<USERNAME>\Downloads>gdbgui_0.13.1.1.exe --remap-sources='{"/": ""}'
The '--remap-sources' argument must be valid JSON. See gdbgui --help.
Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
  File "gdbgui\backend.py", line 956, in main
  File "json\__init__.py", line 354, in loads
  File "json\decoder.py", line 339, in decode
  File "json\decoder.py", line 357, in raw_decode
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "gdbgui\backend.py", line 1013, in <module>
  File "gdbgui\backend.py", line 962, in main
NameError: name 'exit' is not defined
[13140] Failed to execute script backend

pidgeon777 avatar Feb 06 '19 07:02 pidgeon777

gdbgui --remap-sources='{"/": ""}' is throwing

The '--remap-sources' argument must be valid JSON. See gdbgui --help. Expecting property name enclosed in double quotes: line 1 column 2 (char 1)

Any advice?

jmtoniolo avatar Nov 12 '19 02:11 jmtoniolo

gdbgui --remap-sources='{"/": ""}' is throwing

The '--remap-sources' argument must be valid JSON. See gdbgui --help. Expecting property name enclosed in double quotes: line 1 column 2 (char 1)

Any advice?

Instead of command with '{"/": ""}' use this command: gdbgui --remap-sources='{\"/\": \"\"}'

But slash is not being removed while clicking on source file in filesystem subwindow anyway. However you can use dropdown menu in this window to open your sources and this will work even without this additional argument.

When I run my program, gdbgui prints following message:

The underlying gdb process has been killed. This tab will no longer function as expected.

So I sadly can't do anything with gdbgui even with those efforts. Using gdb 8.1 on Windows 10.

Denmey avatar Mar 17 '20 08:03 Denmey

RuntimeError: Windows is not supported at this time. Versions lower than 0.14.x. are Windows compatible.

gpdzvapatsva avatar Nov 08 '22 21:11 gpdzvapatsva

gdbgui --remap-sources='{"/": ""}' is throwing The '--remap-sources' argument must be valid JSON. See gdbgui --help. Expecting property name enclosed in double quotes: line 1 column 2 (char 1) Any advice?

Instead of command with '{"/": ""}' use this command: gdbgui --remap-sources='{\"/\": \"\"}'

But slash is not being removed while clicking on source file in filesystem subwindow anyway. However you can use dropdown menu in this window to open your sources and this will work even without this additional argument.

When I run my program, gdbgui prints following message:

The underlying gdb process has been killed. This tab will no longer function as expected.

So I sadly can't do anything with gdbgui even with those efforts. Using gdb 8.1 on Windows 10.

RuntimeError: Windows is not supported at this time. Versions lower than 0.14.x. are Windows compatible.

gpdzvapatsva avatar Nov 08 '22 21:11 gpdzvapatsva