about summary refs log tree commit diff
path: root/src/test/debuginfo/rc_arc.rs
AgeCommit message (Collapse)AuthorLines
2023-01-11Move /src/test to /testsAlbert Larsan-145/+0
2022-10-31[debuginfo] Make debuginfo type names for slices and str consistent.Michael Woerister-4/+4
Before this PR, the compiler would emit the debuginfo name `slice$<T>` for all kinds of slices, regardless of whether they are behind a reference or not and regardless of the kind of reference. As a consequence, the types `Foo<&[T]>`, `Foo<[T]>`, and `Foo<&mut [T]>` would end up with the same type name `Foo<slice$<T> >` in debuginfo, making it impossible to disambiguate between them by name. Similarly, `&str` would get the name `str` in debuginfo, so the debuginfo name for `Foo<str>` and `Foo<&str>` would be the same. In contrast, `*const [bool]` and `*mut [bool]` would be `ptr_const$<slice$<bool> >` and `ptr_mut$<slice$<bool> >`, i.e. the encoding does not lose information about the type. This PR removes all special handling for slices and `str`. The types `&[bool]`, `&mut [bool]`, and `&str` thus get the names `ref$<slice2$<bool> >`, `ref_mut$<slice2$<bool> >`, and `ref$<str$>` respectively -- as one would expect.
2022-06-15The type of the slice length field is architecture dependentWesley Wiser-4/+4
2022-06-15debuginfo: Fix NatVis for Rc and Arc with unsized pointees.Michael Woerister-40/+104
2021-11-28tests: Ignore `test/debuginfo/rc_arc.rs` on windows-gnuVadim Petrochenkov-1/+1
The tests checks some pretty-printer output, but pretty-printers are not embedded on windows-gnu
2021-08-16Fix a debuginfo testCameron Steffen-1/+3
2021-07-12Add test for `Unique<T>`, weak ref counts and ref counts for `Weak<T>`Wesley Wiser-0/+8
2021-07-08Add/improve visualizations for liballoc typesWesley Wiser-2/+11
2021-06-30Improve debug symbol names to avoid ambiguity and work better with MSVC's ↵Daniel Paoliello-2/+1
debugger There are several cases where names of types and functions in the debug info are either ambiguous, or not helpful, such as including ambiguous placeholders (e.g., `{{impl}}`, `{{closure}}` or `dyn _'`) or dropping qualifications (e.g., for dynamic types). Instead, each debug symbol name should be unique and useful: * Include disambiguators for anonymous `DefPathDataName` (closures and generators), and unify their formatting when used as a path-qualifier vs item being qualified. * Qualify the principal trait for dynamic types. * If there is no principal trait for a dynamic type, emit all other traits instead. * Respect the `qualified` argument when emitting ref and pointer types. * For implementations, emit the disambiguator. * Print const generics when emitting generic parameters or arguments. Additionally, when targeting MSVC, its debugger treats many command arguments as C++ expressions, even when the argument is defined to be a symbol name. As such names in the debug info need to be more C++-like to be parsed correctly: * Avoid characters with special meaning (`#`, `[`, `"`, `+`). * Never start a name with `<` or `{` as this is treated as an operator. * `>>` is always treated as a right-shift, even when parsing generic arguments (so add a space to avoid this). * Emit function declarations using C/C++ style syntax (e.g., leading return type). * Emit arrays as a synthetic `array$<type, size>` type. * Include a `$` in all synthetic types as this is a legal character for C++, but not Rust (thus we avoid collisions with user types).
2021-06-25Add debug info tests for range, fix-sized array, and cell types.Nam Nguyen-1/+26
2020-08-02tests: Ignore src/test/debuginfo/rc_arc.rs on WindowsVadim Petrochenkov-0/+1
It requires loading pretty-printers, but GDB doesn't load them on Windows
2020-06-09Implement new gdb/lldb pretty-printersortem-0/+37
Replace old GDB and LLDB pretty-printers with new ones which were originally written for IntelliJ Rust. New LLDB pretty-printers support synthetic children. New GDB/LLDB pretty-printers support all Rust types supported by old pretty-printers, and also support: Rc, Arc, Cell, Ref, RefCell, RefMut, HashMap, HashSet.