-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
C-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-dev-toolsRelevant to the dev-tools subteam, which will review and decide on the PR/issue.Relevant to the dev-tools subteam, which will review and decide on the PR/issue.
Description
It would be nice if rust-gdb
/etc. could pretty-print the inner value of Rc
and Arc
. Right now you only get the raw details, like:
(gdb) p foo
$1 = Rc<i32> = {ptr = NonNull<alloc::rc::RcBox<i32>> = {
pointer = NonZero<*const alloc::rc::RcBox<i32>> = {0x555555783a40}},
phantom = PhantomData<i32>}
Getting the actual value requires manual field access, foo.ptr.pointer.0.value
, which could also change if Rc
internals change.
Maybe this could be approached as more general Deref
support, so you could p *foo
here, but right now that just says "Attempt to take contents of a non-pointer value."
yfractal and ebkalderon
Metadata
Metadata
Assignees
Labels
C-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-dev-toolsRelevant to the dev-tools subteam, which will review and decide on the PR/issue.Relevant to the dev-tools subteam, which will review and decide on the PR/issue.