-
Notifications
You must be signed in to change notification settings - Fork 509
Issue #194: Change --args to match 'gdb --args'. 'cmd' now only takes program name. #198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…akes program name.
2344f38
to
f5a8abd
Compare
First, thanks for putting so much work and detail into this. I am on board with #2. I tested it and it worked with
It is easily fixable by changing
to
in backend.py. When viewing the help text I think the arguments should be ordered from most commonly used/useful to least commonly. I think cmd and --args are the most useful. What do you think? Probably also makes sense to put cmd before --args so the help text doesn't show anything after Can the arg help text be changed to this?
Might be worth considering using |
I've submitted an update (caa69a4). I had considered using mutex groups, but I found the usage turns out like this:
In which case However, it does accomplish placing both I also realized I could fix 'cmd' from str->list using |
Oh yeah, and d5d55b9 fixes the
|
Nice! |
This is bad. When I start
(as of current latest 0.13.1.1) it gets transformed into
which just can't work. AFAIK it needs to be
|
I can confirm, that the "--args" issue is not yet fixed in 0.13.2.0: |
Sorry for the inconvenience. If you have the time/ability please submit a PR. Otherwise I will get to it when I can. |
…b-args-to-gdb-cmd, r=Mark-Simulacrum Fix gdb-cmd for rust-gdbgui With cs01/gdbgui#198, the way that gdbgui arguments were specified changed. I've tested this with program generated from `cargo new --bin` and it worked as gdbgui should. Closes rust-lang#76383.
Here is a patch which does what I think is reasonable: causes --args to take all remaining arguments as program arguments as with 'gdb --args'. The 'cmd' argument only takes the program name now. There are three options for 'cmd':
gdbgui [gdbgui-args] cmd [these-are-more-gdbgui-args]
)gdgbui 'quoted-command --with-arguments' [gdbgui-args...]
.argparse.REMAINDER
; in this case the first non-option argument would begin debug program arguments. This acts more like non-GNU option parsing, i.e.gdbgui [gdbgui-options] cmd-name [cmd-arguments...]
. However, with '--args' already set toargparse.REMAINDER
, the two are equivalent. And then it is possible confusing if you want to do something likegdbgui cmd-name --no-browser
, because--no-browser
would be interpreted as a command arg.For this reason I chose the second option. It is still convenient to debug simply with
gdbgui [gdbgui-args...] program
but you have gdb-like control withgdbgui --args program [program-args...]
.