gdbgui icon indicating copy to clipboard operation
gdbgui copied to clipboard

Unable to open source files on Windows due to forward slashes in File System browser

Open svanimisetti opened this issue 2 years ago • 0 comments

When attaching to a process, the source files in the file system list and the file path bar/label are prepended with forward slash for windows paths (e.g., /c:\Users<userid>\Desktop\cpp_test\hello-world-1.cpp:1).

Steps to reproduce the behavior:

  1. Create a executable using MinGW64 on Windows 10 with debug info (use -g -O0 flags)
  2. Run executable and attach gdbgui to pid of executable
  3. Click on "show filesystem" button and click on any files with windows path conventions (backward slash and drive-letter)
  4. Observe the file path bar/label in gdbgui (forward slash in front of windows path prevents it from opening in file viewer)
  5. Manually correct file path and enter it in the textbox/dropdown to open file in viewer
  6. Cannot set breakpoint in the viewer (ERROR: No source file named c.)

OS: Windows 10 x86-64 gdbgui version (gdbgui -v): 0.13.2.2 gdb version (gdb -v): 7.11 browser [e.g. chrome, safari]: Chrome

svanimisetti avatar Oct 18 '22 13:10 svanimisetti