cs01 / gdbgui

Browser-based frontend to gdb (gnu debugger). Add breakpoints, view the stack, visualize data structures, and more in C, C++, Go, Rust, and Fortran. Run gdbgui from the terminal and a new tab will open in your browser.
https://gdbgui.com
GNU General Public License v3.0
9.9k stars 499 forks source link

Minimum version of gdb supported? #319

Open tcwan opened 4 years ago

tcwan commented 4 years ago

First off, my use case is to debug arm-none-eabi executables (bare-metal ARM code) in a simulated ARM environment on macOS Mojave (10.14.x).

I am using MacPorts to manage the arm-none-eabi-* cross-compilation tools. The GDB ARM cross-debugger currently shipped by MacPorts is version 7.9. I have also gone thorough the code-signing of gdb as required for macOS operation.

My question has to do with what constitutes a compatible GDB setup. When I tried to run gdbgui (using the provided gdbgui_0.13.1.1 macos binary) and specifying the debugger via --gdb arm-none-eabi-gdb, it will fail with

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

Is this a gdb version issue or something else?

Note: I can get it to work if I install gdb with multiarch support, but the multiarch gdb in MacPorts does not come with simulator support, and I'd need to bring in QEMU to be able to run the ARM programs. In addition, I am not familiar with the gdb<->qemu link setup, so it is rather clunky. I'm currently having to do the following in gdb:

target remote |exec qemu-system-arm -M virt -gdb stdio -S -kernel <executable>.elf

Which works but leaves a QEMU console in the background, and has a tendency to die whenever I press Ctrl-C to debug the program.

tcwan commented 4 years ago

Which works but leaves a QEMU console in the background, and has a tendency to die whenever I press Ctrl-C to debug the program.

I managed to hide the QEMU console using display -none. This issue is considered low priority now since I will use GDB 9.1 with QEMU going forward, as the built-in simulator in arm-none-eabi-gdb does not seem to work anymore in macOS Mojave 10.14.6.