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

Make GDB Python Pretty Printers loadable after spawning GDB, avoiding required rust-gdb #111962

Merged
merged 1 commit into from
Jun 6, 2023

Conversation

theIDinside
Copy link
Contributor

@theIDinside theIDinside commented May 25, 2023

Fixes #111961

Makes the Python pretty printer library source'able from within GDB after spawn, making the wrapper script rust-gdb become not the required approach to use the pretty printer library.

Allows for integration into GUI:s that wrap GDB extremely easy. The previous design complicates this feature.

@rustbot
Copy link
Collaborator

rustbot commented May 25, 2023

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

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 25, 2023
@compiler-errors
Copy link
Member

Just a nitpick: this could use a better title, something that describes what it does (see other PR titles for example). Then the "Fixes ###" part can be put in the PR description body, which will link to it and close the issue when this PR merges.

@theIDinside theIDinside changed the title Fix #111961 Make GDB Python Pretty Printers loadable after spawning GDB, avoiding required rust-gdb May 25, 2023
@theIDinside
Copy link
Contributor Author

Just a nitpick: this could use a better title, something that describes what it does (see other PR titles for example). Then the "Fixes ###" part can be put in the PR description body, which will link to it and close the issue when this PR merges.

Thanks! Fixed that.

@workingjubilee
Copy link
Member

workingjubilee commented May 25, 2023

I understand it outmodes rust-gdb, but it does not break it, correct?

"defunct" is a word that can be interpreted both ways.

@theIDinside
Copy link
Contributor Author

I understand it outmodes rust-gdb, but it does not break it, correct?

"defunct" is a word that can be interpreted both ways.

You are correct. Terribly poor phrasing by me. Will be changed.

@workingjubilee
Copy link
Member

It might be a phrasing that can invite confusion, but I wouldn't call it "terribly poor" at all! Many of the ways you could put it have that dual meaning, tilting towards one, with more or less squinting required to interpret it as the other meaning based on context.

@khuey
Copy link
Contributor

khuey commented May 26, 2023

@pnkfelix this would let Pernosco load these features in the embedded gdb too

@Mark-Simulacrum
Copy link
Member

r=me with commits squashed

Makes the Python pretty printer library source'able from within
GDB after spawn.

This makes `rust-gdb` not the required approach. It also provides the possibility
for GUI:s that wrap GDB, to debug Rust using the pretty printer library; as well
as other projects such as for instance Pernosco, which previously was not possible.

This won't introduce any new unexpected behaviors for users of `rust-gdb`
@theIDinside
Copy link
Contributor Author

r=me with commits squashed

I'm not sure I did that right?

@Mark-Simulacrum
Copy link
Member

@bors r+ rollup

The approval doesn't go in the commit, it needs to be done by one of the reviewer team members. But this is fine.

@bors
Copy link
Contributor

bors commented Jun 5, 2023

📌 Commit c5145dc has been approved by Mark-Simulacrum

It is now in the queue for this repository.

@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 Jun 5, 2023
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jun 6, 2023
…ulacrum

Make GDB Python Pretty Printers loadable after spawning GDB, avoiding required `rust-gdb`

Fixes rust-lang#111961

Makes the Python pretty printer library source'able from within GDB after spawn, making the wrapper script `rust-gdb` become not the required approach to use the pretty printer library.

Allows for integration into GUI:s that wrap GDB extremely easy. The previous design complicates this feature.
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 6, 2023
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#111058 (Correct fortanix LVI test print function)
 - rust-lang#111369 (Added custom risc32-imac for esp-espidf target)
 - rust-lang#111962 (Make GDB Python Pretty Printers loadable after spawning GDB, avoiding required `rust-gdb`)
 - rust-lang#112019 (Don't suggest changing `&self` and `&mut self` in function signature to be mutable when taking `&mut self` in closure)
 - rust-lang#112199 (Fix suggestion for matching struct with `..` on both ends)
 - rust-lang#112220 (Cleanup some `EarlyBinder::skip_binder()` -> `EarlyBinder::subst_identity()`)
 - rust-lang#112325 (diagnostics: do not suggest type name tweaks on type-inferred closure args)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 29871d5 into rust-lang:master Jun 6, 2023
@rustbot rustbot added this to the 1.72.0 milestone Jun 6, 2023
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.

GDB Usage unnecessarily requires rust-gdb (PR Provided)
9 participants