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

Add rust-gdbgui script. #53774

Merged
merged 2 commits into from
Sep 1, 2018
Merged

Add rust-gdbgui script. #53774

merged 2 commits into from
Sep 1, 2018

Conversation

PhilipDaniels
Copy link
Contributor

This script invokes the gdbgui graphical GDB front-end with the Rust pretty printers loaded. The script does not install gdbgui, that must be done manually.

As an escapee from Visual Studio it is nice to have a point-and-click debugger. This script invokes gdbgui similarly to the way that rust-gdb invokes gdb - I copied that script as a starting point.

Because it is a wrapper around a wrapper you don't have as much flexibility in passing arguments to GDB and I could not find a way to eliminate the single quotes you have to use when you want to pass arguments to your program (gdbgui supposedly supports an --args option which I think should allow this, but I couldn't get it to work, my shell-fu is weak). Still, I find this very usable for debugging programs, and it is a lot more approachable than gdb in the terminal.

This script invokes the gdbgui graphical GDB front-end
with the Rust pretty printers loaded. The script does not install
gdbgui, that must be done manually.
@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @nikomatsakis (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 28, 2018
@nikomatsakis
Copy link
Contributor

r? @tromey

cc @michaelwoerister

@nikomatsakis nikomatsakis assigned tromey and unassigned nikomatsakis Aug 30, 2018
pretty printers loaded.

Simple usage : rust-gdbgui target\debug\myprog
With arguments: rust-gdbgui 'target\debug\myprog arg1 arg2...'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should use forward slashes rather than backslashes.

@tromey
Copy link
Contributor

tromey commented Aug 30, 2018

Because it is a wrapper around a wrapper you don't have as much flexibility in passing arguments to GDB and I could not find a way to eliminate the single quotes you have to use when you want to pass arguments to your program

I think this part is fine, because this seems to be how gdbgui itself works -- a bit ugly but not your problem.

@tromey
Copy link
Contributor

tromey commented Aug 30, 2018

@bors r+

@bors
Copy link
Contributor

bors commented Aug 30, 2018

@tromey: 🔑 Insufficient privileges: Not in reviewers

@kennytm
Copy link
Member

kennytm commented Aug 31, 2018

@bors r=tromey delegate=tromey rollup

@bors
Copy link
Contributor

bors commented Aug 31, 2018

✌️ @tromey can now approve this pull request

@bors
Copy link
Contributor

bors commented Aug 31, 2018

📌 Commit 47aa475 has been approved by tromey

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 31, 2018
kennytm added a commit to kennytm/rust that referenced this pull request Sep 1, 2018
Add rust-gdbgui script.

This script invokes the [gdbgui](https://gdbgui.com/) graphical GDB front-end with the Rust pretty printers loaded. The script does not install gdbgui, that must be done manually.

As an escapee from Visual Studio it is nice to have a point-and-click debugger. This script invokes `gdbgui` similarly to the way that `rust-gdb` invokes `gdb` - I copied that script as a starting point.

Because it is a wrapper around a wrapper you don't have as much flexibility in passing arguments to GDB and I could not find a way to eliminate the single quotes you have to use when you want to pass arguments to your program (`gdbgui` supposedly supports an `--args` option which I think should allow this, but I couldn't get it to work, my shell-fu is weak). Still, I find this very usable for debugging programs, and it is a lot more approachable than gdb in the terminal.
bors added a commit that referenced this pull request Sep 1, 2018
Rollup of 9 pull requests

Successful merges:

 - #53076 (set cfg(rustdoc) when rustdoc is running on a crate)
 - #53622 (cleanup: Add main functions to some UI tests)
 - #53769 (Also link Clippy repo in the CONTRIBUTING.md file)
 - #53774 (Add rust-gdbgui script.)
 - #53781 (bench: libcore: fix build failure of any.rs benchmark (use "dyn Any"))
 - #53782 (Make Arc cloning mechanics clearer in module docs)
 - #53790 (Add regression test for issue #52060)
 - #53801 (Prevent duplicated impl on foreign types)
 - #53850 (Nuke the `const_to_allocation` query)
@bors bors merged commit 47aa475 into rust-lang:master Sep 1, 2018
@PhilipDaniels
Copy link
Contributor Author

@tromey Tom, I was expecting this script to show up in the .cargo\bin directory with new nightly installs but it doesn't. Did I miss something, is there an install script somewhere that needs updating as well?

@nbigaouette
Copy link
Contributor

Same here. Anything missing?

@tromey
Copy link
Contributor

tromey commented Jan 17, 2019

Same here. Anything missing?

Sorry - somehow I must have missed the notification for this.

I think the new script must also be installed, see https://github.com/rust-lang/rust/blob/master/src/bootstrap/dist.rs#L603-L604

@nbigaouette
Copy link
Contributor

Thanks! I've opened #57708

bors added a commit that referenced this pull request Jan 21, 2019
…stall, r=Mark-Simulacrum

Install missing 'rust-gdbui''

PR #53774 added `rust-gdbui` as wrapper to launch [gdbui](https://gdbgui.com/), similar to `rust-gdb`.

Unfortunately I've never seen the script in my local installation (from rustup, using rust 1.31.1). @tromey on the PR [suggested it might be missing](#53774 (comment)) from the installation process.

This PR simply adds a line for `rust-gdbui` too.
VardhanThigle pushed a commit to jethrogb/rust that referenced this pull request Jan 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants