Commit Graph

69 Commits

Author SHA1 Message Date
Ben Kimock 70320c1936 Enable more debuginfo tests on Windows 2024-08-16 21:14:45 -04:00
Ben Kimock c6815c04cb Re-enable debuginfo tests on freebsd 2024-08-16 10:37:16 -04:00
bors d626fbdc66 Auto merge of #128913 - saethlin:unignore-debuginfo-tests, r=compiler-errors
Enable debuginfo tests that have been "temporarily disabled" for the past 6 years

The PR history is a bit of a mess because I had to test this a lot with try-jobs, so I'll try to summarize the non-obvious changes here.

A number of tests now have `min-lldb-version: 1800`. Those tests should have gotten an lldb version jump either in https://github.com/rust-lang/rust/pull/124781 or long ago. Note that all such tests with that lldb version requirement do not run in Apple CI.

`tests/debuginfo/drop-locations.rs` is staying disabled for now because gdb doesn't know to stop on the drop calls produced by a `}`: https://github.com/rust-lang/rust/issues/128971

`tests/debuginfo/function-arg-initialization.rs` now has `-Zmir-enable-passes=-SingleUseConsts`; without that we initialize the const before the function prelude: https://github.com/rust-lang/rust/issues/128945

`tests/debuginfo/by-value-non-immediate-argument.rs` fails because we don't generate a function prelude for unused non-immediate arguments, even with all optimizations disabled, and this seems to confuse debuggers on aarch64: https://github.com/rust-lang/rust/issues/128973

`tests/debuginfo/pretty-std.rs` is staying disabled on windows-gnu because our test harness doesn't know how to load our pretty-printers on that target: https://github.com/rust-lang/rust/issues/128981

`tests/debuginfo/method-on-enum.rs` and `tests/debuginfo/option-like-enum.rs` encounter some kind of gdb bug on i686-pc-windows-gnu. I don't know enough about that situation to write a good issue.

I plan on doing more work on this test suite. There's clearly a lot more basic cleanup work to do here.
2024-08-16 06:41:16 +00:00
Ben Kimock 23273e03d7 Disable macro-stepping on current lldb 2024-08-15 17:04:26 -04:00
Ben Kimock b89d1976d1 Require gdb version on some tests 2024-08-13 18:20:48 -04:00
beetrees fe4fa2f1da Use the enum2$ Natvis visualiser for repr128 C-style enums 2024-08-13 19:53:21 +01:00
Ben Kimock 28a8301de9 Fix debuginfo providers/tests 2024-08-11 16:51:22 -04:00
Ben Kimock a561484b81 Enable debuginfo tests that have been temporarily disabled for years 2024-08-11 14:20:15 -04:00
Ben Kimock d6c0ebef50 Polymorphize RawVec 2024-08-09 20:06:26 -04:00
Urgau c0c57b3e29 Disallow setting built-in cfgs via set the command-line 2024-08-07 14:08:34 +02:00
beetrees b058de90a3 Add Natvis visualiser and debuginfo tests for f16 2024-07-09 03:47:50 +01:00
Dario Nieuwenhuis b89a0a7838 Add debuginfo tests for collapse_debuginfo for statics. 2024-06-13 16:04:31 +02:00
Boxy 3a6b606ad9 remove const arg windows debug info tests 2024-06-05 22:39:42 +01:00
Michael Goulet 2e082677a6 Fix function-names.rs test 2024-06-05 22:25:42 +01:00
Boxy f74119a2e4 Bless tests and handle tests/crashes 2024-06-05 22:25:42 +01:00
Mark Rousskov dd9c8cc467 Increase vtable layout size
This improves LLVM's codegen by allowing vtable loads to be hoisted out
of loops (as just one example).
2024-06-01 07:42:05 -04:00
Nicholas Nethercote 4654e87d4c Fix tests/debuginfo/strings-and-strs.
It fails on my machine because it embeds pointer addresses in the
expected output.

This commit replaces the addresses with `0x[...]`.
2024-05-20 15:01:59 +10:00
Vladimir Makayev 330ce83a8d lldb-formatters: Use StdSliceSyntheticProvider for &str 2024-05-11 12:11:55 -07:00
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
Vadim Petrochenkov 683ad6b607 Update lldb only tests 2024-04-26 04:11:05 +03:00
Vadim Petrochenkov 98804c1786 debuginfo: Stabilize -Z debug-macros, -Z collapse-macro-debuginfo and #[collapse_debuginfo]
`-Z debug-macros` is "stabilized" by enabling it by default and removing.

`-Z collapse-macro-debuginfo` is stabilized as `-C collapse-macro-debuginfo`.
It now supports all typical boolean values (`parse_opt_bool`) in addition to just yes/no.

