13 Commits

Author SHA1 Message Date
Martin Nordholts 98242676d9 tests/debuginfo/basic-stepping.rs: Remove FIXME related to ZSTs
We don't consider it a bug that users can't break on initialization of
some non-zero sized types (see comment on `maximally-steppable` at the
top of the file), so it does not make sense to consider it a bug that
users can't break on initialization of some zero-sized types.
2026-04-16 06:05:12 +02:00
Martin Nordholts 686ddd3e2e tests/debuginfo/basic-stepping.rs: Explain why all lines are not steppable
Some optimization passes _improve_ compile times [1]. So we want to run
some passes even with `-Copt-level=0`. That means that some of the lines
in the test can be optimized away. To make regression testing more
robust, we also want to run the test with such passes disabled. The
solution is to use two revisions. One with default `-Copt-level=0`
passes, and one "even less optimized", with enough optimization passes
disabled to keep the maximum number of lines steppable.

[1]: https://github.com/rust-lang/compiler-team/issues/319
2026-03-16 18:39:40 +01:00
Martin Nordholts a27fdfbf01 tests/debuginfo/basic-stepping.rs: Remove ignore-aarch64
It works now.
2026-03-14 18:24:49 +01:00
Martin Nordholts 17c079625c tests/debuginfo/basic-stepping.rs: Add cdb test 2026-03-14 06:46:57 +01:00
Martin Nordholts 512d5fd676 tests/debuginfo/basic-stepping.rs: Add lldb test
Also move the FIXME to the source code to avoid duplication, and also
suppress harmless warnings that are annoying when you compile manually.
2026-03-12 20:30:21 +01:00
Martin Nordholts 622572f6df tests/debuginfo/basic-stepping.rs: Add revisions default-mir-passes, no-SingleUseConsts-mir-pass
To prevent regressions our test must cover the code both inside and
outside of the `SingleUseConsts` MIR pass. Use revisions for that.
2026-01-05 08:08:52 +01:00
Martin Nordholts de505d24db tests/debuginfo/basic-stepping.rs: Don't mix compile-flags with ignore-*
We want directives nice and tidy.
2026-01-05 08:08:03 +01:00
Martin Nordholts 5b57d02e9f compiletest: Use //@ prefixes also for debuginfo test directives
So that when we later add support for revisions we can use the same
syntax for revisions as elsewhere.

This also prevents people from making typos for commands since
`src/tools/compiletest/src/directives/directive_names.rs` will catch such
typos now.

Note that we one FIXME for a non-trivial change for later:
```
// FIXME(148097): Change `// cdb-checksimple_closure` to `//@ cdb-check:simple_closure`
```
2025-11-25 06:13:45 +01:00
Martin Nordholts 5ad2f434dc rustc_codegen_llvm: Require opt-level >= 1 for index-based loop
To make debugger stepping intuitive with `-Copt-level=0`. See the
adjusted `basic-stepping.rs` test.

This is kind of a revert of bd0aae92dc, except we don't revert it,
we just make it conditional on `opt-level`. That commit regressed
`basic-stepping.rs`, but it was not noticed since that test did not
exist back then. I have retroactively bisected to find that out.

It seems messy to sprinkle if-cases inside of the
`write_operand_repeatedly()` so make the whole function conditional.

The test that bd0aae92dc added in
`tests/codegen/issues/issue-111603.rs` already use `-Copt-level=3`, so
we don't need to adjust the compiler flags for it to keep passing.
2025-11-13 06:29:55 +01:00
Guillaume Gomez 2ad443c849 Ignore failing debuginfo tests with gcc backend 2025-10-13 15:20:49 +02:00
Caiweiran a54567e76c tests: Ignore basic-stepping.rs on riscv64 2025-08-29 08:11:48 +00:00
WANG Rui d61353ff43 tests: Ignore basic-stepping.rs on LoongArch 2025-08-22 15:58:52 +08:00
Martin Nordholts 534b1355ef tests: Add test for basic line-by-line stepping in a debugger
Let's wait with lldb testing until the test works properly with gdb.
2025-07-26 13:06:21 +02:00