debuginfo: slices are DW_TAG_array_type's#153238
debuginfo: slices are DW_TAG_array_type's#153238shua wants to merge 2 commits intorust-lang:mainfrom
Conversation
|
r? @davidtwco rustbot has assigned @davidtwco. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
another relevant thread from gdb bugtracker about rust's weird unsized type debug info and some related fixes in gdb: https://sourceware.org/bugzilla/show_bug.cgi?id=30330 . The type of change here (changing slice types to be array types with no count, similar to C's VLA/FMA) was discussed but I guess never implemented in rustc? |
This comment has been minimized.
This comment has been minimized.
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
Rust debuginfo for unsized structs with embedded slice types is lacking, and it makes it difficult for debuggers to correctly print types like
Rc<str>(eg #114195). Specifically, these three structs would have essentially the same debug info (modulo some names):This changes how the compiler generates debuginfo in this case, and I used existing compilers (gcc, clang) handling of C flexible member arrays as a reference.