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

DBG: Load pretty-printers and rustc sources via RsDebugProcessConfigurator #4197

Merged
merged 1 commit into from Aug 6, 2019

Conversation

artemmukhin
Copy link
Member

@artemmukhin artemmukhin commented Jul 29, 2019

Now Rust pretty-printers and rustc sources will be loaded even when C/C++ project was launched. So debugging Rust code inside a cross-language project becomes as comfortable as debugging pure-Rust projects.

Copy link
Member

@Undin Undin left a comment

Choose a reason for hiding this comment

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

Now, we have a lot of unnecessary code duplication between debugger/192 and debugger/191 source sets.
To avoid it I suggest:

  • make 191 and 192 version of RsLocalDebugProcess
  • extract all difference between 191 and 192 RsDebugRunner to RsLocalDebugProcess#setupDebugSession method (don't insist on method name). It seems for 192 this method will do nothing
  • move RsDebugRunner to common source set
  • move Loader to common source set and use it in 191 RsLocalDebugProcess and 192 RsDebugProcessConfigurator

Also, it should reduce code dublication and reduce conflicts with #3926

Copy link
Member

@Undin Undin left a comment

Choose a reason for hiding this comment

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

Also, it doesn't work now because platform-debugger-only.xml is not included into debugger-only.xml

@artemmukhin artemmukhin changed the title WIP DBG: Load Rust pretty-printers via RsDebugProcessConfigurator DBG: Load Rust pretty-printers via RsDebugProcessConfigurator Jul 30, 2019
@artemmukhin artemmukhin changed the title DBG: Load Rust pretty-printers via RsDebugProcessConfigurator DBG: Load pretty-printers and rustc sources via RsDebugProcessConfigurator Jul 30, 2019
@artemmukhin artemmukhin force-pushed the load-pretty-printers-clion branch 2 times, most recently from 630f00c to 7073e45 Compare July 30, 2019 16:18
Copy link
Member

@Undin Undin left a comment

Choose a reason for hiding this comment

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

As I can see, our formatters break C++ formatters
With cargo project:
image
Without cargo project:
image

@Undin Undin self-assigned this Aug 2, 2019
@artemmukhin
Copy link
Member Author

artemmukhin commented Aug 2, 2019

@Undin Oh, really. Now in case of cross-language projects, Rust LLDB pretty-printers are enabled only for specific std types, but disabled for arbitrary struct/enum. On the other hand, GDB should work well in this case because it tries to apply all pretty-printers consequentially and doesn't rely on regexes.

@Undin Undin added this to the v104 milestone Aug 6, 2019
Copy link
Member

@Undin Undin left a comment

Choose a reason for hiding this comment

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

bors r+

bors bot added a commit that referenced this pull request Aug 6, 2019
4197: DBG: Load pretty-printers and rustc sources via RsDebugProcessConfigurator r=Undin a=ortem

Now Rust pretty-printers and rustc sources will be loaded even when C/C++ project was launched. So debugging Rust code inside a cross-language project becomes as comfortable as debugging pure-Rust projects.

Co-authored-by: ortem <ortem00@gmail.com>
@bors
Copy link
Contributor

bors bot commented Aug 6, 2019

@bors bors bot merged commit fb2ada2 into intellij-rust:master Aug 6, 2019
@Undin Undin added this to Test in To test Aug 7, 2019
@lancelote lancelote moved this from Test to Done in To test Aug 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
To test
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants