Skip to content

Conversation

@Enselic
Copy link
Member

@Enselic Enselic commented Oct 24, 2025

So that stepping with a debugger over lines such as:

let h = ["whatever"; 8];

works.

Use the same technique as we already do in cfi_type_test().

Since all emitted LLVM instructions are looped over, a debugger will unfortunately step as many times as we repeat. Not sure how to solve that. It can become quite annoying if you have say 1024 repetitions.

This is an alternative to #147462.

@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Oct 24, 2025
@Enselic Enselic force-pushed the write_operand_repeatedly-dbg-loc branch 2 times, most recently from 934c3af to 4b7b021 Compare October 24, 2025 03:57
@rust-log-analyzer

This comment has been minimized.

So that stepping with a debugger over lines such as:

    let h = ["whatever"; 8];

works.

Use the same technique as we already do in `cfi_type_test()`.

Since all emitted LLVM instructions are looped over, a debugger will
unfortunately step as many times as we repeat. Not sure how to solve
that. It can become quite annoying if you have say `1024` repetitions.
@Enselic Enselic force-pushed the write_operand_repeatedly-dbg-loc branch from 4b7b021 to 79c8c8a Compare October 24, 2025 04:31
@Enselic Enselic changed the title rustc_codegen_llvm/gcc: Add debug locations to write_operand_repeatedly() rustc_codegen_llvm: Add debug locations to write_operand_repeatedly() Oct 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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.

3 participants