-
Notifications
You must be signed in to change notification settings - Fork 14k
Open
Labels
C-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.WG-debuggingWorking group: Bad Rust debugging experiencesWorking group: Bad Rust debugging experiences
Description
Hello,
I'm currently facing an issue preventing me from debugging some code where recursive enums are involved. I cannot read the value from the debugger (LLDB using the extension from Vadim Chugunov on VSCode), instead I get the following error message in vscode: "<error: invalid value object>". Other types are readable, even non-recursive enums.
A picture is worth a thousand words so here it is:
The code to reproduce is simple:
#[derive(Debug)]
enum Test{
Test(Box<Test>),
Tail
}
fn main() {
let t = Test::Test(Box::new(Test::Tail));
println!("{:?}", t);
}Ideally, I would be able to troubleshoot the content of the variable.
Here is the version of rust I'm using:
$ rustc --version --verbose
rustc 1.74.0 (79e9716c9 2023-11-13)
binary: rustc
commit-hash: 79e9716c980570bfd1f666e3b16ac583f0168962
commit-date: 2023-11-13
host: x86_64-unknown-linux-gnu
release: 1.74.0
LLVM version: 17.0.4I have the same problem with the nightly
$ rustc --version --verbose
rustc 1.76.0-nightly (37b2813a7 2023-11-24)
binary: rustc
commit-hash: 37b2813a7be580ef59048a6bd08444c79e5cc97f
commit-date: 2023-11-24
host: x86_64-unknown-linux-gnu
release: 1.76.0-nightly
LLVM version: 17.0.5I think this might not be a bug but rather a use case not yet properly handled by rust and/or lldb. Does anyone know?
Thanks in advance.
chaploud, garcia, GuyResh, johnrrowe, elenakrittik and 6 more
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.WG-debuggingWorking group: Bad Rust debugging experiencesWorking group: Bad Rust debugging experiences
