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

Ensure "--args" is last argument of gdb command #296

Closed jhgoebbert closed 4 years ago

jhgoebbert commented 5 years ago

To debug an application+command line arguments "--args" is used as last command line argument of gdbgui. Everything after "--args" must be passed then to gdb also as LAST command line argument. This was not the case, but it is now ensured. By default gdb is now used in any case with "--args".

cs01 commented 5 years ago

Thanks, looks good to me. I fixed the missing import that caused the build to fail, but otherwise am leaving unchanged.

cs01 commented 5 years ago

I did some testing and found it didn't work if --args wasn't passed, at least in gdb 8.1.

Test plan for my changes:

Run the following and after each, confirm "Load Binary" still works (if the mi2 interpreter flag isn't passed to gdb, this isn't apparent until the binary is loaded).

Can anyone confirm this fixes their issues? cc @zhidvegi, @sammcdsam

fixes #272

cs01 commented 5 years ago

I'll leave this open a couple more days if anyone wants to test it before I merge it to master.