Skip to content

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

Open

Description

@saethlin

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.

Activity

  1. added
    C-bug
    on Aug 11, 2024
  2. added
    needs-triage
    on Aug 11, 2024
  3. added
    A-debuginfo
    T-compiler
    WG-debugging
    and removed
    needs-triage
    on Aug 11, 2024
  4. added 8 commits that reference this issue on Aug 13, 2024
  5. added a commit that references this issue on Apr 17, 2025
  6. added a commit that references this issue on Apr 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-debuginfoC-bugT-compilerWG-debugging

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions