Skip to content

tests/debuginfo/basic-stepping.rs: Explain why all lines are not steppable#153941

Merged
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
Enselic:fully-steppable
Apr 13, 2026
Merged

tests/debuginfo/basic-stepping.rs: Explain why all lines are not steppable#153941
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
Enselic:fully-steppable

Conversation

@Enselic
Copy link
Copy Markdown
Member

@Enselic Enselic commented Mar 16, 2026

Some optimization passes improve compile times. So we want to run some passes even with -Copt-level=0. That means that some debuggable lines can be optimized away. Document that as expected behavior.

Closes #33013.

Replaces #151426. See that PR for some discussion.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Mar 16, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Mar 16, 2026

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Fallback group: @Mark-Simulacrum, @jieyouxu
  • @Mark-Simulacrum, @jieyouxu expanded to Mark-Simulacrum, jieyouxu
  • Random selection from Mark-Simulacrum, jieyouxu

…pable

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]: rust-lang/compiler-team#319
@Mark-Simulacrum
Copy link
Copy Markdown
Member

r? saethlin

If needed can take this but sounds like there's already been some discussion and I think you might have more context anyway.

@rustbot rustbot assigned saethlin and unassigned Mark-Simulacrum Mar 23, 2026
@saethlin
Copy link
Copy Markdown
Member

I'm still surprised that DWARF doesn't give us the ability to produce the desired behavior in a debugger, but the changes here do indeed reflect reality.

@bors r+ rollup

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Apr 13, 2026

📌 Commit 686ddd3 has been approved by saethlin

It is now in the queue for this repository.

@rust-bors rust-bors bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 13, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Apr 13, 2026
tests/debuginfo/basic-stepping.rs: Explain why all lines are not steppable

