rust/tests/debuginfo
Vladimir Makayev fb2d9cdfc5 Implement lldb formattter for "clang encoded" enums (LLDB 18.1+)
Summary:
I landed a fix last year to enable `DW_TAG_variant_part` encoding in LLDBs (https://reviews.llvm.org/D149213). This PR is a corresponding fix in synthetic formatters to decode that information.
This is in no way perfect implementation but at least it improves the status quo. But most types of enums will be visible and debuggable in some way.
I've also updated most of the existing tests that touch enums and re-enabled test cases based on LLDB for enums.

Test Plan:
ran tests `./x test tests/debuginfo/`. Also tested manually in LLDB CLI and LLDB VSCode

Other Thoughs
A better approach would probably be adopting [formatters from codelldb](https://github.com/vadimcn/codelldb/blob/master/formatters/rust.py). There is some neat hack that hooks up summary provider via synthetic provider which can ultimately fix more display issues for Rust types and enums too. But getting it to work well might take more time that I have right now.
2024-05-05 17:53:02 -07:00
..
auxiliary [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
associated-types.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
basic-types-globals-metadata.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
basic-types-globals.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
basic-types-metadata.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
basic-types-mut-globals.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
basic-types.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
borrowed-basic.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
borrowed-c-style-enum.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
borrowed-enum.rs Implement lldb formattter for "clang encoded" enums (LLDB 18.1+) 2024-05-05 17:53:02 -07:00
borrowed-struct.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
borrowed-tuple.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
borrowed-unique-basic.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
box.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
boxed-struct.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
by-value-non-immediate-argument.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
by-value-self-argument-in-trait-impl.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
c-style-enum-in-composite.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
c-style-enum.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
captured-fields-1.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
captured-fields-2.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
closure-in-generic-function.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
collapse-debuginfo-external-attr.rs debuginfo: Stabilize -Z debug-macros, -Z collapse-macro-debuginfo and #[collapse_debuginfo] 2024-04-25 22:14:47 +03:00
collapse-debuginfo-external-flag-overriden-by-attr.rs debuginfo: Stabilize -Z debug-macros, -Z collapse-macro-debuginfo and #[collapse_debuginfo] 2024-04-25 22:14:47 +03:00
collapse-debuginfo-external-flag.rs debuginfo: Stabilize -Z debug-macros, -Z collapse-macro-debuginfo and #[collapse_debuginfo] 2024-04-25 22:14:47 +03:00
collapse-debuginfo-in-non-collapse-macro.rs debuginfo: Stabilize -Z debug-macros, -Z collapse-macro-debuginfo and #[collapse_debuginfo] 2024-04-25 22:14:47 +03:00
collapse-debuginfo-no-attr.rs debuginfo: Stabilize -Z debug-macros, -Z collapse-macro-debuginfo and #[collapse_debuginfo] 2024-04-25 22:14:47 +03:00
collapse-debuginfo-with-attr-flag.rs debuginfo: Stabilize -Z debug-macros, -Z collapse-macro-debuginfo and #[collapse_debuginfo] 2024-04-25 22:14:47 +03:00
collapse-debuginfo-with-attr.rs debuginfo: Stabilize -Z debug-macros, -Z collapse-macro-debuginfo and #[collapse_debuginfo] 2024-04-25 22:14:47 +03:00
collapse-debuginfo-with-yes-flag.rs debuginfo: Stabilize -Z debug-macros, -Z collapse-macro-debuginfo and #[collapse_debuginfo] 2024-04-25 22:14:47 +03:00
constant-debug-locs.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
constant-in-match-pattern.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
coroutine-locals.rs Error on using yield without also using #[coroutine] on the closure 2024-04-24 08:05:29 +00:00
coroutine-objects.rs Implement lldb formattter for "clang encoded" enums (LLDB 18.1+) 2024-05-05 17:53:02 -07:00
cross-crate-spans.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
cross-crate-type-uniquing.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
destructured-fn-argument.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
destructured-for-loop-variable.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
destructured-local.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
drop-locations.rs Remove LLDB persistent results in compiletest. 2024-03-14 17:34:58 +01:00
duration-type.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
embedded-visualizer-point.natvis Move /src/test to /tests 2023-01-11 09:32:08 +00:00
embedded-visualizer-point.py Move /src/test to /tests 2023-01-11 09:32:08 +00:00
embedded-visualizer.natvis Move /src/test to /tests 2023-01-11 09:32:08 +00:00
embedded-visualizer.py Move /src/test to /tests 2023-01-11 09:32:08 +00:00
embedded-visualizer.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
empty-string.rs Fix remaining LLDB commands. 2024-03-15 20:30:45 +01:00
enum-thinlto.rs Implement lldb formattter for "clang encoded" enums (LLDB 18.1+) 2024-05-05 17:53:02 -07:00
evec-in-struct.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
extern-c-fn.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
fixed-sized-array.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
function-arg-initialization.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
function-arguments.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
function-call.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
function-names.rs Error on using yield without also using #[coroutine] on the closure 2024-04-24 08:05:29 +00:00
function-prologue-stepping-regular.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
gdb-char.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
gdb-pretty-struct-and-enums.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
generic-enum-with-different-disr-sizes.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
generic-function.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
generic-functions-nested.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
generic-method-on-generic-struct.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
generic-static-method-on-struct-and-enum.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
generic-struct-style-enum.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
generic-struct.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
generic-tuple-style-enum.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
include_string.rs disable two debuginfo tests under gdb 15 2024-04-15 12:46:22 +00:00
issue-7712.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
issue-12886.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
issue-13213.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
issue-14411.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
issue-22656.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
issue-57822.rs Implement lldb formattter for "clang encoded" enums (LLDB 18.1+) 2024-05-05 17:53:02 -07:00
lexical-scope-in-for-loop.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
lexical-scope-in-if-let.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
lexical-scope-in-if.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
lexical-scope-in-match.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
lexical-scope-in-parameterless-closure.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
lexical-scope-in-stack-closure.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
lexical-scope-in-unconditional-loop.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
lexical-scope-in-unique-closure.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
lexical-scope-in-while.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
lexical-scope-with-macro.rs debuginfo: Stabilize -Z debug-macros, -Z collapse-macro-debuginfo and #[collapse_debuginfo] 2024-04-25 22:14:47 +03:00
lexical-scopes-in-block-expression.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
limited-debuginfo.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
macro-stepping.inc Move /src/test to /tests 2023-01-11 09:32:08 +00:00
macro-stepping.rs Update lldb only tests 2024-04-26 04:11:05 +03:00
marker-types.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
method-on-enum.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
method-on-generic-struct.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
method-on-struct.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
method-on-trait.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
method-on-tuple-struct.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
msvc-pretty-enums.rs Implement lldb formattter for "clang encoded" enums (LLDB 18.1+) 2024-05-05 17:53:02 -07:00
msvc-scalarpair-params.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
multi-byte-chars.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
multi-cgu.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
multiple-functions-equal-var-names.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
multiple-functions.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
mutable-locs.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
mutex.rs std: move Once implementations to sys 2024-03-12 15:41:06 +01:00
name-shadowing-and-scope-nesting.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
no_mangle-info.rs Fix remaining LLDB commands. 2024-03-15 20:30:45 +01:00
numeric-types.rs Stabilize generic NonZero. 2024-04-22 18:48:47 +02:00
option-like-enum.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
packed-struct-with-destructor.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
packed-struct.rs Fix unknown dwim-print command. 2024-03-15 21:08:06 +01:00
path.rs Add rust-lldb pretty printing for Path and PathBuf 2024-03-29 18:02:26 -06:00
pretty-huge-vec.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
pretty-slices.rs Fix remaining LLDB commands. 2024-03-15 20:30:45 +01:00
pretty-std-collections-hash.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
pretty-std-collections.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
pretty-std.rs Fix remaining LLDB commands. 2024-03-15 20:30:45 +01:00
pretty-uninitialized-vec.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
range-types.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
rc_arc.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
recursive-enum.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
recursive-struct.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
reference-debuginfo.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
regression-bad-location-list-67992.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
result-types.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
rwlock-read.rs std: move Once implementations to sys 2024-03-12 15:41:06 +01:00
rwlock-write.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
self-in-default-method.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
self-in-generic-default-method.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
shadowed-argument.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
shadowed-variable.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
should-fail.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
simd.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
simple-lexical-scope.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
simple-struct.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
simple-tuple.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
skip_second_statement_collapse.rs debuginfo: Stabilize -Z debug-macros, -Z collapse-macro-debuginfo and #[collapse_debuginfo] 2024-04-25 22:14:47 +03:00
skip_second_statement.rs debuginfo: Stabilize -Z debug-macros, -Z collapse-macro-debuginfo and #[collapse_debuginfo] 2024-04-25 22:14:47 +03:00
static-method-on-struct-and-enum.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
step-into-match.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
struct-in-enum.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
struct-in-struct.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
struct-namespace.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
struct-style-enum.rs Implement lldb formattter for "clang encoded" enums (LLDB 18.1+) 2024-05-05 17:53:02 -07:00
struct-with-destructor.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
text-to-include-1.txt Move /src/test to /tests 2023-01-11 09:32:08 +00:00
text-to-include-2.txt Move /src/test to /tests 2023-01-11 09:32:08 +00:00
text-to-include-3.txt Move /src/test to /tests 2023-01-11 09:32:08 +00:00
thread-names.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
thread.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
trait-pointers.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
tuple-in-struct.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
tuple-in-tuple.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
tuple-struct.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
tuple-style-enum.rs Implement lldb formattter for "clang encoded" enums (LLDB 18.1+) 2024-05-05 17:53:02 -07:00
type-names.cdb.js Move /src/test to /tests 2023-01-11 09:32:08 +00:00
type-names.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
union-smoke.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
unique-enum.rs Implement lldb formattter for "clang encoded" enums (LLDB 18.1+) 2024-05-05 17:53:02 -07:00
unit-type.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
unreachable-locals.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
unsized.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
var-captured-in-nested-closure.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
var-captured-in-sendable-closure.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
var-captured-in-stack-closure.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
vec-slices.rs disable two debuginfo tests under gdb 15 2024-04-15 12:46:22 +00:00
vec.rs Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00