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.94k stars 499 forks source link

Embedded works just a bit diffrently. #456

Open duaneellissd opened 1 year ago

duaneellissd commented 1 year ago

It seems that most of the GDBGUI use is with HOST=TARGET, or maybe HOST=X86 to TARGET=ARM_LINUX and therefore you do not experience these problems.

When using an embedded target, such as via OpenOCD things are quite different. ad this is where the tool does to work work. perhaps it would be a good idea to introduce an "--embedded-quirks" option.

Example: The PAUSE (halt/break) feature does not work. Instead you must type: "interrupt" in the command window.

Example: The RESTART button does not work. Reason, with an embedded target you must RELOAD the application (aka: Re-Flash the application) by typing the "load" command.

While 'reload' might seem strange to you (its already in the flash correct? So why are we reloading it). Answer: Often you might run your application from RAM instead, and the application needs to be reloaded.

Its' not the job of the GDB SERVER to do this - because the server does not know the name of the ELF being loaded. It is GDB that sends memory write commands to the GDSERVER which in turn become Flash Write operations.

Example: I dont' have a handle on the reason yet but often, I must power cycle my board, crash the GDB SERVER and restart it after a debug session Normally one does not need to do that. It's not a GDBSERVER (openocd) problem - because other front ends work just fine (ie: GUD mode in Emacs)