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

long list of arguments where the ordering matters #301

Open 106ohm opened 5 years ago

106ohm commented 5 years ago

Describe the bug The ordering of --gdb-args="..." and --args ... can be problematic

To Reproduce consider the following bash script: program=path to the bin file prefixedDirs="-d dir1_path -d dir2_path" arguments="$prefixedDirs --args $program -a 1 -b 2 -c 3" gdb --tui $arguments # this works fine gdbgui --gdb-args="${arguments}" # error: gdbgui is not able to identify correctly the bin file gdbgui ${program} --gdb-args="${prefixedDirs}" --args -a 1 -b 2 -c 3 # error: the ordering of the gdb arguments is incorrect gdbgui ${program} --args -a 1 -b 2 -c 3 --gdb-args="${prefixedDirs}" # error: not permitted by gdbgui, as explained by gdbgui --info

How can I pass arguments to gdbgui in order to obtain a call to gdb with the correct arguments ordering?

cs01 commented 5 years ago

https://github.com/cs01/gdbgui/pull/296 might fix this

106ohm commented 4 years ago

Yes, I hope #296 will solve also this issue. Thanks