-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
gdb "cannot subscript non-array type" to index a Vec #66482
Copy link
Copy link
Open
Labels
A-debuginfoArea: Debugging information in compiled programs (DWARF, PDB, etc.)Area: Debugging information in compiled programs (DWARF, PDB, etc.)C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.P-mediumMedium priorityMedium priorityT-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.
Metadata
Metadata
Assignees
Labels
A-debuginfoArea: Debugging information in compiled programs (DWARF, PDB, etc.)Area: Debugging information in compiled programs (DWARF, PDB, etc.)C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.P-mediumMedium priorityMedium priorityT-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.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Attempt to print content of a
Vecat index results in error. Since it works fine for C++, I think the problem is inrustcnot providing the necessary debug information for this to work.Vecs are a widely used type, and not being able to print their content at index hurts debugging process noticeably.Steps to reproduce (in terms of terminal commands)
Expected
A print:
Actual
It prints:
Additional information
rustc version:
rustc 1.41.0-nightly (1bd30ce2a 2019-11-15)gdb version:
8.3.1