Skip to content

gdbgui --args does not function as expected #272

Open
@zhidvegi

Description

@zhidvegi

There was already an issue with a fix for that, #194, but apparently this still does not work. The options after --args are still parsed somehow. E.g.
gdbgui --args your_program -msg
This will cause the gdb process to die, and nothing can be debugged. Using
gdbgui --args your_program '"-msg"'
works. This actually shows an other issue, with gdb --args, all args after --args are passed unmodified to gdb. But with gdbbui --args the args following --args are joined with spaces and used like the args for the gdb run command, which undergoes an other shell expansion step, so any space, quotes, backslashes, dollar signs etc. are shell expanded. I an not good enough python coder to fix this, for my workaround I wrote a shell script wrapper to gdbgui that adds the necessary quoting to the parms following --args to faithfully emulate gdb --args and it works well enough for me, but it took me a while to figure out what was the issue, I was almost ready to give up completely on gdbgui. Incidentally the quoting also fixes the option parsing issues, since the -msg parm becomes '-msg' which no longer starts with a dash, and the extra quotes are stripped during the second shell expansion (the first shell expansion happens when you enter the gdbgui args on the command line).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions