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
DBG: Load pretty-printers and rustc sources via RsDebugProcessConfigurator #4197
Conversation
There was a problem hiding this 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
toRsLocalDebugProcess#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 191RsLocalDebugProcess
and 192RsDebugProcessConfigurator
Also, it should reduce code dublication and reduce conflicts with #3926
debugger/src/192/main/kotlin/org/rust/debugger/runconfig/RsDebugProcessConfigurator.kt
Outdated
Show resolved
Hide resolved
debugger/src/192/main/kotlin/org/rust/debugger/runconfig/RsDebugProcessConfigurator.kt
Outdated
Show resolved
Hide resolved
debugger/src/192/main/kotlin/org/rust/debugger/runconfig/RsDebugProcessConfigurator.kt
Outdated
Show resolved
Hide resolved
debugger/src/192/main/kotlin/org/rust/debugger/runconfig/RsDebugProcessConfigurator.kt
Outdated
Show resolved
Hide resolved
debugger/src/192/main/kotlin/org/rust/debugger/runconfig/RsDebugProcessConfigurator.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this 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
f9bc209
to
8fd3d49
Compare
debugger/src/192/main/kotlin/org/rust/debugger/runconfig/RsDebugProcessConfigurator.kt
Outdated
Show resolved
Hide resolved
debugger/src/main/kotlin/org/rust/debugger/runconfig/RsExtraDebugDataLoader.kt
Outdated
Show resolved
Hide resolved
debugger/src/main/kotlin/org/rust/debugger/runconfig/RsExtraDebugDataLoader.kt
Outdated
Show resolved
Hide resolved
630f00c
to
7073e45
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
debugger/src/191/main/kotlin/org/rust/debugger/runconfig/RsLocalDebugProcess.kt
Outdated
Show resolved
Hide resolved
7073e45
to
5048f5b
Compare
@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. |
debugger/src/main/kotlin/org/rust/debugger/runconfig/RsDebugProcessConfigurationHelper.kt
Show resolved
Hide resolved
5048f5b
to
fb2ada2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bors r+
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>
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.