Some optimization passes [_improve_](rust-lang/compiler-team#319) compile times. So we want to run some passes even with `-Copt-level=0`. That means that some debuggable lines can be optimized away. Document that as expected behavior.

Closes rust-lang#33013.

Replaces rust-lang#151426. See that PR for some discussion.
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Apr 13, 2026
tests/debuginfo/basic-stepping.rs: Explain why all lines are not steppable

Some optimization passes [_improve_](rust-lang/compiler-team#319) compile times. So we want to run some passes even with `-Copt-level=0`. That means that some debuggable lines can be optimized away. Document that as expected behavior.

Closes rust-lang#33013.

Replaces rust-lang#151426. See that PR for some discussion.
rust-bors bot pushed a commit that referenced this pull request Apr 13, 2026
…uwer

Rollup of 13 pull requests

Successful merges:

 - #155162 (relnotes for 1.95)
 - #140763 (Change codegen of LLVM intrinsics to be name-based, and add llvm linkage support for `bf16(xN)` and `i1xN`)
 - #154049 (delegation: Track more precise spans for glob delegations)
 - #154193 (Implement EII for statics)
 - #154435 (resolve: Some import resolution cleanups)
 - #153941 (tests/debuginfo/basic-stepping.rs: Explain why all lines are not steppable)
 - #154587 (Add --verbose-run-make-subprocess-output flag to suppress verbose run-make output for passing tests)
 - #154624 (Make `DerefPure` dyn-incompatible)
 - #154929 (Add `const Default` impls for `LazyCell` and `LazyLock`)
 - #154944 (Small refactor of `arena_cache` query values)
 - #155131 (Stabilize feature `uint_bit_width`)
 - #155147 (Stabilize feature `int_lowest_highest_one`)
 - #155174 (Improve emission of `UnknownDiagnosticAttribute` lint)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Apr 13, 2026
tests/debuginfo/basic-stepping.rs: Explain why all lines are not steppable

Some optimization passes [_improve_](rust-lang/compiler-team#319) compile times. So we want to run some passes even with `-Copt-level=0`. That means that some debuggable lines can be optimized away. Document that as expected behavior.

Closes rust-lang#33013.

Replaces rust-lang#151426. See that PR for some discussion.
rust-bors bot pushed a commit that referenced this pull request Apr 13, 2026
…uwer

Rollup of 19 pull requests

Successful merges:

 - #155162 (relnotes for 1.95)
 - #140763 (Change codegen of LLVM intrinsics to be name-based, and add llvm linkage support for `bf16(xN)` and `i1xN`)
 - #153604 (Fix thread::available_parallelism on WASI targets with threads)
 - #154193 (Implement EII for statics)
 - #154389 (Add more robust handling of nested query cycles)
 - #154435 (resolve: Some import resolution cleanups)
 - #155236 (Normalize individual predicate of `InstantiatedPredicates` inside `predicates_for_generics`)
 - #155243 (cg_ssa: transmute between scalable vectors)
 - #153941 (tests/debuginfo/basic-stepping.rs: Explain why all lines are not steppable)
 - #154587 (Add --verbose-run-make-subprocess-output flag to suppress verbose run-make output for passing tests)
 - #154624 (Make `DerefPure` dyn-incompatible)
 - #154929 (Add `const Default` impls for `LazyCell` and `LazyLock`)
 - #154944 (Small refactor of `arena_cache` query values)
 - #155055 (UI automation)
 - #155062 (Move tests from `tests/ui/issues/` to appropriate directories)
 - #155131 (Stabilize feature `uint_bit_width`)
 - #155147 (Stabilize feature `int_lowest_highest_one`)
 - #155174 (Improve emission of `UnknownDiagnosticAttribute` lint)
 - #155194 (Fix manpage version replacement and use verbose version)
@rust-bors rust-bors bot merged commit 978fb76 into rust-lang:main Apr 13, 2026
11 checks passed
@rustbot rustbot added this to the 1.97.0 milestone Apr 13, 2026
rust-timer added a commit that referenced this pull request Apr 13, 2026
Rollup merge of #153941 - Enselic:fully-steppable, r=saethlin

tests/debuginfo/basic-stepping.rs: Explain why all lines are not steppable

Some optimization passes [_improve_](rust-lang/compiler-team#319) compile times. So we want to run some passes even with `-Copt-level=0`. That means that some debuggable lines can be optimized away. Document that as expected behavior.

Closes #33013.

Replaces #151426. See that PR for some discussion.
github-actions bot pushed a commit to rust-lang/rustc-dev-guide that referenced this pull request Apr 13, 2026
…uwer

Rollup of 19 pull requests

Successful merges:

 - rust-lang/rust#155162 (relnotes for 1.95)
 - rust-lang/rust#140763 (Change codegen of LLVM intrinsics to be name-based, and add llvm linkage support for `bf16(xN)` and `i1xN`)
 - rust-lang/rust#153604 (Fix thread::available_parallelism on WASI targets with threads)
 - rust-lang/rust#154193 (Implement EII for statics)
 - rust-lang/rust#154389 (Add more robust handling of nested query cycles)
 - rust-lang/rust#154435 (resolve: Some import resolution cleanups)
 - rust-lang/rust#155236 (Normalize individual predicate of `InstantiatedPredicates` inside `predicates_for_generics`)
 - rust-lang/rust#155243 (cg_ssa: transmute between scalable vectors)
 - rust-lang/rust#153941 (tests/debuginfo/basic-stepping.rs: Explain why all lines are not steppable)
 - rust-lang/rust#154587 (Add --verbose-run-make-subprocess-output flag to suppress verbose run-make output for passing tests)
 - rust-lang/rust#154624 (Make `DerefPure` dyn-incompatible)
 - rust-lang/rust#154929 (Add `const Default` impls for `LazyCell` and `LazyLock`)
 - rust-lang/rust#154944 (Small refactor of `arena_cache` query values)
 - rust-lang/rust#155055 (UI automation)
 - rust-lang/rust#155062 (Move tests from `tests/ui/issues/` to appropriate directories)
 - rust-lang/rust#155131 (Stabilize feature `uint_bit_width`)
 - rust-lang/rust#155147 (Stabilize feature `int_lowest_highest_one`)
 - rust-lang/rust#155174 (Improve emission of `UnknownDiagnosticAttribute` lint)
 - rust-lang/rust#155194 (Fix manpage version replacement and use verbose version)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

inconsistent stepping in gdb

4 participants