[llvm] [DebugInfo][DWARF] Set is_stmt on first non-line-0 instruction in BB (PR #105524)

Stephen Tozer via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 21 12:11:40 PDT 2024


================
@@ -0,0 +1,38 @@
+;; Checks that when an instruction at the start of a BasicBlock has the same
+;; DebugLoc as the instruction at the end of the previous BasicBlock, we add
+;; is_stmt to the new line, to ensure that we still step on it if we arrive from
+;; a BasicBlock other than the immediately preceding one.
+
+; RUN: %llc_dwarf -O0 -filetype=obj < %s | llvm-dwarfdump --debug-line - | FileCheck %s
+
+; CHECK:      {{0x[0-9a-f]+}}     13      5 {{.+}} is_stmt
+; CHECK-NEXT: {{0x[0-9a-f]+}}     13     25 {{.+}} is_stmt
----------------
SLTozer wrote:

Hm, trying to make this work has revealed another an issue - when the lines are actually identical, they will be merged into a single entry (whether this patch is in effect or not), which any jump to the branch would land in the middle of. I'm not sure whether that would result in a step in the debugger or not; it prevents the test from working, at the very least.

https://github.com/llvm/llvm-project/pull/105524


More information about the llvm-commits mailing list