Skip to content
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

Prevent clap from intercepting hyphens passed to rr_opts #12

Closed
wants to merge 4 commits into from

Conversation

NickHu
Copy link
Contributor

@NickHu NickHu commented Sep 18, 2022

Fixes issue #11

I took the liberty of updating all the dependencies too

@NickHu
Copy link
Contributor Author

NickHu commented Sep 18, 2022

Now rr_opts needs to be enclosed by quotes, and the documentation/help output on this could probably be improved, but it's possible to start gdb-server with rr now (i.e. rr replay -s 1234)

[nix-shell:/tmp/cargo-rr]$ ./target/debug/cargo-rr rr replay test-2e32310c57f5ef72 "-s 1234"
Launch gdb with
  rust-gdb '-l' '10000' '-ex' 'set sysroot /' '-ex' 'target extended-remote 127.0.0.1:1234' /tmp/cargo-rr/target/rr/test-2e32310c57f5ef72/mmap_copy_5_test-2e32310c57f5ef72

@dzfranklin
Copy link
Owner

Nice catch, I'm not sure how I missed that.

Two optional positional arguments still doesn't work well. You can't do rr replay -s 1234, you have to do rr replay test-foobar -s 1234. What if it was a named argument instead, something like rr replay --rr-opts "-s 123"?

@dzfranklin
Copy link
Owner

Fixed in #14

@dzfranklin dzfranklin closed this Jan 4, 2023
@NickHu NickHu deleted the hyphens branch January 4, 2023 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants