LLDB `v --ptr-depth 1` can't dereference pointer to a struct
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
I tried this code:
struct S(i32);
fn main() {
let s = &S(1);
println!("Hello, world!");
}
When using LLDB with nightly Rust's pretty printers, I expect v --ptr-depth 1 to dereference the pointer to the struct and display its contents:
Process stopped
* thread #1, name = 'pp', stop reason = step over
frame #0: 0x0000555555568bd0 pp`pp::main::hf3117127974a188e at main.rs:5:5
2
3 fn main() {
4 let s = &S(1);
-> 5 println!("Hello, world!");
6 }
(lldb) v --ptr-depth 1
(pp::S *) s = 0x0000555555559a84 {
__0 = 1
}
Instead, it only prints the pointer address:
Process stopped
* thread #1, name = 'pp', stop reason = step over
frame #0: 0x0000555555568bd0 pp`pp::main::hf3117127974a188e at main.rs:5:5
2
3 fn main() {
4 let s = &S(1);
-> 5 println!("Hello, world!");
6 }
(lldb) v --ptr-depth 1
(pp::S *) s = 0x0000555555559a84
This regressed in https://github.com/rust-lang/rust/commit/c39ebeaa0b780afbeb40c8a42cc20bea861ca458
Meta
rustc --version --verbose:
rustc 1.92.0-nightly (3d8c1c1fc 2025-10-06)
lldb --version:
lldb version 20.1.8
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with the Rust snippet and LLDB command shown, then inspect the regression introduced by commit c39ebeaa0b780afbeb40c8a42cc20bea861ca458. The fix is complete when v --ptr-depth 1 displays the pointed-to struct contents, including __0 = 1, rather than only its address.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers, devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100