Open
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.4
I 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.5
I 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.