Default value of `collapse_debuginfo` was changed from `false` to `external` (i.e. collapsed if external, not collapsed if local).
`#[collapse_debuginfo]` attribute without a value is no longer supported to avoid guessing the default.
2024-04-25 22:14:47 +03:00
Oli Scherer aef0f4024a Error on using yield without also using #[coroutine] on the closure
And suggest adding the `#[coroutine]` to the closure
2024-04-24 08:05:29 +00:00
Markus Reiter 33e68aadc9 Stabilize generic NonZero. 2024-04-22 18:48:47 +02:00
Rémy Rakic 6e19f82160 disable two debuginfo tests under gdb 15
it seems gdb 15 regresses some of our debuginfo tests. disable them
temporarily so that CI doesn't randomly start failing soon.
2024-04-15 12:46:22 +00:00
Nathan Henrie 41e97a0a3f Add rust-lldb pretty printing for Path and PathBuf
Fixes https://github.com/rust-lang/rust/issues/120553
Fixes https://github.com/rust-lang/rust/issues/48462
2024-03-29 18:02:26 -06:00
bors a615cea333 Auto merge of #121885 - reitermarkus:generic-nonzero-inner, r=oli-obk,wesleywiser
Move generic `NonZero` `rustc_layout_scalar_valid_range_start` attribute to inner type.

Tracking issue: https://github.com/rust-lang/rust/issues/120257

r? `@dtolnay`
2024-03-17 02:27:52 +00:00
Markus Reiter e4b27a2a5b Fix unknown dwim-print command. 2024-03-15 21:08:06 +01:00
Markus Reiter 3ee1219088 Fix remaining LLDB commands. 2024-03-15 20:30:45 +01:00
Markus Reiter 96431e4b82 Use explicit LLDB commands instead of print/p aliases. 2024-03-15 15:38:03 +01:00
Markus Reiter 75fba9d574 Remove LLDB persistent results in compiletest. 2024-03-14 17:34:58 +01:00
Markus Reiter 4a799082fe Fix StdNonZeroNumberSummaryProvider. 2024-03-14 17:34:58 +01:00
Markus Reiter ecee730c45 Try fixing debuginfo test. 2024-03-14 17:34:58 +01:00
joboet 22a5267c83 std: move Once implementations to sys 2024-03-12 15:41:06 +01:00
Chris Denton 2a09857729 Update debuginfo tests 2024-03-05 00:19:44 +00:00
Markus Reiter b2fbb8a053 Use generic NonZero in tests. 2024-02-25 12:03:48 +01:00
许杰友 Jieyou Xu (Joe) 6e48b96692 [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
许杰友 Jieyou Xu (Joe) cbf10affb0 Ignore tidy linelength 2024-02-22 16:04:04 +00:00
joboet 1b1b6dd95f update debuginfo test 2024-02-16 12:10:50 +01:00
Markus Reiter 021739c840 Update tests. 2024-01-27 16:38:57 +01:00
Andrew Zhogin 8507f5105b Improved collapse_debuginfo attribute, added command-line flag (no|external|yes) 2024-01-17 23:18:14 +07:00
joboet df3cb23e01 update debuginfo tests on Windows 2024-01-12 08:50:14 +01:00
Andrew Zhogin f2dbebafad Improved support of collapse_debuginfo attribute for macros. 2024-01-08 17:47:18 +07:00
Ben Kimock f9bd7dabcf Check alignment of pointers only when read/written through 2023-11-04 13:01:32 -04:00
Oli Scherer e96ce20b34 s/generator/coroutine/ 2023-10-20 21:14:01 +00:00
Oli Scherer 60956837cf s/Generator/Coroutine/ 2023-10-20 21:10:38 +00:00
bors 960a5edf67 Auto merge of #115128 - davidtwco:re-enable-debuginfo-test, r=wesleywiser
tests: re-enable pretty-std-collections on macOS

Fixes #78665.

I made some small modifications to this test so that it would pass for me locally (though I was only able to test using lldb without built-in Rust support, but that seems to be the mode in which it would fail). I ran it a few hundred times with stage one and stage two to see if I could re-produce the spurious failures that were being reported in #78665 and couldn't. From the discussion in #78665, it seemed like this was related to Xcode versions and could be reproduced locally fairly easily. It's been a couple years since this was disabled so a lot has changed. If this starts failing spuriously again then we can disable it and I can look into that.

r? `@wesleywiser` (discussed in wg-debugging's triage meeting)
2023-09-12 19:39:27 +00:00
David Wood 3bd5dc3c61 tests: re-enable pretty-std-collections on macOS
Signed-off-by: David Wood <david@davidtw.co>
2023-08-30 13:12:34 +01:00
David Wood 0848ebd056 tests: add test for #67992
Signed-off-by: David Wood <david@davidtw.co>
2023-08-25 10:31:22 +01:00
Jubilee Young 20ebbf467d Replace ignore-everything with only-arch
Combining revisions with only-arch allows specifying
that a test only applies to a handful of targets.
This allows removing a large amount of repetition
in the test suite for tests that do not benefit.
The revisions are suboptimal for this for some tests,
so they aren't preferred in those cases.
2023-07-29 15:49:07 -07:00
Wesley Wiser 12bed9d8cc Update natvis to match full type names for Arc, Rc, Weak, etc
Also update a test case to have the correct whitespace in a type name.
2023-07-17 15:51:46 -04:00