Open apodolsk opened 3 weeks ago
Can't add a label, so preemptively pinging debug wg: @pnkfelix @wesleywiser. Github noob, so let me know if that's in bad taste.
@rustbot label: +A-debuginfo +WG-debugging
...actually, I'm not sure debuginfo actually has anything to do with this, thinking about it. I don't know that we have a label for debugger expressions.
@rustbot label: -A-debuginfo
I tried this code:
When debugging in gdb, I expect to be able to write an expression to access a value inside a tuple, inside an enum. I want to do that so that I can e.g. dereference a pointer stored in such a tuple. It seems that
a.0
accesses theSome
branch of my option, so I would expecta.0.0
to access the first tuple elem.Instead,
a.0.0
triggers a gdb expression syntax error. Note that it does work to append.0
to a gdb variable storinga.0
to access the tuple, which further suggests thata.0.0
should work.a.0
to access theSome
admittedly seems like a bit of black magic. Helper functions likeunwrap
are consistently not available in the binaries that I've tried to debug thus far, so I'm not sure what else I should be doing.Meta
rustc --version --verbose
: