Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stepping with "next" in a debugger skips past end-of-scope drops #128971

Open
saethlin opened this issue Aug 11, 2024 · 0 comments
Open

Stepping with "next" in a debugger skips past end-of-scope drops #128971

saethlin opened this issue Aug 11, 2024 · 0 comments
Labels
A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.) C-bug Category: This is a bug. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. WG-debugging Working group: Bad Rust debugging experiences

Comments

@saethlin
Copy link
Member

I am trying to re-enable a lot of disabled debuginfo tests, and in doing that I learned that tests/debuginfo/drop-locations https://github.com/rust-lang/rust/blob/c9bd03cb724e13cca96ad320733046cbdb16fbbe/tests/debuginfo/drop-locations.rs was broken at some point in the past 6 years. No idea when, I will not be doing a bisection.

The bug is that in code like this:

{
    let s = String::from("s");
}

stepping through this with the gdb command next should step from the String::from call to the close brace. But gdb never stops on the close brace, even though there is indeed a call to drop_in_place for the String, and the debuginfo for the call correctly points at the close brace.

@saethlin saethlin added the C-bug Category: This is a bug. label Aug 11, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Aug 11, 2024
@saethlin saethlin added A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Aug 11, 2024
@saethlin saethlin added the WG-debugging Working group: Bad Rust debugging experiences label Aug 11, 2024
bors added a commit to rust-lang-ci/rust that referenced this issue Aug 13, 2024
…=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 rust-lang#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 `}`: rust-lang#128971

`tests/debuginfo/function-arg-initialization.rs` now has `-Zmir-enable-passes=-SingleUseConsts`; without that we initialize the const before the function prelude: rust-lang#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: rust-lang#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: rust-lang#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.
bors added a commit to rust-lang-ci/rust that referenced this issue Aug 13, 2024
…=<try>

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 rust-lang#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 `}`: rust-lang#128971

`tests/debuginfo/function-arg-initialization.rs` now has `-Zmir-enable-passes=-SingleUseConsts`; without that we initialize the const before the function prelude: rust-lang#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: rust-lang#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: rust-lang#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.

try-job: i686-gnu
try-job: aarch64-gnu
try-job: x86_64-msvc
try-job: i686-mingw
bors added a commit to rust-lang-ci/rust that referenced this issue Aug 15, 2024
…=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 rust-lang#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 `}`: rust-lang#128971

`tests/debuginfo/function-arg-initialization.rs` now has `-Zmir-enable-passes=-SingleUseConsts`; without that we initialize the const before the function prelude: rust-lang#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: rust-lang#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: rust-lang#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.
bors added a commit to rust-lang-ci/rust that referenced this issue Aug 15, 2024
…=<try>

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 rust-lang#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 `}`: rust-lang#128971

`tests/debuginfo/function-arg-initialization.rs` now has `-Zmir-enable-passes=-SingleUseConsts`; without that we initialize the const before the function prelude: rust-lang#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: rust-lang#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: rust-lang#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.

try-job: x86_64-gnu-llvm-17
try-job: x86_64-gnu-tools
try-job: aarch64-gnu
try-job: arm-android
try-job: armhf-gnu
try-job: i686-gnu
try-job: i686-gnu-nopt
try-job: mingw-check
try-job: test-various
try-job: x86_64-fuchsia
try-job: x86_64-rust-for-linux
try-job: x86_64-gnu
try-job: x86_64-gnu-stable
try-job: x86_64-gnu-aux
try-job: x86_64-gnu-debug
try-job: x86_64-gnu-llvm-18
try-job: x86_64-gnu-nopt
try-job: x86_64-apple-1
try-job: aarch64-apple
try-job: x86_64-msvc
try-job: i686-msvc
try-job: i686-mingw
try-job: x86_64-mingw
bors added a commit to rust-lang-ci/rust that referenced this issue Aug 15, 2024
…=<try>

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 rust-lang#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 `}`: rust-lang#128971

`tests/debuginfo/function-arg-initialization.rs` now has `-Zmir-enable-passes=-SingleUseConsts`; without that we initialize the const before the function prelude: rust-lang#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: rust-lang#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: rust-lang#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.

try-job: aarch64-gnu
try-job: arm-android
try-job: armhf-gnu
try-job: i686-gnu
try-job: i686-gnu-nopt
try-job: test-various
try-job: x86_64-fuchsia
try-job: x86_64-rust-for-linux
try-job: x86_64-gnu
try-job: x86_64-gnu-stable
bors added a commit to rust-lang-ci/rust that referenced this issue Aug 15, 2024
…=<try>

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 rust-lang#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 `}`: rust-lang#128971

`tests/debuginfo/function-arg-initialization.rs` now has `-Zmir-enable-passes=-SingleUseConsts`; without that we initialize the const before the function prelude: rust-lang#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: rust-lang#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: rust-lang#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.

try-job: aarch64-apple
try-job: aarch64-gnu
try-job: dist-i586-gnu-i586-i686-musl
try-job: i686-gnu
try-job: i686-gnu-nopt
try-job: i686-mingw
try-job: i686-msvc
try-job: test-various
try-job: x86_64-apple-1
bors added a commit to rust-lang-ci/rust that referenced this issue Aug 16, 2024
…=<try>

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 rust-lang#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 `}`: rust-lang#128971

`tests/debuginfo/function-arg-initialization.rs` now has `-Zmir-enable-passes=-SingleUseConsts`; without that we initialize the const before the function prelude: rust-lang#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: rust-lang#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: rust-lang#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.

try-job: x86_64-gnu
try-job: x86_64-gnu-distcheck
try-job: x86_64-gnu-llvm-17
try-job: x86_64-gnu-llvm-18
try-job: x86_64-gnu-nopt
try-job: x86_64-gnu-stable
try-job: x86_64-mingw
try-job: x86_64-msvc
bors added a commit to rust-lang-ci/rust that referenced this issue Aug 16, 2024
…=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 rust-lang#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 `}`: rust-lang#128971

`tests/debuginfo/function-arg-initialization.rs` now has `-Zmir-enable-passes=-SingleUseConsts`; without that we initialize the const before the function prelude: rust-lang#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: rust-lang#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: rust-lang#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.
github-actions bot pushed a commit to rust-lang/miri that referenced this issue Aug 17, 2024
…-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 rust-lang/rust#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 `}`: rust-lang/rust#128971

`tests/debuginfo/function-arg-initialization.rs` now has `-Zmir-enable-passes=-SingleUseConsts`; without that we initialize the const before the function prelude: rust-lang/rust#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: rust-lang/rust#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: rust-lang/rust#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.
lnicola pushed a commit to lnicola/rust-analyzer that referenced this issue Aug 29, 2024
…-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 rust-lang/rust#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 `}`: rust-lang/rust#128971

`tests/debuginfo/function-arg-initialization.rs` now has `-Zmir-enable-passes=-SingleUseConsts`; without that we initialize the const before the function prelude: rust-lang/rust#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: rust-lang/rust#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: rust-lang/rust#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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.) C-bug Category: This is a bug. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. WG-debugging Working group: Bad Rust debugging experiences
Projects
None yet
Development

No branches or pull requests

2 participants