about summary refs log tree commit diff
path: root/src/test/debuginfo/var-captured-in-nested-closure.rs
AgeCommit message (Collapse)AuthorLines
2023-01-11Move /src/test to /testsAlbert Larsan-174/+0
2022-02-01debuginfo: Make sure that type names for closure and generator environments ↵Michael Woerister-1/+1
are unique in debuginfo. Before this change, closure/generator environments coming from different instantiations of the same generic function were all assigned the same name even though they were distinct types with potentially different data layout. Now we append the generic arguments of the originating function to the type name. This commit also emits '{closure_env#0}' as the name of these types in order to disambiguate them from the accompanying closure function '{closure#0}'. Previously both were assigned the same name.
2021-09-26Remove box syntax from most places in src/test outside of the issues direst31-2/+1
2021-06-30Improve debug symbol names to avoid ambiguity and work better with MSVC's ↵Daniel Paoliello-1/+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-04-08Fix closed over variables not available in debuginfo for Windows MSVCWesley Wiser-0/+49
The issue was that the resulting debuginfo was too complex for LLVM to translate into CodeView records correctly. As a result, it simply ignored the debuginfo which meant Windows debuggers could not display any closed over variables when stepping inside a closure. This fixes that by spilling additional variables to the stack so that the resulting debuginfo is simple (just `*my_variable.dbg.spill`) and LLVM can generate the correct CV records.
2020-06-09Implement new gdb/lldb pretty-printersortem-8/+8
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.
2018-12-25Remove licensesMark Rousskov-10/+0
2018-10-08Run debuginfo tests against rust-enabled lldb, when possibleTom Tromey-12/+24
If the rust-enabled lldb was built, then use it when running the debuginfo tests. Updating the lldb submodule was necessary as this needed a way to differentiate the rust-enabled lldb, so I added a line to the --version output. This adds compiletest commands to differentiate between the rust-enabled and non-rust-enabled lldb, as is already done for gdb. A new "rust-lldb" header directive is also added, but not used in this patch; I plan to use it in #54004. This updates all the tests.
2016-10-31adapt debuginfo tests for gdb with native rust supportTim Neumann-4/+8
2016-04-16debuginfo: argument and upvar names for MIR.Eduard Burtescu-8/+3
2016-04-11tests: update for MIR debuginfo.Eduard Burtescu-3/+8
2015-09-19Feature-gate `#[no_debug]` and `#[omit_gdb_pretty_printer_section]`Andrew Paseltiner-0/+1
Closes #28091.
2015-03-26Mass rename uint/int to usize/isizeAlex Crichton-2/+2
Now that support has been removed, all lingering use cases are renamed.
2015-03-03Add `: Box<_>` or `::Box<_>` type annotations to various places.Felix S. Klock II-1/+1
This is the kind of change that one is expected to need to make to accommodate overloaded-`box`. ---- Note that this is not *all* of the changes necessary to accommodate Issue 22181. It is merely the subset of those cases where there was already a let-binding in place that made it easy to add the necesasry type ascription. (For unnamed intermediate `Box` values, one must go down a different route; `Box::new` is the option that maximizes portability, but has potential inefficiency depending on whether the call is inlined.) ---- There is one place worth note, `run-pass/coerce-match.rs`, where I used an ugly form of `Box<_>` type ascription where I would have preferred to use `Box::new` to accommodate overloaded-`box`. I deliberately did not use `Box::new` here, because that is already done in coerce-match-calls.rs. ---- Precursor for overloaded-`box` and placement-`in`; see Issue 22181.
2015-02-10Enable test/debuginfo on androidEunji Jeong-1/+0
2015-02-04remove all kind annotations from closuresJorge Aparicio-2/+2
2015-01-07Test fixes and rebase conflictsAlex Crichton-0/+1
2015-01-05fix debuginfo testsJorge Aparicio-2/+2
2014-12-30debuginfo: Add a rust-gdb shell script that will start GDB with Rust pretty ↵Michael Woerister-0/+1
printers enabled.
2014-10-31debuginfo: Make GDB tests use line breakpoints like done in LLDB tests.Michael Woerister-3/+0
On some Windows versions of GDB this is more stable than setting breakpoints via function names.
2014-10-28Update code with new lint namesAaron Turon-1/+1
2014-10-22debuginfo: Gate all LLDB debuginfo tests on a minimum LLDB version being ↵Michael Woerister-0/+1
available
2014-10-08debuginfo: Don't mark struct fields as artificial.Michael Woerister-7/+7
LLDB doesn't allow for reading 'artifical' fields (fields that are generated by the compiler). So do not mark, slice fields, enum discriminants, and GcBox value fields as artificial.
2014-10-02Test fixes from the rollupAlex Crichton-7/+7
2014-10-02tests: remove uses of Gc.Eduard Burtescu-12/+1
2014-07-26Remove managed_box gate from testsBrian Anderson-1/+0
No longer does anything.
2014-07-16debuginfo: Add LLDB autotests to debuginfo test suite.Michael Woerister-2/+42
This commit adds LLDB autotests to the test suite but does not activate them by default yet.
2014-06-14rustc: Obsolete the `@` syntax entirelyAlex Crichton-1/+3
This removes all remnants of `@` pointers from rustc. Additionally, this removes the `GC` structure from the prelude as it seems odd exporting an experimental type in the prelude by default. Closes #14193 [breaking-change]
2014-05-07debuginfo: Split debuginfo autotests into debuginfo-gdb and debuginfo-lldbMichael Woerister-0/+90