[llvm] [llvm-debuginfo-analyzer] Fixed some DWARF related bugs (PR #153318)
Adam Yang via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 22 12:16:26 PDT 2025
https://github.com/adam-yang updated https://github.com/llvm/llvm-project/pull/153318
>From cada2c56ece9b7e15522e598c1628e71e8803712 Mon Sep 17 00:00:00 2001
From: Adam Yang <hanbyang at microsoft.com>
Date: Tue, 12 Aug 2025 15:38:12 -0700
Subject: [PATCH 1/6] Fixed some bugs in LogicalView.
---
.../LogicalView/Readers/LVDWARFReader.cpp | 10 +++++++---
.../DWARF/01-dwarf-print-basic-details.test | 6 +++---
.../01-dwarf-select-logical-elements.test | 2 +-
.../DWARF/02-dwarf-logical-lines.test | 4 ++--
...dwarf-incorrect-lexical-scope-typedef.test | 6 +++---
.../DWARF/06-dwarf-full-logical-view.test | 6 +++---
.../pr-incorrect-logical-instructions.test | 11 +++++-----
.../01-wasm-print-basic-details.test | 8 ++++----
.../WebAssembly/02-wasm-logical-lines.test | 4 ++--
...-wasm-incorrect-lexical-scope-typedef.test | 8 ++++----
.../06-wasm-full-logical-view.test | 8 ++++----
.../DebugInfo/LogicalView/DWARFReaderTest.cpp | 20 +++++--------------
12 files changed, 43 insertions(+), 50 deletions(-)
diff --git a/llvm/lib/DebugInfo/LogicalView/Readers/LVDWARFReader.cpp b/llvm/lib/DebugInfo/LogicalView/Readers/LVDWARFReader.cpp
index 62134dfdadf46..3ba5061718144 100644
--- a/llvm/lib/DebugInfo/LogicalView/Readers/LVDWARFReader.cpp
+++ b/llvm/lib/DebugInfo/LogicalView/Readers/LVDWARFReader.cpp
@@ -274,7 +274,7 @@ void LVDWARFReader::processOneAttribute(const DWARFDie &Die,
for (DWARFAddressRange &Range : Ranges) {
// This seems to be a tombstone for empty ranges.
if ((Range.LowPC == Range.HighPC) ||
- (Range.LowPC = getTombstoneAddress()))
+ (Range.LowPC == getTombstoneAddress()))
continue;
// Store the real upper limit for the address range.
if (UpdateHighAddress && Range.HighPC > 0)
@@ -461,13 +461,17 @@ LVScope *LVDWARFReader::processOneDie(const DWARFDie &InputDIE, LVScope *Parent,
if (!CurrentRanges.empty()) {
for (LVAddressRange &Range : CurrentRanges)
addSectionRange(SectionIndex, CurrentScope, Range.first,
- Range.second);
+ Range.second > Range.first
+ ? Range.second - 1 // Make hi-pc exclusive
+ : Range.second);
CurrentRanges.clear();
}
// If the scope is the CU, do not update the ranges set.
if (FoundLowPC && FoundHighPC && !IsCompileUnit) {
addSectionRange(SectionIndex, CurrentScope, CurrentLowPC,
- CurrentHighPC);
+ CurrentHighPC > CurrentLowPC
+ ? CurrentHighPC - 1 // Make hi-pc exclusive
+ : CurrentHighPC);
}
}
}
diff --git a/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/01-dwarf-print-basic-details.test b/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/01-dwarf-print-basic-details.test
index 54dbd7466e4f6..6d767eb9e883a 100644
--- a/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/01-dwarf-print-basic-details.test
+++ b/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/01-dwarf-print-basic-details.test
@@ -45,8 +45,6 @@
; ONE-NEXT: [004] 6 {Line}
; ONE-NEXT: [004] {Code} 'movl $0x7, -0x4(%rbp)'
; ONE-NEXT: [004] {Code} 'jmp 0x6'
-; ONE-NEXT: [004] 8 {Line}
-; ONE-NEXT: [004] {Code} 'movl -0x14(%rbp), %eax'
; ONE-NEXT: [003] 4 {TypeAlias} 'INTEGER' -> 'int'
; ONE-NEXT: [003] 2 {Line}
; ONE-NEXT: [003] {Code} 'pushq %rbp'
@@ -60,10 +58,12 @@
; ONE-NEXT: [003] {Code} 'testb $0x1, -0x15(%rbp)'
; ONE-NEXT: [003] {Code} 'je 0x13'
; ONE-NEXT: [003] 8 {Line}
+; ONE-NEXT: [003] {Code} 'movl -0x14(%rbp), %eax'
+; ONE-NEXT: [003] 8 {Line}
; ONE-NEXT: [003] {Code} 'movl %eax, -0x4(%rbp)'
; ONE-NEXT: [003] 9 {Line}
; ONE-NEXT: [003] {Code} 'movl -0x4(%rbp), %eax'
; ONE-NEXT: [003] {Code} 'popq %rbp'
; ONE-NEXT: [003] {Code} 'retq'
-; ONE-NEXT: [003] 9 {Line}
; ONE-NEXT: [002] 1 {TypeAlias} 'INTPTR' -> '* const int'
+; ONE-NEXT: [002] 9 {Line}
diff --git a/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/01-dwarf-select-logical-elements.test b/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/01-dwarf-select-logical-elements.test
index f84e9201d3044..5690cf585c379 100644
--- a/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/01-dwarf-select-logical-elements.test
+++ b/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/01-dwarf-select-logical-elements.test
@@ -34,7 +34,7 @@
; ONE-NEXT: [004] {Code} 'movl $0x7, -0x4(%rbp)'
; ONE-NEXT: [003] {Code} 'movl %eax, -0x4(%rbp)'
; ONE-NEXT: [003] {Code} 'movl %esi, -0x14(%rbp)'
-; ONE-NEXT: [004] {Code} 'movl -0x14(%rbp), %eax'
+; ONE-NEXT: [003] {Code} 'movl -0x14(%rbp), %eax'
; ONE-NEXT: [003] {Code} 'movl -0x4(%rbp), %eax'
; ONE-NEXT: [003] 4 {TypeAlias} 'INTEGER' -> 'int'
; ONE-NEXT: [004] 5 {Variable} 'CONSTANT' -> 'const INTEGER'
diff --git a/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/02-dwarf-logical-lines.test b/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/02-dwarf-logical-lines.test
index 533914f002827..bff7c945b6eac 100644
--- a/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/02-dwarf-logical-lines.test
+++ b/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/02-dwarf-logical-lines.test
@@ -42,7 +42,7 @@
; ONE-NEXT: [003] {Code} 'addq $0x10, %rsp'
; ONE-NEXT: [003] {Code} 'popq %rbp'
; ONE-NEXT: [003] {Code} 'retq'
-; ONE-NEXT: [003] 6 {Line}
+; ONE-NEXT: [002] 6 {Line}
; ONE-EMPTY:
; ONE-NEXT: Logical View:
; ONE-NEXT: [000] {File} 'hello-world-dwarf-gcc.o' -> elf64-x86-64
@@ -64,4 +64,4 @@
; ONE-NEXT: [003] 7 {Line}
; ONE-NEXT: [003] {Code} 'popq %rbp'
; ONE-NEXT: [003] {Code} 'retq'
-; ONE-NEXT: [003] 7 {Line}
+; ONE-NEXT: [002] 7 {Line}
diff --git a/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/03-dwarf-incorrect-lexical-scope-typedef.test b/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/03-dwarf-incorrect-lexical-scope-typedef.test
index dc57d01f3b8bb..69b65148361d7 100644
--- a/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/03-dwarf-incorrect-lexical-scope-typedef.test
+++ b/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/03-dwarf-incorrect-lexical-scope-typedef.test
@@ -59,7 +59,6 @@
; ONE-NEXT: [004] 10 {Line}
; ONE-NEXT: [004] 10 {Line}
; ONE-NEXT: [004] 10 {Line}
-; ONE-NEXT: [004] 13 {Line}
; ONE-NEXT: [003] 3 {Parameter} 'Param' -> 'char'
; ONE-NEXT: [003] 7 {TypeAlias} 'FLOAT' -> 'float'
; ONE-NEXT: [003] 4 {TypeAlias} 'INT' -> 'int'
@@ -71,6 +70,7 @@
; ONE-NEXT: [003] 13 {Line}
; ONE-NEXT: [003] 13 {Line}
; ONE-NEXT: [003] 13 {Line}
+; ONE-NEXT: [002] 13 {Line}
; ONE-EMPTY:
; ONE-NEXT: Logical View:
; ONE-NEXT: [000] {File} 'pr-44884-dwarf-gcc.o' -> elf64-x86-64
@@ -91,7 +91,6 @@
; ONE-NEXT: [005] 9 {Line}
; ONE-NEXT: [005] 9 {Line}
; ONE-NEXT: [005] 10 {Line}
-; ONE-NEXT: [005] 13 {Line}
; ONE-NEXT: [004] 7 {TypeAlias} 'FLOAT' -> 'float'
; ONE-NEXT: [003] 3 {Parameter} 'Param' -> 'char'
; ONE-NEXT: [003] 4 {TypeAlias} 'INT' -> 'int'
@@ -99,8 +98,9 @@
; ONE-NEXT: [003] 3 {Line}
; ONE-NEXT: [003] 5 {Line}
; ONE-NEXT: [003] 13 {Line}
+; ONE-NEXT: [003] 13 {Line}
; ONE-NEXT: [003] 14 {Line}
-; ONE-NEXT: [003] 14 {Line}
+; ONE-NEXT: [002] 14 {Line}
; Using the selection facilities, we can produce a simple tabular
; output showing just the logical types that are 'Typedef'.
diff --git a/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/06-dwarf-full-logical-view.test b/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/06-dwarf-full-logical-view.test
index 6616710a10045..a2f05ddb3e6ec 100644
--- a/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/06-dwarf-full-logical-view.test
+++ b/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/06-dwarf-full-logical-view.test
@@ -53,8 +53,6 @@
; ONE-NEXT: [0x0000000023][004] 6 {Line} {NewStatement} '/data/projects/tests/input/general/test.cpp'
; ONE-NEXT: [0x0000000023][004] {Code} 'movl $0x7, -0x4(%rbp)'
; ONE-NEXT: [0x000000002a][004] {Code} 'jmp 0x6'
-; ONE-NEXT: [0x000000002f][004] 8 {Line} {NewStatement} '/data/projects/tests/input/general/test.cpp'
-; ONE-NEXT: [0x000000002f][004] {Code} 'movl -0x14(%rbp), %eax'
; ONE-NEXT: [0x0000000063][003] 2 {Parameter} 'ParamBool' -> [0x00000000bc]'bool'
; ONE-NEXT: [0x0000000063][004] {Coverage} 100.00%
; ONE-NEXT: [0x0000000064][004] {Location}
@@ -79,13 +77,15 @@
; ONE-NEXT: [0x0000000012][003] 3 {Line} {NewStatement} {PrologueEnd} '/data/projects/tests/input/general/test.cpp'
; ONE-NEXT: [0x0000000012][003] {Code} 'testb $0x1, -0x15(%rbp)'
; ONE-NEXT: [0x0000000016][003] {Code} 'je 0x13'
+; ONE-NEXT: [0x000000002f][003] 8 {Line} {NewStatement} '/data/projects/tests/input/general/test.cpp'
+; ONE-NEXT: [0x000000002f][003] {Code} 'movl -0x14(%rbp), %eax'
; ONE-NEXT: [0x0000000032][003] 8 {Line} '/data/projects/tests/input/general/test.cpp'
; ONE-NEXT: [0x0000000032][003] {Code} 'movl %eax, -0x4(%rbp)'
; ONE-NEXT: [0x0000000035][003] 9 {Line} {NewStatement} '/data/projects/tests/input/general/test.cpp'
; ONE-NEXT: [0x0000000035][003] {Code} 'movl -0x4(%rbp), %eax'
; ONE-NEXT: [0x0000000038][003] {Code} 'popq %rbp'
; ONE-NEXT: [0x0000000039][003] {Code} 'retq'
-; ONE-NEXT: [0x000000003a][003] 9 {Line} {NewStatement} {EndSequence} '/data/projects/tests/input/general/test.cpp'
+; ONE-NEXT: [0x000000003a][002] 9 {Line} {NewStatement} {EndSequence} '/data/projects/tests/input/general/test.cpp'
; ONE-EMPTY:
; ONE-NEXT: -----------------------------
; ONE-NEXT: Element Total Printed
diff --git a/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/pr-incorrect-logical-instructions.test b/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/pr-incorrect-logical-instructions.test
index a99eae2aa2933..b38db28085b3e 100644
--- a/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/pr-incorrect-logical-instructions.test
+++ b/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/pr-incorrect-logical-instructions.test
@@ -84,7 +84,6 @@
; ONE-NEXT: [003] {Code} 'addq $0x10, %rsp'
; ONE-NEXT: [003] {Code} 'popq %rbp'
; ONE-NEXT: [003] {Code} 'retq'
-; ONE-NEXT: [003] {Code} 'data16'
; ONE-NEXT: [002] 10 {Function} extern not_inlined 'test' -> 'int'
; ONE-NEXT: [003] {Block}
; ONE-NEXT: [004] 13 {Line}
@@ -106,8 +105,6 @@
; ONE-NEXT: [004] {Code} 'movl -0x8(%rbp), %eax'
; ONE-NEXT: [004] {Code} 'addl $0x1, %eax'
; ONE-NEXT: [004] {Code} 'movl %eax, -0x8(%rbp)'
-; ONE-NEXT: [004] 17 {Line}
-; ONE-NEXT: [004] {Code} 'movl -0x8(%rbp), %eax'
; ONE-NEXT: [003] 10 {Line}
; ONE-NEXT: [003] {Code} 'pushq %rbp'
; ONE-NEXT: [003] {Code} 'movq %rsp, %rbp'
@@ -120,6 +117,8 @@
; ONE-NEXT: [003] 11 {Line}
; ONE-NEXT: [003] {Code} 'movl %eax, -0x8(%rbp)'
; ONE-NEXT: [003] 17 {Line}
+; ONE-NEXT: [003] {Code} 'movl -0x8(%rbp), %eax'
+; ONE-NEXT: [003] 17 {Line}
; ONE-NEXT: [003] {Code} 'addq $0x10, %rsp'
; ONE-NEXT: [003] {Code} 'popq %rbp'
; ONE-NEXT: [003] {Code} 'retq'
@@ -132,7 +131,8 @@
; ONE-NEXT: [003] {Code} 'xorl %eax, %eax'
; ONE-NEXT: [003] {Code} 'popq %rbp'
; ONE-NEXT: [003] {Code} 'retq'
-; ONE-NEXT: [003] 21 {Line}
+; ONE-NEXT: [002] {Code} 'data16'
+; ONE-NEXT: [002] 21 {Line}
; RUN: llvm-debuginfo-analyzer --attribute=level \
; RUN: --print=instructions \
@@ -172,7 +172,6 @@
; TWO-NEXT: [003] {Code} 'addq $0x10, %rsp'
; TWO-NEXT: [003] {Code} 'popq %rbp'
; TWO-NEXT: [003] {Code} 'retq'
-; TWO-NEXT: [003] {Code} 'data16'
; TWO-NEXT: [002] 10 {Function} extern not_inlined 'test' -> 'int'
; TWO-NEXT: [003] {Block}
; TWO-NEXT: [004] {Code} 'movl $0x0, -0xc(%rbp)'
@@ -187,7 +186,6 @@
; TWO-NEXT: [004] {Code} 'movl -0x8(%rbp), %eax'
; TWO-NEXT: [004] {Code} 'addl $0x1, %eax'
; TWO-NEXT: [004] {Code} 'movl %eax, -0x8(%rbp)'
-; TWO-NEXT: [004] {Code} 'movl -0x8(%rbp), %eax'
; TWO-NEXT: [003] {Code} 'pushq %rbp'
; TWO-NEXT: [003] {Code} 'movq %rsp, %rbp'
; TWO-NEXT: [003] {Code} 'subq $0x10, %rsp'
@@ -195,6 +193,7 @@
; TWO-NEXT: [003] {Code} 'movl -0x4(%rbp), %eax'
; TWO-NEXT: [003] {Code} 'subl (%rip), %eax'
; TWO-NEXT: [003] {Code} 'movl %eax, -0x8(%rbp)'
+; TWO-NEXT: [003] {Code} 'movl -0x8(%rbp), %eax'
; TWO-NEXT: [003] {Code} 'addq $0x10, %rsp'
; TWO-NEXT: [003] {Code} 'popq %rbp'
; TWO-NEXT: [003] {Code} 'retq'
diff --git a/llvm/test/tools/llvm-debuginfo-analyzer/WebAssembly/01-wasm-print-basic-details.test b/llvm/test/tools/llvm-debuginfo-analyzer/WebAssembly/01-wasm-print-basic-details.test
index 4927086563330..183e3ddc75ca1 100644
--- a/llvm/test/tools/llvm-debuginfo-analyzer/WebAssembly/01-wasm-print-basic-details.test
+++ b/llvm/test/tools/llvm-debuginfo-analyzer/WebAssembly/01-wasm-print-basic-details.test
@@ -56,8 +56,6 @@
; ONE-NEXT: [004] {Code} 'local.get 11'
; ONE-NEXT: [004] {Code} 'i32.store 28'
; ONE-NEXT: [004] {Code} 'br 1'
-; ONE-NEXT: [004] - {Line}
-; ONE-NEXT: [004] {Code} 'end'
; ONE-NEXT: [003] 4 {TypeAlias} 'INTEGER' -> 'int'
; ONE-NEXT: [003] 2 {Line}
; ONE-NEXT: [003] {Code} 'nop'
@@ -98,6 +96,8 @@
; ONE-NEXT: [003] {Code} 'local.get 9'
; ONE-NEXT: [003] {Code} 'i32.eqz'
; ONE-NEXT: [003] {Code} 'br_if 0'
+; ONE-NEXT: [003] - {Line}
+; ONE-NEXT: [003] {Code} 'end'
; ONE-NEXT: [003] 8 {Line}
; ONE-NEXT: [003] {Code} 'local.get 5'
; ONE-NEXT: [003] {Code} 'i32.load 20'
@@ -115,6 +115,6 @@
; ONE-NEXT: [003] {Code} 'local.get 13'
; ONE-NEXT: [003] {Code} 'return'
; ONE-NEXT: [003] {Code} 'end'
-; ONE-NEXT: [003] 9 {Line}
-; ONE-NEXT: [003] {Code} 'unreachable'
; ONE-NEXT: [002] 1 {TypeAlias} 'INTPTR' -> '* const int'
+; ONE-NEXT: [002] 9 {Line}
+; ONE-NEXT: [002] {Code} 'unreachable'
diff --git a/llvm/test/tools/llvm-debuginfo-analyzer/WebAssembly/02-wasm-logical-lines.test b/llvm/test/tools/llvm-debuginfo-analyzer/WebAssembly/02-wasm-logical-lines.test
index 50a531ad7d823..8d764648bdd5a 100644
--- a/llvm/test/tools/llvm-debuginfo-analyzer/WebAssembly/02-wasm-logical-lines.test
+++ b/llvm/test/tools/llvm-debuginfo-analyzer/WebAssembly/02-wasm-logical-lines.test
@@ -71,5 +71,5 @@
; ONE-NEXT: [003] {Code} 'local.get 6'
; ONE-NEXT: [003] {Code} 'return'
; ONE-NEXT: [003] {Code} 'end'
-; ONE-NEXT: [003] 6 {Line}
-; ONE-NEXT: [003] {Code} 'return'
+; ONE-NEXT: [002] 6 {Line}
+; ONE-NEXT: [002] {Code} 'return'
diff --git a/llvm/test/tools/llvm-debuginfo-analyzer/WebAssembly/03-wasm-incorrect-lexical-scope-typedef.test b/llvm/test/tools/llvm-debuginfo-analyzer/WebAssembly/03-wasm-incorrect-lexical-scope-typedef.test
index 1192a0cb7ca5a..a89d49abd6280 100644
--- a/llvm/test/tools/llvm-debuginfo-analyzer/WebAssembly/03-wasm-incorrect-lexical-scope-typedef.test
+++ b/llvm/test/tools/llvm-debuginfo-analyzer/WebAssembly/03-wasm-incorrect-lexical-scope-typedef.test
@@ -55,7 +55,6 @@
; ONE-NEXT: [003] - {Line}
; ONE-NEXT: [003] 1 {Line}
; ONE-NEXT: [003] 1 {Line}
-; ONE-NEXT: [003] 1 {Line}
; ONE-NEXT: [002] 3 {Function} extern not_inlined 'foo' -> 'unsigned int'
; ONE-NEXT: [003] {Block}
; ONE-NEXT: [004] 9 {Variable} 'Added' -> 'FLOAT'
@@ -67,7 +66,6 @@
; ONE-NEXT: [004] 10 {Line}
; ONE-NEXT: [004] 10 {Line}
; ONE-NEXT: [004] 10 {Line}
-; ONE-NEXT: [004] 13 {Line}
; ONE-NEXT: [003] 3 {Parameter} 'Param' -> 'char'
; ONE-NEXT: [003] 7 {TypeAlias} 'FLOAT' -> 'float'
; ONE-NEXT: [003] 4 {TypeAlias} 'INT' -> 'int'
@@ -79,6 +77,8 @@
; ONE-NEXT: [003] 13 {Line}
; ONE-NEXT: [003] 13 {Line}
; ONE-NEXT: [003] 13 {Line}
+; ONE-NEXT: [002] 1 {Line}
+; ONE-NEXT: [002] 13 {Line}
; ONE-EMPTY:
; ONE-NEXT: Logical View:
; ONE-NEXT: [000] {File} 'pr-44884-dwarf-gcc.o' -> elf64-x86-64
@@ -99,7 +99,6 @@
; ONE-NEXT: [005] 9 {Line}
; ONE-NEXT: [005] 9 {Line}
; ONE-NEXT: [005] 10 {Line}
-; ONE-NEXT: [005] 13 {Line}
; ONE-NEXT: [004] 7 {TypeAlias} 'FLOAT' -> 'float'
; ONE-NEXT: [003] 3 {Parameter} 'Param' -> 'char'
; ONE-NEXT: [003] 4 {TypeAlias} 'INT' -> 'int'
@@ -107,8 +106,9 @@
; ONE-NEXT: [003] 3 {Line}
; ONE-NEXT: [003] 5 {Line}
; ONE-NEXT: [003] 13 {Line}
+; ONE-NEXT: [003] 13 {Line}
; ONE-NEXT: [003] 14 {Line}
-; ONE-NEXT: [003] 14 {Line}
+; ONE-NEXT: [002] 14 {Line}
; Using the selection facilities, we can produce a simple tabular
; output showing just the logical types that are 'Typedef'.
diff --git a/llvm/test/tools/llvm-debuginfo-analyzer/WebAssembly/06-wasm-full-logical-view.test b/llvm/test/tools/llvm-debuginfo-analyzer/WebAssembly/06-wasm-full-logical-view.test
index ac4873f0a4d34..e152f40d99213 100644
--- a/llvm/test/tools/llvm-debuginfo-analyzer/WebAssembly/06-wasm-full-logical-view.test
+++ b/llvm/test/tools/llvm-debuginfo-analyzer/WebAssembly/06-wasm-full-logical-view.test
@@ -64,8 +64,6 @@
; ONE-NEXT: [0x000000005d][004] {Code} 'local.get 11'
; ONE-NEXT: [0x000000005f][004] {Code} 'i32.store 28'
; ONE-NEXT: [0x0000000062][004] {Code} 'br 1'
-; ONE-NEXT: [0x0000000064][004] 0 {Line} '{{.*}}/general/test.cpp'
-; ONE-NEXT: [0x0000000064][004] {Code} 'end'
; ONE-NEXT: [0x000000005e][003] 2 {Parameter} 'ParamBool' -> [0x00000000b3]'bool'
; ONE-NEXT: [0x000000005e][004] {Coverage} 100.00%
; ONE-NEXT: [0x000000005f][004] {Location}
@@ -118,6 +116,8 @@
; ONE-NEXT: [0x0000000047][003] {Code} 'local.get 9'
; ONE-NEXT: [0x0000000049][003] {Code} 'i32.eqz'
; ONE-NEXT: [0x000000004a][003] {Code} 'br_if 0'
+; ONE-NEXT: [0x0000000064][003] 0 {Line} '{{.*}}/general/test.cpp'
+; ONE-NEXT: [0x0000000064][003] {Code} 'end'
; ONE-NEXT: [0x0000000065][003] 8 {Line} {NewStatement} '{{.*}}/general/test.cpp'
; ONE-NEXT: [0x0000000065][003] {Code} 'local.get 5'
; ONE-NEXT: [0x0000000067][003] {Code} 'i32.load 20'
@@ -135,8 +135,8 @@
; ONE-NEXT: [0x000000007b][003] {Code} 'local.get 13'
; ONE-NEXT: [0x000000007d][003] {Code} 'return'
; ONE-NEXT: [0x000000007e][003] {Code} 'end'
-; ONE-NEXT: [0x000000007f][003] 9 {Line} {NewStatement} {EndSequence} '{{.*}}/general/test.cpp'
-; ONE-NEXT: [0x000000007f][003] {Code} 'unreachable'
+; ONE-NEXT: [0x000000007f][002] 9 {Line} {NewStatement} {EndSequence} '{{.*}}/general/test.cpp'
+; ONE-NEXT: [0x000000007f][002] {Code} 'unreachable'
; ONE-EMPTY:
; ONE-NEXT: -----------------------------
; ONE-NEXT: Element Total Printed
diff --git a/llvm/unittests/DebugInfo/LogicalView/DWARFReaderTest.cpp b/llvm/unittests/DebugInfo/LogicalView/DWARFReaderTest.cpp
index 544c39a3c7b2e..78dc8502e9676 100644
--- a/llvm/unittests/DebugInfo/LogicalView/DWARFReaderTest.cpp
+++ b/llvm/unittests/DebugInfo/LogicalView/DWARFReaderTest.cpp
@@ -81,7 +81,7 @@ void checkElementProperties(LVReader *Reader) {
EXPECT_EQ(Language, LVSourceLanguage::DW_LANG_C_plus_plus_14);
EXPECT_EQ(Language.getName(), "DW_LANG_C_plus_plus_14");
- EXPECT_EQ(CompileUnit->lineCount(), 0u);
+ EXPECT_EQ(CompileUnit->lineCount(), 1u);
EXPECT_EQ(CompileUnit->scopeCount(), 1u);
EXPECT_EQ(CompileUnit->symbolCount(), 0u);
EXPECT_EQ(CompileUnit->typeCount(), 7u);
@@ -129,7 +129,7 @@ void checkElementProperties(LVReader *Reader) {
// Lines (debug and assembler) for 'foo'.
const LVLines *Lines = Function->getLines();
ASSERT_NE(Lines, nullptr);
- ASSERT_EQ(Lines->size(), 0x12u);
+ ASSERT_EQ(Lines->size(), 19u);
// Check size of types in CompileUnit.
const LVTypes *Types = CompileUnit->getTypes();
@@ -252,7 +252,7 @@ void checkElementComparison(LVReader *Reference, LVReader *Target) {
// Get comparison table.
LVPassTable PassTable = Compare.getPassTable();
- ASSERT_EQ(PassTable.size(), 5u);
+ ASSERT_EQ(PassTable.size(), 4u);
LVReader *Reader;
LVElement *Element;
@@ -278,18 +278,8 @@ void checkElementComparison(LVReader *Reference, LVReader *Target) {
EXPECT_EQ(Element->getName(), "INTEGER");
EXPECT_EQ(Pass, LVComparePass::Missing);
- // Reference: Missing DebugLine
- std::tie(Reader, Element, Pass) = PassTable[2];
- ASSERT_NE(Reader, nullptr);
- ASSERT_NE(Element, nullptr);
- EXPECT_EQ(Reader, Reference);
- EXPECT_EQ(Element->getLevel(), 3u);
- EXPECT_EQ(Element->getLineNumber(), 8u);
- EXPECT_EQ(Element->getName(), "");
- EXPECT_EQ(Pass, LVComparePass::Missing);
-
// Target: Added Variable 'CONSTANT'
- std::tie(Reader, Element, Pass) = PassTable[3];
+ std::tie(Reader, Element, Pass) = PassTable[2];
ASSERT_NE(Reader, nullptr);
ASSERT_NE(Element, nullptr);
EXPECT_EQ(Reader, Target);
@@ -299,7 +289,7 @@ void checkElementComparison(LVReader *Reference, LVReader *Target) {
EXPECT_EQ(Pass, LVComparePass::Added);
// Target: Added TypeDefinition 'INTEGER'
- std::tie(Reader, Element, Pass) = PassTable[4];
+ std::tie(Reader, Element, Pass) = PassTable[3];
ASSERT_NE(Reader, nullptr);
ASSERT_NE(Element, nullptr);
EXPECT_EQ(Reader, Target);
>From 3a57ce3f2a4a9d88bd991423d8548ffa1d760549 Mon Sep 17 00:00:00 2001
From: Adam Yang <hanbyang at microsoft.com>
Date: Wed, 13 Aug 2025 16:43:19 -0700
Subject: [PATCH 2/6] Added test
---
.../DWARF/Inputs/amdgpu-ranges.o | Bin 0 -> 6440 bytes
.../DWARF/amdgpu-ranges.test | 36 ++++++++++++++++++
2 files changed, 36 insertions(+)
create mode 100644 llvm/test/tools/llvm-debuginfo-analyzer/DWARF/Inputs/amdgpu-ranges.o
create mode 100644 llvm/test/tools/llvm-debuginfo-analyzer/DWARF/amdgpu-ranges.test
diff --git a/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/Inputs/amdgpu-ranges.o b/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/Inputs/amdgpu-ranges.o
new file mode 100644
index 0000000000000000000000000000000000000000..168724b217b0328b527f8bc3dc1f8a5c7387cba4
GIT binary patch
literal 6440
zcmeHLYm8M_6<+&1?%bI>FarY&1hlu5X~tMiXLuEnz{MgD1EwX?q8T|obMKiuhu)Xx
zoI4LfWo87NTB5WNe at J5qwhA2{Q#7ef>QJaL^#P+Ml$v0r at dpjTL=%jyHjZnZv-jo9
zo~!YPCN^;;`>wsd{q42(W1YSC%-&CL*`P4C4!AJ54onyk-P#lyL`((M6wIy440#`x
zUk27y4d<c2z!-ylSRT8|7_GqY7;GFGn}ETw36*9u{|cZ!f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i8(q=ehtru&mb at b`o!v~n$Q`i at BM3sr^x
zO>T>eU+|A|e3`@_<Mv7k|2el;OZYgqQxg7LZi{siaev40O%nedZf}wB?{fPg2|vc|
z&q?_2xxGWeZ*sds!f$a~<OAhqc+i9mV&4Tm%=yuE#v`dB-Ml8|EAk;H;bJ{Y5-#@3
zmvE6MeG-0*+afPST(NEg5?}1EIFE at RJv~I;iuv;H5dFUB?Ik3-4up%fTfqskAK)(>
ztFzO!d%*DRK3`yNA)CX8mnUp|`*Pd0a~ALD`L0>)>hf&j;R_I7b_QL$d8^OKm-7fl
z$OS8JSKMLGif4TM;d>122-(VHCIe2Ps|eD&3yeb1w~dXT-M$##bLq!Jdy*e|Sxy4F
zTpR`%7|*vlQTOLb|7YZ{=!Vu<mbv^WuM-=>36cr;7jdv>ln0YU5M}2A=VW at VOHkMn
z{U{=iWiH+OG8WKz|DBP(RF%18%NX%?^8V+^h=|O60o!DZ=pUg=1m!}gD!(%K7`9NT
z6qcwoP7kd^9HhTlXpO}=Bfc}b=VYJM<!v6H{%;Z$nY#)bWsLam^Zt*K5fPcY9NVgm
z{}>;CBVC#(G=4fK<nhxvMLyfGMCJ25q27;zSQqhyJ`%yA)NTAy7V9M1L_cAF11r_W
zKgthoF)kW^Jr;TVS;S<Y2tkg=zePqwcv at 8u`i`r`zs}>o#+ekKmQ;>^0kLZFcL*Zy
zFO<yv6*lmp3QC|w{}a;pE06yV$d-Ku4rsAZT0>R&m522%wp5${G5)ZNu0I_~qQBVJ
zYlu~g-^$~Er4l);$lR+4SBw8k9)A<>PwP*2o*bXvP2^LI6RUxY at c8!%fNK$7X#5Kz
T^4h&aev9{C$%&*0lH>macHtHu
literal 0
HcmV?d00001
diff --git a/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/amdgpu-ranges.test b/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/amdgpu-ranges.test
new file mode 100644
index 0000000000000..6d55236636710
--- /dev/null
+++ b/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/amdgpu-ranges.test
@@ -0,0 +1,36 @@
+; REUIRES: amdgpu-registered-target
+
+; Regression test for:
+; - DW_AT_ranges not being read properly
+; - Instructions at DW_AT_high_pc of a scope incorrectly included in the scope
+
+; test.hlsl
+; 01 RWBuffer<float> u0 : register(u0);
+; 02 RWBuffer<float> u1 : register(u1);
+; 03
+; 04 [RootSignature("DescriptorTable(UAV(u0,numDescriptors=2))")]
+; 05 [numthreads(64,1,1)]
+; 06 void main(uint3 dtid : SV_DispatchThreadID) {
+; 07 float my_var = u0[dtid.x];
+; 08 [loop]
+; 09 for (int i = 0; i < 10; i++) {
+; 10 float my_local_var = i*2;
+; 11 my_var += my_local_var;
+; 12 }
+; 13 u1[dtid.x] = my_var;
+; 14 }
+
+; RUN: llvm-debuginfo-analyzer --attribute=all \
+; RUN: --print=all \
+; RUN: --output-sort=offset \
+; RUN: %p/Inputs/amdgpu-ranges.o 2>&1 | \
+; RUN: FileCheck %s
+
+; Make sure these two ranges are present and point to the correct offsets
+; CHECK: [005] {Range} Lines 10:9 [0x00000000b0:0x00000000c8]
+; CHECK: [005] {Range} Lines 11:13 [0x00000000f4:0x0000000114]
+
+; Make sure the offset 0x114 does not show up at the scope level 005 and 004
+; CHECK-NOT: [0x0000000114][005]
+; CHECK-NOT: [0x0000000114][004]
+
>From a7fd15039d9846389b5e7fd7af1a63b1bfc70935 Mon Sep 17 00:00:00 2001
From: Adam Yang <hanbyang at microsoft.com>
Date: Mon, 18 Aug 2025 14:34:15 -0700
Subject: [PATCH 3/6] Added tests for default x86 target too
---
.../DWARF/DW_AT_ranges.test | 28 ++++++++++++++++++
.../DWARF/Inputs/DW_AT_ranges.o | Bin 0 -> 2952 bytes
.../DWARF/Inputs/high_pc_exclusive.o | Bin 0 -> 2472 bytes
.../DWARF/high_pc_exclusive.test | 28 ++++++++++++++++++
4 files changed, 56 insertions(+)
create mode 100644 llvm/test/tools/llvm-debuginfo-analyzer/DWARF/DW_AT_ranges.test
create mode 100644 llvm/test/tools/llvm-debuginfo-analyzer/DWARF/Inputs/DW_AT_ranges.o
create mode 100644 llvm/test/tools/llvm-debuginfo-analyzer/DWARF/Inputs/high_pc_exclusive.o
create mode 100644 llvm/test/tools/llvm-debuginfo-analyzer/DWARF/high_pc_exclusive.test
diff --git a/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/DW_AT_ranges.test b/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/DW_AT_ranges.test
new file mode 100644
index 0000000000000..1988022ab623b
--- /dev/null
+++ b/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/DW_AT_ranges.test
@@ -0,0 +1,28 @@
+; Regression test for:
+; - DW_AT_ranges not being read properly
+
+; clang test.cpp --target=i686-pc-linux -g -O2
+; 01
+; 02 float foo(float a) {
+; 03 return a+a;
+; 04 }
+; 05
+; 06 int main(int argc, char **argv) {
+; 07 float my_var = argc;
+; 08 for (int i = 0; i < 4; i++) {
+; 09 float my_local_var = (float)argv[i][0];
+; 10 my_var += foo(my_local_var);
+; 11 }
+; 12 return (int)my_var;
+; 13 }
+
+; RUN: llvm-debuginfo-analyzer --attribute=all \
+; RUN: --print=all \
+; RUN: --output-sort=offset \
+; RUN: %p/Inputs/DW_AT_ranges.o 2>&1 | \
+; RUN: FileCheck %s
+
+; Make sure these two ranges are present and point to the correct offsets
+; CHECK: [006] {Range} Lines 3:10 [0x0000001255:0x0000001258]
+; CHECK: [006] {Range} Lines 3:10 [0x0000001288:0x000000128b]
+
diff --git a/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/Inputs/DW_AT_ranges.o b/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/Inputs/DW_AT_ranges.o
new file mode 100644
index 0000000000000000000000000000000000000000..36a4a30f5ae5889774e6bc64ea5add498912399b
GIT binary patch
literal 2952
zcma)8TWB0r7(Qn%o84 at Z$tJByjct>51DdwerUoo6*pyajYb<F^FxAp!v)9qx*|58b
zX{mSzAw?{TeJ~IZ^vMT(DToy|HZ8{bpuQD+Xaz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tBR
z8{BHF4V|wW=mYLrm>6>0XEWv9-9tkMRIx8%72F=~09yL3mS!?;764(R+yGgZ8#T+^
zK(i3FHShd*>*UR~mruSs_`Z9MyJ~8jyxoj8PMUh?aP(zUgsz%xjgOf<c{8e?*0xBq
zX}{U?iKoOp#k$B)O=6b+-jCI*_lmgV;n(Gx4DstSkBxoaBP}diD4;+dX`5&e_keS!
zc>kyi8|RZLPY64G%B`F#3Onac+WBN9?^~*6VQ2D*Y&luXB=YGxP1x1Ubk&PW7M+x^
z%b7yCl$c1S(~g^iJu^O;<8c<8O0}Z&<oI|wGo>`g&6bp0c5`<`R;uMhDVwciZYRT}
zqA?3(T%uwI_e)LYxS4u6;U!>I)#SLaD|x8C<Z}_+LI3WlJLO&4#DU{S_C0=RKX&Q=
zQE+X%-dX=0SJ~>EA~2xEcya8_1bZ{zPsWf_j{$$6pR*UUM-%EB2a^{^&hzH~2gb3t
z6Zox=k~hObnQ`^sX%)zMN&SF|`v?NzcNovTGVh)s&ijVrK5^h#Kg4 at -4WxYlV_2j2
z{{wM at kkx$TY^415kTdSPO#tHJ_>ZB8HIa at 3N~X at ZBNPHsJ_ovz>FUG4p9e8y%Ez{+
zWZHj1T#Z6N%J&L%CDZjG3THc1q<n9|pk(?kBkq6-s`Gsi$U6dG1pWB6RdF1LAA<Vv
z-awrCPs4EK`z(;vc<&*O?OYM#h${hC_N#Z9m%eX<I5pld4$)Rgfsf;T58wz^=taa0
oLt~%eS at L{aft!I2=F!)P`%5X{Y8}5pW}c$2(4yi>0atPV0AsL-EdT%j
literal 0
HcmV?d00001
diff --git a/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/Inputs/high_pc_exclusive.o b/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/Inputs/high_pc_exclusive.o
new file mode 100644
index 0000000000000000000000000000000000000000..751cebb87cc668579760bb242168c644f2648b14
GIT binary patch
literal 2472
zcmcgtOKcle6n*3IxK8ZEO+u8?RMaiC2+)jU=hr3(k~XfCDxgp$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sI>q0k+
z>3rQNo9SZC;|bk1o3_I;%2rnBb+c5jrfWtnXH^P_o0*M5+Q?+;=BD(lO1>)XhFwor
z^ZABpH#{L}q8E&X>L{Bi8n-iCT&CAfqYt5D*0zy>F2e0t9WA`Y<rH9g;p!{%FE3u~
zY{!53br0J4yu9y*Y%BM>3ju!b{0w>D5G)3M_~cO2M-_-aa7U5Hdxtm%n?8j+$}qt9
zigDgo1pW_1+D{`wn>_EkAc?ZSgok$r4Tu*c30m at IT^{dE=bZ!3xxZbmQ{b at Y0dhD;
z=e@%O=3vWysCl_vb~Sm;(*SrkScI;idq=L~SK17ax9ns(KQdQ<D{W@(gU7Z~WUhgL
zw3$1F35-aRC-<IfkGZ);@IF1nV?Q at to=mmDlY7CK9P74g%l`P*U6+mA9J!ykwoGk<
zw<R4<?laex{o!g5u|que_a%U>IFJ$W=HT&t=HBx>INxtwAIgy;ct1!7TCU at J*lZ_d
M0f)_+lp=Y51B3ZhnE(I)
literal 0
HcmV?d00001
diff --git a/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/high_pc_exclusive.test b/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/high_pc_exclusive.test
new file mode 100644
index 0000000000000..2681d75ec4cd8
--- /dev/null
+++ b/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/high_pc_exclusive.test
@@ -0,0 +1,28 @@
+; Regression test for:
+; - Instructions at DW_AT_high_pc of a scope incorrectly included in the scope
+
+; clang test.cpp --target=i686-pc-linux -g -O0
+; 1
+; 2 int main(void) {
+; 3 float ret = 0;
+; 4 for (int i = 0; i < 10; i++) {
+; 5 ret += i;
+; 6 }
+; 7 return ret;
+; 8 }
+; 9
+
+; RUN: llvm-debuginfo-analyzer --attribute=all \
+; RUN: --print=all \
+; RUN: --output-sort=offset \
+; RUN: %p/Inputs/high_pc_exclusive.o 2>&1 | \
+; RUN: FileCheck %s
+
+; Make sure the line mapping at 0x122c does not show up at the scope level 004
+; CHECK-NOT: [0x000000122c][004] 7 {Line}
+
+; Make sure it *does* appear at scope level 003
+; CHECK: [0x000000122c][003] 7 {Line}
+
+
+
>From 13d5d8c75b2aa888087221cec75c20c7121b0d04 Mon Sep 17 00:00:00 2001
From: Adam Yang <hanbyang at microsoft.com>
Date: Tue, 19 Aug 2025 12:38:06 -0700
Subject: [PATCH 4/6] Fixed typo in test
---
.../test/tools/llvm-debuginfo-analyzer/DWARF/amdgpu-ranges.test | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/amdgpu-ranges.test b/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/amdgpu-ranges.test
index 6d55236636710..e6400a46df98a 100644
--- a/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/amdgpu-ranges.test
+++ b/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/amdgpu-ranges.test
@@ -1,4 +1,4 @@
-; REUIRES: amdgpu-registered-target
+; REQUIRES: amdgpu-registered-target
; Regression test for:
; - DW_AT_ranges not being read properly
>From 46311ebdda069ea550d648a9233acf7b38313df2 Mon Sep 17 00:00:00 2001
From: Adam Yang <hanbyang at microsoft.com>
Date: Thu, 21 Aug 2025 15:15:27 -0700
Subject: [PATCH 5/6] Replaced the binary tests with .s files
---
.../DWARF/DW_AT_ranges.s | 608 +++++++++++++
.../DWARF/DW_AT_ranges.test | 28 -
.../DWARF/Inputs/DW_AT_ranges.o | Bin 2952 -> 0 bytes
.../DWARF/Inputs/amdgpu-ranges.o | Bin 6440 -> 0 bytes
.../DWARF/Inputs/high_pc_exclusive.o | Bin 2472 -> 0 bytes
.../DWARF/amdgpu-ranges.s | 857 ++++++++++++++++++
.../DWARF/amdgpu-ranges.test | 36 -
.../DWARF/high_pc_exclusive.s | 276 ++++++
.../DWARF/high_pc_exclusive.test | 28 -
9 files changed, 1741 insertions(+), 92 deletions(-)
create mode 100644 llvm/test/tools/llvm-debuginfo-analyzer/DWARF/DW_AT_ranges.s
delete mode 100644 llvm/test/tools/llvm-debuginfo-analyzer/DWARF/DW_AT_ranges.test
delete mode 100644 llvm/test/tools/llvm-debuginfo-analyzer/DWARF/Inputs/DW_AT_ranges.o
delete mode 100644 llvm/test/tools/llvm-debuginfo-analyzer/DWARF/Inputs/amdgpu-ranges.o
delete mode 100644 llvm/test/tools/llvm-debuginfo-analyzer/DWARF/Inputs/high_pc_exclusive.o
create mode 100644 llvm/test/tools/llvm-debuginfo-analyzer/DWARF/amdgpu-ranges.s
delete mode 100644 llvm/test/tools/llvm-debuginfo-analyzer/DWARF/amdgpu-ranges.test
create mode 100644 llvm/test/tools/llvm-debuginfo-analyzer/DWARF/high_pc_exclusive.s
delete mode 100644 llvm/test/tools/llvm-debuginfo-analyzer/DWARF/high_pc_exclusive.test
diff --git a/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/DW_AT_ranges.s b/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/DW_AT_ranges.s
new file mode 100644
index 0000000000000..2203cb39c202e
--- /dev/null
+++ b/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/DW_AT_ranges.s
@@ -0,0 +1,608 @@
+# Regression test for:
+# - DW_AT_ranges not being read properly
+
+# clang test.cpp --target=i686-pc-linux -g -O2
+# 01
+# 02 float foo(float a) {
+# 03 return a+a;
+# 04 }
+# 05
+# 06 int main(int argc, char **argv) {
+# 07 float my_var = argc;
+# 08 for (int i = 0; i < 4; i++) {
+# 09 float my_local_var = (float)argv[i][0];
+# 10 my_var += foo(my_local_var);
+# 11 }
+# 12 return (int)my_var;
+# 13 }
+
+# RUN: llvm-mc %s -triple=i686-pc-linux -filetype=obj -o - | \
+# RUN: llvm-debuginfo-analyzer --attribute=all \
+# RUN: --print=all \
+# RUN: --output-sort=offset \
+# RUN: - | \
+# RUN: FileCheck %s
+
+# Make sure these two ranges are present and point to the correct offsets
+# CHECK: [006] {Range} Lines 3:10 [0x0000000055:0x0000000058]
+# CHECK: [006] {Range} Lines 3:10 [0x0000000088:0x000000008b]
+
+ .file "compile2.cpp"
+ .file 0 "F:\\llvm-project" "F:\\inbox\\compile\\compile2.cpp" md5 0xc01496e8fb5eea15c55e9b40a56ed900
+ .text
+ .globl _Z3foof # -- Begin function _Z3foof
+ .p2align 4
+ .type _Z3foof, at function
+_Z3foof: # @_Z3foof
+.Lfunc_begin0:
+ .loc 0 2 0 # F:\inbox\compile\compile2.cpp:2:0
+ .cfi_startproc
+# %bb.0: # %entry
+ pushl %eax
+ .cfi_def_cfa_offset 8
+.Ltmp0:
+ #DEBUG_VALUE: foo:a <- [DW_OP_plus_uconst 8] [$esp+0]
+ movss 8(%esp), %xmm0 # xmm0 = mem[0],zero,zero,zero
+.Ltmp1:
+ .loc 0 3 11 prologue_end # F:\inbox\compile\compile2.cpp:3:11
+ addss %xmm0, %xmm0
+ .loc 0 3 3 is_stmt 0 # F:\inbox\compile\compile2.cpp:3:3
+ movss %xmm0, (%esp)
+ flds (%esp)
+ .loc 0 3 3 epilogue_begin # F:\inbox\compile\compile2.cpp:3:3
+ popl %eax
+ .cfi_def_cfa_offset 4
+ retl
+.Ltmp2:
+.Lfunc_end0:
+ .size _Z3foof, .Lfunc_end0-_Z3foof
+ .cfi_endproc
+ # -- End function
+ .globl main # -- Begin function main
+ .p2align 4
+ .type main, at function
+main: # @main
+.Lfunc_begin1:
+ .loc 0 6 0 is_stmt 1 # F:\inbox\compile\compile2.cpp:6:0
+ .cfi_startproc
+# %bb.0: # %entry
+ #DEBUG_VALUE: main:argc <- [DW_OP_plus_uconst 4] [$esp+0]
+ #DEBUG_VALUE: main:argv <- [DW_OP_plus_uconst 8] [$esp+0]
+ movl 8(%esp), %eax
+.Ltmp3:
+ .loc 0 7 18 prologue_end # F:\inbox\compile\compile2.cpp:7:18
+ cvtsi2ssl 4(%esp), %xmm2
+.Ltmp4:
+ #DEBUG_VALUE: main:my_var <- $xmm2
+ #DEBUG_VALUE: i <- 0
+ .loc 0 9 33 # F:\inbox\compile\compile2.cpp:9:33
+ movl (%eax), %ecx
+.Ltmp5:
+ #DEBUG_VALUE: i <- 1
+ movl 4(%eax), %edx
+ movzbl (%ecx), %ecx
+ shll $8, %ecx
+ pxor %xmm0, %xmm0
+ pxor %xmm1, %xmm1
+ pinsrw $1, %ecx, %xmm1
+ movzbl (%edx), %ecx
+ shll $8, %ecx
+ pinsrw $3, %ecx, %xmm1
+ psrad $24, %xmm1
+ cvtdq2ps %xmm1, %xmm1
+.Ltmp6:
+ .loc 0 3 11 # F:\inbox\compile\compile2.cpp:3:11 @[ F:\inbox\compile\compile2.cpp:10:15 ]
+ addps %xmm1, %xmm1
+.Ltmp7:
+ .loc 0 10 12 # F:\inbox\compile\compile2.cpp:10:12
+ addss %xmm1, %xmm2
+.Ltmp8:
+ #DEBUG_VALUE: main:my_var <- $xmm2
+ shufps $85, %xmm1, %xmm1 # xmm1 = xmm1[1,1,1,1]
+ addss %xmm2, %xmm1
+.Ltmp9:
+ #DEBUG_VALUE: main:my_var <- $xmm1
+ #DEBUG_VALUE: i <- 2
+ .loc 0 9 33 # F:\inbox\compile\compile2.cpp:9:33
+ movl 8(%eax), %ecx
+.Ltmp10:
+ #DEBUG_VALUE: i <- 3
+ movl 12(%eax), %eax
+ movzbl (%ecx), %ecx
+ shll $8, %ecx
+ pinsrw $1, %ecx, %xmm0
+ movzbl (%eax), %eax
+ shll $8, %eax
+ pinsrw $3, %eax, %xmm0
+ psrad $24, %xmm0
+ cvtdq2ps %xmm0, %xmm0
+.Ltmp11:
+ .loc 0 3 11 # F:\inbox\compile\compile2.cpp:3:11 @[ F:\inbox\compile\compile2.cpp:10:15 ]
+ addps %xmm0, %xmm0
+.Ltmp12:
+ .loc 0 10 12 # F:\inbox\compile\compile2.cpp:10:12
+ addss %xmm0, %xmm1
+.Ltmp13:
+ #DEBUG_VALUE: main:my_var <- $xmm1
+ shufps $85, %xmm0, %xmm0 # xmm0 = xmm0[1,1,1,1]
+ addss %xmm1, %xmm0
+.Ltmp14:
+ #DEBUG_VALUE: main:my_var <- $xmm0
+ #DEBUG_VALUE: i <- 4
+ .loc 0 12 15 # F:\inbox\compile\compile2.cpp:12:15
+ cvttss2si %xmm0, %eax
+ .loc 0 12 3 is_stmt 0 # F:\inbox\compile\compile2.cpp:12:3
+ retl
+.Ltmp15:
+.Lfunc_end1:
+ .size main, .Lfunc_end1-main
+ .cfi_endproc
+ # -- End function
+ .section .debug_loclists,"", at progbits
+ .long .Ldebug_list_header_end0-.Ldebug_list_header_start0 # Length
+.Ldebug_list_header_start0:
+ .short 5 # Version
+ .byte 4 # Address size
+ .byte 0 # Segment selector size
+ .long 2 # Offset entry count
+.Lloclists_table_base0:
+ .long .Ldebug_loc0-.Lloclists_table_base0
+ .long .Ldebug_loc1-.Lloclists_table_base0
+.Ldebug_loc0:
+ .byte 4 # DW_LLE_offset_pair
+ .uleb128 .Ltmp4-.Lfunc_begin0 # starting offset
+ .uleb128 .Ltmp9-.Lfunc_begin0 # ending offset
+ .byte 1 # Loc expr size
+ .byte 103 # DW_OP_reg23
+ .byte 4 # DW_LLE_offset_pair
+ .uleb128 .Ltmp9-.Lfunc_begin0 # starting offset
+ .uleb128 .Ltmp14-.Lfunc_begin0 # ending offset
+ .byte 1 # Loc expr size
+ .byte 102 # DW_OP_reg22
+ .byte 4 # DW_LLE_offset_pair
+ .uleb128 .Ltmp14-.Lfunc_begin0 # starting offset
+ .uleb128 .Lfunc_end1-.Lfunc_begin0 # ending offset
+ .byte 1 # Loc expr size
+ .byte 101 # DW_OP_reg21
+ .byte 0 # DW_LLE_end_of_list
+.Ldebug_loc1:
+ .byte 4 # DW_LLE_offset_pair
+ .uleb128 .Ltmp4-.Lfunc_begin0 # starting offset
+ .uleb128 .Ltmp5-.Lfunc_begin0 # ending offset
+ .byte 3 # Loc expr size
+ .byte 17 # DW_OP_consts
+ .byte 0 # 0
+ .byte 159 # DW_OP_stack_value
+ .byte 4 # DW_LLE_offset_pair
+ .uleb128 .Ltmp5-.Lfunc_begin0 # starting offset
+ .uleb128 .Ltmp9-.Lfunc_begin0 # ending offset
+ .byte 3 # Loc expr size
+ .byte 17 # DW_OP_consts
+ .byte 1 # 1
+ .byte 159 # DW_OP_stack_value
+ .byte 4 # DW_LLE_offset_pair
+ .uleb128 .Ltmp9-.Lfunc_begin0 # starting offset
+ .uleb128 .Ltmp10-.Lfunc_begin0 # ending offset
+ .byte 3 # Loc expr size
+ .byte 17 # DW_OP_consts
+ .byte 2 # 2
+ .byte 159 # DW_OP_stack_value
+ .byte 4 # DW_LLE_offset_pair
+ .uleb128 .Ltmp10-.Lfunc_begin0 # starting offset
+ .uleb128 .Ltmp14-.Lfunc_begin0 # ending offset
+ .byte 3 # Loc expr size
+ .byte 17 # DW_OP_consts
+ .byte 3 # 3
+ .byte 159 # DW_OP_stack_value
+ .byte 4 # DW_LLE_offset_pair
+ .uleb128 .Ltmp14-.Lfunc_begin0 # starting offset
+ .uleb128 .Lfunc_end1-.Lfunc_begin0 # ending offset
+ .byte 3 # Loc expr size
+ .byte 17 # DW_OP_consts
+ .byte 4 # 4
+ .byte 159 # DW_OP_stack_value
+ .byte 0 # DW_LLE_end_of_list
+.Ldebug_list_header_end0:
+ .section .debug_abbrev,"", at progbits
+ .byte 1 # Abbreviation Code
+ .byte 17 # DW_TAG_compile_unit
+ .byte 1 # DW_CHILDREN_yes
+ .byte 37 # DW_AT_producer
+ .byte 37 # DW_FORM_strx1
+ .byte 19 # DW_AT_language
+ .byte 5 # DW_FORM_data2
+ .byte 3 # DW_AT_name
+ .byte 37 # DW_FORM_strx1
+ .byte 114 # DW_AT_str_offsets_base
+ .byte 23 # DW_FORM_sec_offset
+ .byte 16 # DW_AT_stmt_list
+ .byte 23 # DW_FORM_sec_offset
+ .byte 27 # DW_AT_comp_dir
+ .byte 37 # DW_FORM_strx1
+ .byte 17 # DW_AT_low_pc
+ .byte 27 # DW_FORM_addrx
+ .byte 18 # DW_AT_high_pc
+ .byte 6 # DW_FORM_data4
+ .byte 115 # DW_AT_addr_base
+ .byte 23 # DW_FORM_sec_offset
+ .byte 116 # DW_AT_rnglists_base
+ .byte 23 # DW_FORM_sec_offset
+ .ascii "\214\001" # DW_AT_loclists_base
+ .byte 23 # DW_FORM_sec_offset
+ .byte 0 # EOM(1)
+ .byte 0 # EOM(2)
+ .byte 2 # Abbreviation Code
+ .byte 36 # DW_TAG_base_type
+ .byte 0 # DW_CHILDREN_no
+ .byte 3 # DW_AT_name
+ .byte 37 # DW_FORM_strx1
+ .byte 62 # DW_AT_encoding
+ .byte 11 # DW_FORM_data1
+ .byte 11 # DW_AT_byte_size
+ .byte 11 # DW_FORM_data1
+ .byte 0 # EOM(1)
+ .byte 0 # EOM(2)
+ .byte 3 # Abbreviation Code
+ .byte 46 # DW_TAG_subprogram
+ .byte 1 # DW_CHILDREN_yes
+ .byte 17 # DW_AT_low_pc
+ .byte 27 # DW_FORM_addrx
+ .byte 18 # DW_AT_high_pc
+ .byte 6 # DW_FORM_data4
+ .byte 64 # DW_AT_frame_base
+ .byte 24 # DW_FORM_exprloc
+ .byte 122 # DW_AT_call_all_calls
+ .byte 25 # DW_FORM_flag_present
+ .byte 49 # DW_AT_abstract_origin
+ .byte 19 # DW_FORM_ref4
+ .byte 0 # EOM(1)
+ .byte 0 # EOM(2)
+ .byte 4 # Abbreviation Code
+ .byte 5 # DW_TAG_formal_parameter
+ .byte 0 # DW_CHILDREN_no
+ .byte 2 # DW_AT_location
+ .byte 24 # DW_FORM_exprloc
+ .byte 49 # DW_AT_abstract_origin
+ .byte 19 # DW_FORM_ref4
+ .byte 0 # EOM(1)
+ .byte 0 # EOM(2)
+ .byte 5 # Abbreviation Code
+ .byte 46 # DW_TAG_subprogram
+ .byte 1 # DW_CHILDREN_yes
+ .byte 110 # DW_AT_linkage_name
+ .byte 37 # DW_FORM_strx1
+ .byte 3 # DW_AT_name
+ .byte 37 # DW_FORM_strx1
+ .byte 58 # DW_AT_decl_file
+ .byte 11 # DW_FORM_data1
+ .byte 59 # DW_AT_decl_line
+ .byte 11 # DW_FORM_data1
+ .byte 73 # DW_AT_type
+ .byte 19 # DW_FORM_ref4
+ .byte 63 # DW_AT_external
+ .byte 25 # DW_FORM_flag_present
+ .byte 32 # DW_AT_inline
+ .byte 33 # DW_FORM_implicit_const
+ .byte 1
+ .byte 0 # EOM(1)
+ .byte 0 # EOM(2)
+ .byte 6 # Abbreviation Code
+ .byte 5 # DW_TAG_formal_parameter
+ .byte 0 # DW_CHILDREN_no
+ .byte 3 # DW_AT_name
+ .byte 37 # DW_FORM_strx1
+ .byte 58 # DW_AT_decl_file
+ .byte 11 # DW_FORM_data1
+ .byte 59 # DW_AT_decl_line
+ .byte 11 # DW_FORM_data1
+ .byte 73 # DW_AT_type
+ .byte 19 # DW_FORM_ref4
+ .byte 0 # EOM(1)
+ .byte 0 # EOM(2)
+ .byte 7 # Abbreviation Code
+ .byte 46 # DW_TAG_subprogram
+ .byte 1 # DW_CHILDREN_yes
+ .byte 17 # DW_AT_low_pc
+ .byte 27 # DW_FORM_addrx
+ .byte 18 # DW_AT_high_pc
+ .byte 6 # DW_FORM_data4
+ .byte 64 # DW_AT_frame_base
+ .byte 24 # DW_FORM_exprloc
+ .byte 122 # DW_AT_call_all_calls
+ .byte 25 # DW_FORM_flag_present
+ .byte 3 # DW_AT_name
+ .byte 37 # DW_FORM_strx1
+ .byte 58 # DW_AT_decl_file
+ .byte 11 # DW_FORM_data1
+ .byte 59 # DW_AT_decl_line
+ .byte 11 # DW_FORM_data1
+ .byte 73 # DW_AT_type
+ .byte 19 # DW_FORM_ref4
+ .byte 63 # DW_AT_external
+ .byte 25 # DW_FORM_flag_present
+ .byte 0 # EOM(1)
+ .byte 0 # EOM(2)
+ .byte 8 # Abbreviation Code
+ .byte 5 # DW_TAG_formal_parameter
+ .byte 0 # DW_CHILDREN_no
+ .byte 2 # DW_AT_location
+ .byte 24 # DW_FORM_exprloc
+ .byte 3 # DW_AT_name
+ .byte 37 # DW_FORM_strx1
+ .byte 58 # DW_AT_decl_file
+ .byte 11 # DW_FORM_data1
+ .byte 59 # DW_AT_decl_line
+ .byte 11 # DW_FORM_data1
+ .byte 73 # DW_AT_type
+ .byte 19 # DW_FORM_ref4
+ .byte 0 # EOM(1)
+ .byte 0 # EOM(2)
+ .byte 9 # Abbreviation Code
+ .byte 52 # DW_TAG_variable
+ .byte 0 # DW_CHILDREN_no
+ .byte 2 # DW_AT_location
+ .byte 34 # DW_FORM_loclistx
+ .byte 3 # DW_AT_name
+ .byte 37 # DW_FORM_strx1
+ .byte 58 # DW_AT_decl_file
+ .byte 11 # DW_FORM_data1
+ .byte 59 # DW_AT_decl_line
+ .byte 11 # DW_FORM_data1
+ .byte 73 # DW_AT_type
+ .byte 19 # DW_FORM_ref4
+ .byte 0 # EOM(1)
+ .byte 0 # EOM(2)
+ .byte 10 # Abbreviation Code
+ .byte 11 # DW_TAG_lexical_block
+ .byte 1 # DW_CHILDREN_yes
+ .byte 17 # DW_AT_low_pc
+ .byte 27 # DW_FORM_addrx
+ .byte 18 # DW_AT_high_pc
+ .byte 6 # DW_FORM_data4
+ .byte 0 # EOM(1)
+ .byte 0 # EOM(2)
+ .byte 11 # Abbreviation Code
+ .byte 52 # DW_TAG_variable
+ .byte 0 # DW_CHILDREN_no
+ .byte 3 # DW_AT_name
+ .byte 37 # DW_FORM_strx1
+ .byte 58 # DW_AT_decl_file
+ .byte 11 # DW_FORM_data1
+ .byte 59 # DW_AT_decl_line
+ .byte 11 # DW_FORM_data1
+ .byte 73 # DW_AT_type
+ .byte 19 # DW_FORM_ref4
+ .byte 0 # EOM(1)
+ .byte 0 # EOM(2)
+ .byte 12 # Abbreviation Code
+ .byte 29 # DW_TAG_inlined_subroutine
+ .byte 0 # DW_CHILDREN_no
+ .byte 49 # DW_AT_abstract_origin
+ .byte 19 # DW_FORM_ref4
+ .byte 85 # DW_AT_ranges
+ .byte 35 # DW_FORM_rnglistx
+ .byte 88 # DW_AT_call_file
+ .byte 11 # DW_FORM_data1
+ .byte 89 # DW_AT_call_line
+ .byte 11 # DW_FORM_data1
+ .byte 87 # DW_AT_call_column
+ .byte 11 # DW_FORM_data1
+ .byte 0 # EOM(1)
+ .byte 0 # EOM(2)
+ .byte 13 # Abbreviation Code
+ .byte 15 # DW_TAG_pointer_type
+ .byte 0 # DW_CHILDREN_no
+ .byte 73 # DW_AT_type
+ .byte 19 # DW_FORM_ref4
+ .byte 0 # EOM(1)
+ .byte 0 # EOM(2)
+ .byte 0 # EOM(3)
+ .section .debug_info,"", at progbits
+.Lcu_begin0:
+ .long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
+.Ldebug_info_start0:
+ .short 5 # DWARF version number
+ .byte 1 # DWARF Unit Type
+ .byte 4 # Address Size (in bytes)
+ .long .debug_abbrev # Offset Into Abbrev. Section
+ .byte 1 # Abbrev [1] 0xc:0xb4 DW_TAG_compile_unit
+ .byte 0 # DW_AT_producer
+ .short 33 # DW_AT_language
+ .byte 1 # DW_AT_name
+ .long .Lstr_offsets_base0 # DW_AT_str_offsets_base
+ .long .Lline_table_start0 # DW_AT_stmt_list
+ .byte 2 # DW_AT_comp_dir
+ .byte 0 # DW_AT_low_pc
+ .long .Lfunc_end1-.Lfunc_begin0 # DW_AT_high_pc
+ .long .Laddr_table_base0 # DW_AT_addr_base
+ .long .Lrnglists_table_base0 # DW_AT_rnglists_base
+ .long .Lloclists_table_base0 # DW_AT_loclists_base
+ .byte 2 # Abbrev [2] 0x2b:0x4 DW_TAG_base_type
+ .byte 3 # DW_AT_name
+ .byte 4 # DW_AT_encoding
+ .byte 4 # DW_AT_byte_size
+ .byte 2 # Abbrev [2] 0x2f:0x4 DW_TAG_base_type
+ .byte 4 # DW_AT_name
+ .byte 5 # DW_AT_encoding
+ .byte 4 # DW_AT_byte_size
+ .byte 3 # Abbrev [3] 0x33:0x15 DW_TAG_subprogram
+ .byte 0 # DW_AT_low_pc
+ .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc
+ .byte 1 # DW_AT_frame_base
+ .byte 84
+ # DW_AT_call_all_calls
+ .long 72 # DW_AT_abstract_origin
+ .byte 4 # Abbrev [4] 0x3f:0x8 DW_TAG_formal_parameter
+ .byte 2 # DW_AT_location
+ .byte 145
+ .byte 8
+ .long 81 # DW_AT_abstract_origin
+ .byte 0 # End Of Children Mark
+ .byte 5 # Abbrev [5] 0x48:0x12 DW_TAG_subprogram
+ .byte 5 # DW_AT_linkage_name
+ .byte 6 # DW_AT_name
+ .byte 0 # DW_AT_decl_file
+ .byte 2 # DW_AT_decl_line
+ .long 43 # DW_AT_type
+ # DW_AT_external
+ # DW_AT_inline
+ .byte 6 # Abbrev [6] 0x51:0x8 DW_TAG_formal_parameter
+ .byte 7 # DW_AT_name
+ .byte 0 # DW_AT_decl_file
+ .byte 2 # DW_AT_decl_line
+ .long 43 # DW_AT_type
+ .byte 0 # End Of Children Mark
+ .byte 7 # Abbrev [7] 0x5a:0x57 DW_TAG_subprogram
+ .byte 1 # DW_AT_low_pc
+ .long .Lfunc_end1-.Lfunc_begin1 # DW_AT_high_pc
+ .byte 1 # DW_AT_frame_base
+ .byte 84
+ # DW_AT_call_all_calls
+ .byte 8 # DW_AT_name
+ .byte 0 # DW_AT_decl_file
+ .byte 6 # DW_AT_decl_line
+ .long 47 # DW_AT_type
+ # DW_AT_external
+ .byte 8 # Abbrev [8] 0x69:0xb DW_TAG_formal_parameter
+ .byte 2 # DW_AT_location
+ .byte 145
+ .byte 4
+ .byte 9 # DW_AT_name
+ .byte 0 # DW_AT_decl_file
+ .byte 6 # DW_AT_decl_line
+ .long 47 # DW_AT_type
+ .byte 8 # Abbrev [8] 0x74:0xb DW_TAG_formal_parameter
+ .byte 2 # DW_AT_location
+ .byte 145
+ .byte 8
+ .byte 10 # DW_AT_name
+ .byte 0 # DW_AT_decl_file
+ .byte 6 # DW_AT_decl_line
+ .long 177 # DW_AT_type
+ .byte 9 # Abbrev [9] 0x7f:0x9 DW_TAG_variable
+ .byte 0 # DW_AT_location
+ .byte 12 # DW_AT_name
+ .byte 0 # DW_AT_decl_file
+ .byte 7 # DW_AT_decl_line
+ .long 43 # DW_AT_type
+ .byte 10 # Abbrev [10] 0x88:0x28 DW_TAG_lexical_block
+ .byte 2 # DW_AT_low_pc
+ .long .Ltmp14-.Ltmp4 # DW_AT_high_pc
+ .byte 9 # Abbrev [9] 0x8e:0x9 DW_TAG_variable
+ .byte 1 # DW_AT_location
+ .byte 13 # DW_AT_name
+ .byte 0 # DW_AT_decl_file
+ .byte 8 # DW_AT_decl_line
+ .long 47 # DW_AT_type
+ .byte 10 # Abbrev [10] 0x97:0x18 DW_TAG_lexical_block
+ .byte 2 # DW_AT_low_pc
+ .long .Ltmp14-.Ltmp4 # DW_AT_high_pc
+ .byte 11 # Abbrev [11] 0x9d:0x8 DW_TAG_variable
+ .byte 14 # DW_AT_name
+ .byte 0 # DW_AT_decl_file
+ .byte 9 # DW_AT_decl_line
+ .long 43 # DW_AT_type
+ .byte 12 # Abbrev [12] 0xa5:0x9 DW_TAG_inlined_subroutine
+ .long 72 # DW_AT_abstract_origin
+ .byte 0 # DW_AT_ranges
+ .byte 0 # DW_AT_call_file
+ .byte 10 # DW_AT_call_line
+ .byte 15 # DW_AT_call_column
+ .byte 0 # End Of Children Mark
+ .byte 0 # End Of Children Mark
+ .byte 0 # End Of Children Mark
+ .byte 13 # Abbrev [13] 0xb1:0x5 DW_TAG_pointer_type
+ .long 182 # DW_AT_type
+ .byte 13 # Abbrev [13] 0xb6:0x5 DW_TAG_pointer_type
+ .long 187 # DW_AT_type
+ .byte 2 # Abbrev [2] 0xbb:0x4 DW_TAG_base_type
+ .byte 11 # DW_AT_name
+ .byte 6 # DW_AT_encoding
+ .byte 1 # DW_AT_byte_size
+ .byte 0 # End Of Children Mark
+.Ldebug_info_end0:
+ .section .debug_rnglists,"", at progbits
+ .long .Ldebug_list_header_end1-.Ldebug_list_header_start1 # Length
+.Ldebug_list_header_start1:
+ .short 5 # Version
+ .byte 4 # Address size
+ .byte 0 # Segment selector size
+ .long 1 # Offset entry count
+.Lrnglists_table_base0:
+ .long .Ldebug_ranges0-.Lrnglists_table_base0
+.Ldebug_ranges0:
+ .byte 4 # DW_RLE_offset_pair
+ .uleb128 .Ltmp6-.Lfunc_begin0 # starting offset
+ .uleb128 .Ltmp7-.Lfunc_begin0 # ending offset
+ .byte 4 # DW_RLE_offset_pair
+ .uleb128 .Ltmp11-.Lfunc_begin0 # starting offset
+ .uleb128 .Ltmp12-.Lfunc_begin0 # ending offset
+ .byte 0 # DW_RLE_end_of_list
+.Ldebug_list_header_end1:
+ .section .debug_str_offsets,"", at progbits
+ .long 64 # Length of String Offsets Set
+ .short 5
+ .short 0
+.Lstr_offsets_base0:
+ .section .debug_str,"MS", at progbits,1
+.Linfo_string0:
+ .asciz "clang version 22.0.0git (https://github.com/adam-yang/llvm-project.git a7fd15039d9846389b5e7fd7af1a63b1bfc70935)" # string offset=0
+.Linfo_string1:
+ .asciz "F:\\inbox\\compile\\compile2.cpp" # string offset=113
+.Linfo_string2:
+ .asciz "F:\\llvm-project" # string offset=143
+.Linfo_string3:
+ .asciz "float" # string offset=159
+.Linfo_string4:
+ .asciz "int" # string offset=165
+.Linfo_string5:
+ .asciz "_Z3foof" # string offset=169
+.Linfo_string6:
+ .asciz "foo" # string offset=177
+.Linfo_string7:
+ .asciz "a" # string offset=181
+.Linfo_string8:
+ .asciz "main" # string offset=183
+.Linfo_string9:
+ .asciz "argc" # string offset=188
+.Linfo_string10:
+ .asciz "argv" # string offset=193
+.Linfo_string11:
+ .asciz "char" # string offset=198
+.Linfo_string12:
+ .asciz "my_var" # string offset=203
+.Linfo_string13:
+ .asciz "i" # string offset=210
+.Linfo_string14:
+ .asciz "my_local_var" # string offset=212
+ .section .debug_str_offsets,"", at progbits
+ .long .Linfo_string0
+ .long .Linfo_string1
+ .long .Linfo_string2
+ .long .Linfo_string3
+ .long .Linfo_string4
+ .long .Linfo_string5
+ .long .Linfo_string6
+ .long .Linfo_string7
+ .long .Linfo_string8
+ .long .Linfo_string9
+ .long .Linfo_string10
+ .long .Linfo_string11
+ .long .Linfo_string12
+ .long .Linfo_string13
+ .long .Linfo_string14
+ .section .debug_addr,"", at progbits
+ .long .Ldebug_addr_end0-.Ldebug_addr_start0 # Length of contribution
+.Ldebug_addr_start0:
+ .short 5 # DWARF version number
+ .byte 4 # Address size
+ .byte 0 # Segment selector size
+.Laddr_table_base0:
+ .long .Lfunc_begin0
+ .long .Lfunc_begin1
+ .long .Ltmp4
+.Ldebug_addr_end0:
+ .ident "clang version 22.0.0git (https://github.com/adam-yang/llvm-project.git a7fd15039d9846389b5e7fd7af1a63b1bfc70935)"
+ .section ".note.GNU-stack","", at progbits
+ .section .debug_line,"", at progbits
+.Lline_table_start0:
diff --git a/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/DW_AT_ranges.test b/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/DW_AT_ranges.test
deleted file mode 100644
index 1988022ab623b..0000000000000
--- a/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/DW_AT_ranges.test
+++ /dev/null
@@ -1,28 +0,0 @@
-; Regression test for:
-; - DW_AT_ranges not being read properly
-
-; clang test.cpp --target=i686-pc-linux -g -O2
-; 01
-; 02 float foo(float a) {
-; 03 return a+a;
-; 04 }
-; 05
-; 06 int main(int argc, char **argv) {
-; 07 float my_var = argc;
-; 08 for (int i = 0; i < 4; i++) {
-; 09 float my_local_var = (float)argv[i][0];
-; 10 my_var += foo(my_local_var);
-; 11 }
-; 12 return (int)my_var;
-; 13 }
-
-; RUN: llvm-debuginfo-analyzer --attribute=all \
-; RUN: --print=all \
-; RUN: --output-sort=offset \
-; RUN: %p/Inputs/DW_AT_ranges.o 2>&1 | \
-; RUN: FileCheck %s
-
-; Make sure these two ranges are present and point to the correct offsets
-; CHECK: [006] {Range} Lines 3:10 [0x0000001255:0x0000001258]
-; CHECK: [006] {Range} Lines 3:10 [0x0000001288:0x000000128b]
-
diff --git a/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/Inputs/DW_AT_ranges.o b/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/Inputs/DW_AT_ranges.o
deleted file mode 100644
index 36a4a30f5ae5889774e6bc64ea5add498912399b..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 2952
zcma)8TWB0r7(Qn%o84 at Z$tJByjct>51DdwerUoo6*pyajYb<F^FxAp!v)9qx*|58b
zX{mSzAw?{TeJ~IZ^vMT(DToy|HZ8{bpuQD+Xazxvpb{0KV*I|DIq5bQ at n^sJ at 8|sI
zGXLxgj|@F3r4)*Ep$nxA!1zmp?->x?A|mb=9b&Br!9<@zHxdW~HbMtRpewXPC+LIO
z1K0}v2_r$jXbt=t<Tf9(V1x-M|1A8on|utyoNg9gUGy_`wVyGpn{yodp_*RpXTGX$
z82-0WkHUS(A?PQL!VmT@;`pTP1!sJFA-%2OxRcX%rDX5)?e$N!59IgOJ0Qz0eNQJi
z*HOTFxX)+7hrrhWBzgLnkY~cOtI054#~`$`#vO=T%Yc0?;U`)QZikn at 3&I)NSJCj2
z)p{TvUb4n&OIFN?Uo+xkm$F&g+W4v$IpaC|M&iaycxKqJE=1;UgtOMqHDEDoEi6jw
zLZfF|Sk$vt`9`Pp^rAJkhylN`t}Kp%e>rn7JTus&QWxftBId7Sl!Y2ot|O)9%|G^q
zb*09X`6X*>?b5B~<r0brd+UL~{mo;oQE;w{_u)<Gjo{qJ-~V1NO;ZTyFt~{m<35Ig
z?SRp at RgZ}|V{2NE$vGpP(_`A4kvlK-m_BEmm$MLzIfSKU&Pbn^GV2*-M#z}#?QJ*p
z-f~B4M^|sGt1VRNsCJx{9XP4D(0d<_Mp2n=OS%R-Pp|98r8i8Wby6^G>GtZqyQ6!e
zhuZh9>+V6JAroo7MTmymiORTl9SY|F${<8!Kxmt8tBp}_Htfkj-B3;IMSuI~=CSDU
z=#wa^*%F8N{#^u2A$f(dUp+!{Q%IWkdQoc%py`I88K$9omr0Hsgx%22g^z*@(+ml1
z3xrUE&qage-I60=5#lC?wR1*fMGQBJ(8sVwWV2{sTBBB^ipj!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llvm-debuginfo-analyzer/DWARF/Inputs/amdgpu-ranges.o b/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/Inputs/amdgpu-ranges.o
deleted file mode 100644
index 168724b217b0328b527f8bc3dc1f8a5c7387cba4..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 6440
zcmeHLYm8M_6<+&1?%bI>FarY&1hlu5X~tMiXLuEnz{MgD1EwX?q8T|obMKiuhu)Xx
zoI4LfWo87NTB5WNe at J5qwhA2{Q#7ef>QJaL^#P+Ml$v0r at dpjTL=%jyHjZnZv-jo9
zo~!YPCN^;;`>wsd{q42(W1YSC%-&CL*`P4C4!AJ54onyk-P#lyL`((M6wIy440#`x
zUk27y4d<c2z!-ylSRT8|7_GqY7;GFGn}ETw36*9u{|cZ!fHuH}H?f1JfpZOD4_rWO
z0Q+Mr_W$ab5*vDI05Jyp#}sYoAjMD=hEc4ms)m}yZ==KaYCd at KJnHKJgYXxX>Y+d4
zL5#+LW2qtia1dvZVl!o*0tc=rh=zUCE1;vrVDM`}d(C-JwJ!(0ls!RA@)hU4Z%!P?
zIOtcU at u1cjXxx81)G_iKLmx3Uh9!=r4*kV%CvnUJxJKc)7hDHrKm!;>f6x8Dd`Q>e
z3z$bbW(RI0G-8>L<pC_4uxRUtnSN+s)?p2_VRnS6Sl3RmKZcbf%8wQG(1BT?`Oh+S
z20VvNA28)m60}#@TgVxj1#AXuX=&2c7Pq;vdB*&iF|XNgKFFE at lx3i{Y;IaRZ&l)x
zi9!p2sxY-Bksx!JHDK`jVRMs;4f-Nvu1O>k05OA+6Saj{Yv%#f=%6eN&CPf~#g|Po
zYZCz-pf16--vf}C!(G;gv4S|$+5&LFG=S;Tf-xbyGO+~1!H=-$z~ZRzW1(Y0$of0g
z08*5tq*+YWk)~-WG&ImvO;c)u79}17>QoD{8mNQVek8<M6Vwp1mK`KhnFY14Vx<n^
z>TIZ^7L>$O_%pM9M!lx}5Np~rqD)h#PY*0$(;I?{#-=w0l{f=EQ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)NTAy7V9M1L_cAF11r_W
zKgthoF)kW^Jr;TVS;S<Y2tkg=zePqwcv at 8u`i`r`zs}>o#+ekKmQ;>^0kLZFcL*Zy
zFO<yv6*lmp3QC|w{}a;pE06yV$d-Ku4rsAZT0>R&m522%wp5${G5)ZNu0I_~qQBVJ
zYlu~g-^$~Er4l);$lR+4SBw8k9)A<>PwP*2o*bXvP2^LI6RUxY at c8!%fNK$7X#5Kz
T^4h&aev9{C$%&*0lH>macHtHu
diff --git a/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/Inputs/high_pc_exclusive.o b/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/Inputs/high_pc_exclusive.o
deleted file mode 100644
index 751cebb87cc668579760bb242168c644f2648b14..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 2472
zcmcgtOKcle6n*3IxK8ZEO+u8?RMaiC2+)jU=hr3(k~XfCDxgp$B9(&7*dE&h{>h$1
z4x(aV6&k at Jl`3}Kut1gAv0%fd0;CppNGw^fpb`=+iegZtBEmW2dC at emV8u<2 at 9(_-
zo%h~NEnQL+MMzPFDx^1o;2VKXW<o?omlzR)Vn8s&oJ1522tQ(k3ar4F7=TYOhp+>v
z1NjL-f_ZVYlYa>RVP6NA5GFKF{+v&UbEi9)L;QY^aOTDKNQuLFayV~}api%XJDg{G
zIlpD(Z()3iC(wpqo_G~`sDB9ir^HKECSJ;omaNJ~Q*TuDWGC+ZMfV4Laon3=d{~{u
zGMxN6jI*#gK1F%^icsDOD#KyF{{}iaffz9Y9`{Jh_Xe-~F7#-=3t%wtxU6nJX#E<#
zm->_8$ZL0ZBYmm8d#N_v*0px`wd1>y=Thz6$XaU8$$gM&x9%$2srD~F?nch0_F7+u
zU;j#oNBjF#Gzku}A%tr$Vm={g&Yfqq1HT)ZYyJJN{c4kjD at vadiw$UMtUh#fXgJn4
z+#hHR;plXQ=G-wgHWQi+Ee^c&B<g8G_znU%f{??(7-xhUdodK^n5%#$6lcYXI3<*z
z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test/tools/llvm-debuginfo-analyzer/DWARF/amdgpu-ranges.s
new file mode 100644
index 0000000000000..1ece4e21d3bf6
--- /dev/null
+++ b/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/amdgpu-ranges.s
@@ -0,0 +1,857 @@
+# REUIRES: amdgpu-registered-target
+
+# Regression test for:
+# - DW_AT_ranges not being read properly
+# - Instructions at DW_AT_high_pc of a scope incorrectly included in the scope
+
+# test.hlsl
+# 01 RWBuffer<float> u0 : register(u0);
+# 02 RWBuffer<float> u1 : register(u1);
+# 03
+# 04 [RootSignature("DescriptorTable(UAV(u0,numDescriptors=2))")]
+# 05 [numthreads(64,1,1)]
+# 06 void main(uint3 dtid : SV_DispatchThreadID) {
+# 07 float my_var = u0[dtid.x];
+# 08 [loop]
+# 09 for (int i = 0; i < 10; i++) {
+# 10 float my_local_var = i*2;
+# 11 my_var += my_local_var;
+# 12 }
+# 13 u1[dtid.x] = my_var;
+# 14 }
+
+# RUN: llvm-mc %s --mcpu=gfx1100 -triple=amdgcn-amd-amdpal -filetype=obj -o - | \
+# RUN: llvm-debuginfo-analyzer --attribute=all \
+# RUN: --print=all \
+# RUN: --output-sort=offset \
+# RUN: - 2>&1 | \
+# RUN: FileCheck %s
+
+# Make sure these two ranges are present and point to the correct offsets
+# CHECK: [005] {Range} Lines 10:9 [0x00000000b0:0x00000000c8]
+# CHECK: [005] {Range} Lines 11:13 [0x00000000f4:0x0000000114]
+
+# Make sure the offset 0x114 does not show up at the scope level 005 and 004
+# CHECK-NOT: [0x0000000114][005]
+# CHECK-NOT: [0x0000000114][004]
+# CHECK: [0x0000000114][003]
+
+ .file 0 "F:\\inbox\\llpc_dbg\\tests_new\\for.hlsl"
+ .text
+ .globl _amdgpu_cs_main
+ .p2align 8
+ .type _amdgpu_cs_main, at function
+_amdgpu_cs_main:
+.Lfunc_begin0:
+ .loc 0 6 0
+ .cfi_sections .debug_frame
+ .cfi_startproc
+ v_writelane_b32 v1, s4, 0
+ s_mov_b32 s0, s2
+ s_mov_b32 s4, s1
+ v_readlane_b32 s1, v1, 0
+ s_mov_b32 s8, s0
+.Ltmp0:
+ .loc 0 6 24 prologue_end
+ s_getpc_b64 s[2:3]
+ s_mov_b32 s1, 0x3ff
+ v_and_b32_e64 v0, v0, s1
+ s_mov_b32 s1, 6
+ v_lshl_add_u32 v0, s0, s1, v0
+ scratch_store_b32 off, v0, off offset:4
+.Ltmp1:
+ .loc 0 0 24 is_stmt 0
+ s_mov_b32 s1, -1
+ s_mov_b32 s0, 0
+ s_mov_b32 s6, s0
+ s_mov_b32 s7, s1
+ .loc 0 7 25 is_stmt 1
+ s_and_b64 s[2:3], s[2:3], s[6:7]
+ s_mov_b32 s1, 0
+ s_mov_b32 s5, s1
+ s_or_b64 s[2:3], s[2:3], s[4:5]
+ v_writelane_b32 v1, s2, 1
+ v_writelane_b32 v1, s3, 2
+.Ltmp2:
+ s_load_b128 s[4:7], s[2:3], 0x0
+ s_waitcnt lgkmcnt(0)
+ buffer_load_format_x v0, v0, s[4:7], s0 idxen
+.Ltmp3:
+ .loc 0 9 10
+ s_waitcnt vmcnt(0)
+ scratch_store_b32 off, v0, off
+.Ltmp4:
+ v_writelane_b32 v1, s0, 3
+.Ltmp5:
+.LBB0_1:
+ .loc 0 0 10 is_stmt 0
+ v_readlane_b32 s0, v1, 3
+ scratch_load_b32 v0, off, off
+.Ltmp6:
+ s_mov_b32 s1, 1
+.Ltmp7:
+ .loc 0 10 34 is_stmt 1
+ s_lshl_b32 s2, s0, s1
+ .loc 0 10 33 is_stmt 0
+ v_cvt_f32_u32_e64 v2, s2
+.Ltmp8:
+ .loc 0 11 19 is_stmt 1
+ s_waitcnt vmcnt(0)
+ v_add_f32_e64 v0, v0, v2
+.Ltmp9:
+ .loc 0 9 35
+ s_add_i32 s0, s0, s1
+.Ltmp10:
+ .loc 0 0 35 is_stmt 0
+ s_mov_b32 s1, 10
+ .loc 0 9 28
+ s_cmp_lg_u32 s0, s1
+ v_mov_b32_e32 v2, v0
+.Ltmp11:
+ .loc 0 0 28
+ scratch_store_b32 off, v2, off
+ v_writelane_b32 v1, s0, 3
+.Ltmp12:
+ .loc 0 9 10
+ scratch_store_b32 off, v0, off offset:8
+.Ltmp13:
+ s_cbranch_scc1 .LBB0_1
+.Ltmp14:
+ .loc 0 11 19 is_stmt 1
+ v_readlane_b32 s0, v1, 1
+.Ltmp15:
+ v_readlane_b32 s1, v1, 2
+ scratch_load_b32 v0, off, off offset:4
+ scratch_load_b32 v6, off, off offset:8
+.Ltmp16:
+ .loc 0 13 21
+ s_waitcnt vmcnt(0)
+ v_mov_b32_e32 v2, v6
+ v_mov_b32_e32 v3, v6
+ v_mov_b32_e32 v4, v6
+ v_mov_b32_e32 v5, v6
+ s_load_b128 s[0:3], s[0:1], 0x20
+ s_mov_b32 s4, 0
+ s_waitcnt lgkmcnt(0)
+ buffer_store_format_xyzw v[2:5], v0, s[0:3], s4 idxen
+ .loc 0 14 8
+ s_endpgm
+.Ltmp17:
+.Lfunc_end0:
+ .size _amdgpu_cs_main, .Lfunc_end0-_amdgpu_cs_main
+ .cfi_endproc
+
+ .set _amdgpu_cs_main.num_vgpr, 7
+ .set _amdgpu_cs_main.num_agpr, 0
+ .set _amdgpu_cs_main.numbered_sgpr, 11
+ .set _amdgpu_cs_main.num_named_barrier, 0
+ .set _amdgpu_cs_main.private_seg_size, 16
+ .set _amdgpu_cs_main.uses_vcc, 0
+ .set _amdgpu_cs_main.uses_flat_scratch, 0
+ .set _amdgpu_cs_main.has_dyn_sized_stack, 0
+ .set _amdgpu_cs_main.has_recursion, 0
+ .set _amdgpu_cs_main.has_indirect_call, 0
+ .set _amdgpu_cs_main.num_vgpr_rank_sum, 0
+ .p2alignl 7, 3214868480
+ .fill 96, 4, 3214868480
+ .section .AMDGPU.gpr_maximums,"", at progbits
+ .set amdgpu.max_num_vgpr, 0
+ .set amdgpu.max_num_agpr, 0
+ .set amdgpu.max_num_sgpr, 0
+ .text
+ .section .debug_loclists,"", at progbits
+ .long .Ldebug_list_header_end0-.Ldebug_list_header_start0
+.Ldebug_list_header_start0:
+ .short 5
+ .byte 8
+ .byte 0
+ .long 4
+.Lloclists_table_base0:
+ .long .Ldebug_loc0-.Lloclists_table_base0
+ .long .Ldebug_loc1-.Lloclists_table_base0
+ .long .Ldebug_loc2-.Lloclists_table_base0
+ .long .Ldebug_loc3-.Lloclists_table_base0
+.Ldebug_loc0:
+ .byte 4
+ .uleb128 .Ltmp1-.Lfunc_begin0
+ .uleb128 .Ltmp3-.Lfunc_begin0
+ .byte 5
+ .byte 144
+ .byte 128
+ .byte 20
+ .byte 147
+ .byte 4
+ .byte 0
+.Ldebug_loc1:
+ .byte 4
+ .uleb128 .Ltmp3-.Lfunc_begin0
+ .uleb128 .Ltmp4-.Lfunc_begin0
+ .byte 3
+ .byte 144
+ .byte 128
+ .byte 20
+ .byte 4
+ .uleb128 .Ltmp6-.Lfunc_begin0
+ .uleb128 .Ltmp13-.Lfunc_begin0
+ .byte 3
+ .byte 144
+ .byte 128
+ .byte 20
+ .byte 4
+ .uleb128 .Ltmp16-.Lfunc_begin0
+ .uleb128 .Lfunc_end0-.Lfunc_begin0
+ .byte 3
+ .byte 144
+ .byte 134
+ .byte 20
+ .byte 0
+.Ldebug_loc2:
+ .byte 4
+ .uleb128 .Ltmp2-.Lfunc_begin0
+ .uleb128 .Ltmp5-.Lfunc_begin0
+ .byte 3
+ .byte 17
+ .byte 0
+ .byte 159
+ .byte 4
+ .uleb128 .Ltmp6-.Lfunc_begin0
+ .uleb128 .Ltmp15-.Lfunc_begin0
+ .byte 2
+ .byte 144
+ .byte 32
+ .byte 0
+.Ldebug_loc3:
+ .byte 4
+ .uleb128 .Ltmp8-.Lfunc_begin0
+ .uleb128 .Ltmp11-.Lfunc_begin0
+ .byte 3
+ .byte 144
+ .byte 130
+ .byte 20
+ .byte 0
+.Ldebug_list_header_end0:
+ .section .debug_abbrev,"", at progbits
+ .byte 1
+ .byte 17
+ .byte 1
+ .byte 37
+ .byte 37
+ .byte 19
+ .byte 5
+ .byte 3
+ .byte 37
+ .byte 114
+ .byte 23
+ .byte 16
+ .byte 23
+ .byte 17
+ .byte 27
+ .byte 18
+ .byte 6
+ .byte 115
+ .byte 23
+ .byte 116
+ .byte 23
+ .ascii "\214\001"
+ .byte 23
+ .byte 0
+ .byte 0
+ .byte 2
+ .byte 52
+ .byte 0
+ .byte 3
+ .byte 37
+ .byte 73
+ .byte 19
+ .byte 63
+ .byte 25
+ .byte 58
+ .byte 11
+ .byte 59
+ .byte 11
+ .byte 110
+ .byte 37
+ .byte 0
+ .byte 0
+ .byte 3
+ .byte 2
+ .byte 1
+ .byte 3
+ .byte 37
+ .byte 11
+ .byte 11
+ .byte 58
+ .byte 11
+ .byte 59
+ .byte 11
+ .ascii "\210\001"
+ .byte 15
+ .byte 0
+ .byte 0
+ .byte 4
+ .byte 47
+ .byte 0
+ .byte 73
+ .byte 19
+ .byte 3
+ .byte 37
+ .byte 0
+ .byte 0
+ .byte 5
+ .byte 36
+ .byte 0
+ .byte 3
+ .byte 37
+ .byte 62
+ .byte 11
+ .byte 11
+ .byte 11
+ .byte 0
+ .byte 0
+ .byte 6
+ .byte 46
+ .byte 1
+ .byte 17
+ .byte 27
+ .byte 18
+ .byte 6
+ .byte 3
+ .byte 37
+ .byte 58
+ .byte 11
+ .byte 59
+ .byte 11
+ .byte 63
+ .byte 25
+ .byte 0
+ .byte 0
+ .byte 7
+ .byte 5
+ .byte 0
+ .byte 2
+ .byte 34
+ .byte 3
+ .byte 37
+ .byte 58
+ .byte 11
+ .byte 59
+ .byte 11
+ .byte 73
+ .byte 19
+ .byte 0
+ .byte 0
+ .byte 8
+ .byte 52
+ .byte 0
+ .byte 2
+ .byte 34
+ .byte 3
+ .byte 37
+ .byte 58
+ .byte 11
+ .byte 59
+ .byte 11
+ .byte 73
+ .byte 19
+ .byte 0
+ .byte 0
+ .byte 9
+ .byte 11
+ .byte 1
+ .byte 17
+ .byte 27
+ .byte 18
+ .byte 6
+ .byte 0
+ .byte 0
+ .byte 10
+ .byte 11
+ .byte 1
+ .byte 85
+ .byte 35
+ .byte 0
+ .byte 0
+ .byte 11
+ .byte 22
+ .byte 0
+ .byte 73
+ .byte 19
+ .byte 3
+ .byte 37
+ .byte 0
+ .byte 0
+ .byte 12
+ .byte 2
+ .byte 1
+ .byte 3
+ .byte 37
+ .byte 11
+ .byte 11
+ .ascii "\210\001"
+ .byte 15
+ .byte 0
+ .byte 0
+ .byte 13
+ .byte 48
+ .byte 0
+ .byte 73
+ .byte 19
+ .byte 3
+ .byte 37
+ .byte 28
+ .byte 13
+ .byte 0
+ .byte 0
+ .byte 14
+ .byte 13
+ .byte 0
+ .byte 3
+ .byte 37
+ .byte 73
+ .byte 19
+ .ascii "\210\001"
+ .byte 15
+ .byte 56
+ .byte 11
+ .byte 50
+ .byte 11
+ .byte 0
+ .byte 0
+ .byte 0
+ .section .debug_info,"", at progbits
+.Lcu_begin0:
+ .long .Ldebug_info_end0-.Ldebug_info_start0
+.Ldebug_info_start0:
+ .short 5
+ .byte 1
+ .byte 8
+ .long .debug_abbrev
+ .byte 1
+ .byte 0
+ .short 4
+ .byte 1
+ .long .Lstr_offsets_base0
+ .long .Lline_table_start0
+ .byte 0
+ .long .Lfunc_end0-.Lfunc_begin0
+ .long .Laddr_table_base0
+ .long .Lrnglists_table_base0
+ .long .Lloclists_table_base0
+ .byte 2
+ .byte 2
+ .long 51
+
+ .byte 0
+ .byte 1
+ .byte 6
+ .byte 3
+ .byte 5
+ .byte 4
+ .byte 0
+ .byte 1
+ .byte 4
+ .byte 4
+ .long 64
+ .byte 4
+ .byte 0
+ .byte 5
+ .byte 3
+ .byte 4
+ .byte 4
+ .byte 2
+ .byte 7
+ .long 51
+
+ .byte 0
+ .byte 2
+ .byte 8
+ .byte 6
+ .byte 0
+ .long .Lfunc_end0-.Lfunc_begin0
+ .byte 9
+ .byte 0
+ .byte 6
+
+ .byte 7
+ .byte 0
+ .byte 10
+ .byte 0
+ .byte 6
+ .long 133
+ .byte 8
+ .byte 1
+ .byte 19
+ .byte 0
+ .byte 7
+ .long 64
+ .byte 9
+ .byte 1
+ .long .Ltmp16-.Ltmp3
+ .byte 8
+ .byte 2
+ .byte 20
+ .byte 0
+ .byte 9
+ .long 188
+ .byte 10
+ .byte 0
+ .byte 8
+ .byte 3
+ .byte 21
+ .byte 0
+ .byte 10
+ .long 64
+ .byte 0
+ .byte 0
+ .byte 0
+ .byte 11
+ .long 139
+ .byte 18
+ .byte 12
+ .byte 17
+ .byte 12
+ .byte 4
+ .byte 4
+ .long 184
+ .byte 4
+ .byte 13
+ .long 188
+ .byte 13
+ .byte 3
+ .byte 14
+ .byte 14
+ .long 184
+ .byte 4
+ .byte 0
+ .byte 1
+ .byte 14
+ .byte 15
+ .long 184
+ .byte 4
+ .byte 4
+ .byte 1
+ .byte 14
+ .byte 16
+ .long 184
+ .byte 4
+ .byte 8
+ .byte 1
+ .byte 0
+ .byte 5
+ .byte 11
+ .byte 7
+ .byte 4
+ .byte 5
+ .byte 12
+ .byte 5
+ .byte 4
+ .byte 0
+.Ldebug_info_end0:
+ .section .debug_rnglists,"", at progbits
+ .long .Ldebug_list_header_end1-.Ldebug_list_header_start1
+.Ldebug_list_header_start1:
+ .short 5
+ .byte 8
+ .byte 0
+ .long 1
+.Lrnglists_table_base0:
+ .long .Ldebug_ranges0-.Lrnglists_table_base0
+.Ldebug_ranges0:
+ .byte 4
+ .uleb128 .Ltmp7-.Lfunc_begin0
+ .uleb128 .Ltmp9-.Lfunc_begin0
+ .byte 4
+ .uleb128 .Ltmp14-.Lfunc_begin0
+ .uleb128 .Ltmp16-.Lfunc_begin0
+ .byte 0
+.Ldebug_list_header_end1:
+ .section .debug_str_offsets,"", at progbits
+ .long 92
+ .short 5
+ .short 0
+.Lstr_offsets_base0:
+ .section .debug_str,"MS", at progbits,1
+.Linfo_string0:
+ .asciz "dxcoob 1.8.2505.32 (b106a961d)"
+.Linfo_string1:
+ .asciz "F:\\inbox\\llpc_dbg\\tests_new\\for.hlsl"
+.Linfo_string2:
+ .asciz "u0"
+.Linfo_string3:
+ .asciz "RWBuffer<float>"
+.Linfo_string4:
+ .asciz "float"
+.Linfo_string5:
+ .asciz "element"
+.Linfo_string6:
+ .asciz "?u0@@3V?$RWBuffer at M@@A"
+.Linfo_string7:
+ .asciz "u1"
+.Linfo_string8:
+ .asciz "?u1@@3V?$RWBuffer at M@@A"
+.Linfo_string9:
+ .asciz "main"
+.Linfo_string10:
+ .asciz "dtid"
+.Linfo_string11:
+ .asciz "uint3"
+.Linfo_string12:
+ .asciz "vector<unsigned int, 3>"
+.Linfo_string13:
+ .asciz "unsigned int"
+.Linfo_string14:
+ .asciz "int"
+.Linfo_string15:
+ .asciz "element_count"
+.Linfo_string16:
+ .asciz "x"
+.Linfo_string17:
+ .asciz "y"
+.Linfo_string18:
+ .asciz "z"
+.Linfo_string19:
+ .asciz "my_var"
+.Linfo_string20:
+ .asciz "i"
+.Linfo_string21:
+ .asciz "my_local_var"
+ .section .debug_str_offsets,"", at progbits
+ .long .Linfo_string0
+ .long .Linfo_string1
+ .long .Linfo_string2
+ .long .Linfo_string4
+ .long .Linfo_string5
+ .long .Linfo_string3
+ .long .Linfo_string6
+ .long .Linfo_string7
+ .long .Linfo_string8
+ .long .Linfo_string9
+ .long .Linfo_string10
+ .long .Linfo_string13
+ .long .Linfo_string14
+ .long .Linfo_string15
+ .long .Linfo_string16
+ .long .Linfo_string17
+ .long .Linfo_string18
+ .long .Linfo_string12
+ .long .Linfo_string11
+ .long .Linfo_string19
+ .long .Linfo_string20
+ .long .Linfo_string21
+ .section .debug_addr,"", at progbits
+ .long .Ldebug_addr_end0-.Ldebug_addr_start0
+.Ldebug_addr_start0:
+ .short 5
+ .byte 8
+ .byte 0
+.Laddr_table_base0:
+ .quad .Lfunc_begin0
+ .quad .Ltmp3
+.Ldebug_addr_end0:
+ .section .debug_names,"", at progbits
+ .long .Lnames_end0-.Lnames_start0
+.Lnames_start0:
+ .short 5
+ .short 0
+ .long 1
+ .long 0
+ .long 0
+ .long 7
+ .long 7
+ .long .Lnames_abbrev_end0-.Lnames_abbrev_start0
+ .long 8
+ .ascii "LLVM0700"
+ .long .Lcu_begin0
+ .long 0
+ .long 1
+ .long 0
+ .long 2
+ .long 5
+ .long 0
+ .long 7
+ .long 259121563
+ .long 193495088
+ .long 2090499946
+ .long -2056329416
+ .long 276802040
+ .long -696406599
+ .long -1304652851
+ .long .Linfo_string4
+ .long .Linfo_string14
+ .long .Linfo_string9
+ .long .Linfo_string3
+ .long .Linfo_string11
+ .long .Linfo_string12
+ .long .Linfo_string13
+ .long .Lnames1-.Lnames_entries0
+ .long .Lnames6-.Lnames_entries0
+ .long .Lnames2-.Lnames_entries0
+ .long .Lnames0-.Lnames_entries0
+ .long .Lnames3-.Lnames_entries0
+ .long .Lnames4-.Lnames_entries0
+ .long .Lnames5-.Lnames_entries0
+.Lnames_abbrev_start0:
+ .byte 1
+ .byte 36
+ .byte 3
+ .byte 19
+ .byte 4
+ .byte 25
+ .byte 0
+ .byte 0
+ .byte 2
+ .byte 46
+ .byte 3
+ .byte 19
+ .byte 4
+ .byte 25
+ .byte 0
+ .byte 0
+ .byte 3
+ .byte 2
+ .byte 3
+ .byte 19
+ .byte 4
+ .byte 25
+ .byte 0
+ .byte 0
+ .byte 4
+ .byte 22
+ .byte 3
+ .byte 19
+ .byte 4
+ .byte 25
+ .byte 0
+ .byte 0
+ .byte 0
+.Lnames_abbrev_end0:
+.Lnames_entries0:
+.Lnames1:
+.L0:
+ .byte 1
+ .long 64
+ .byte 0
+.Lnames6:
+.L5:
+ .byte 1
+ .long 188
+ .byte 0
+.Lnames2:
+.L3:
+ .byte 2
+ .long 77
+ .byte 0
+.Lnames0:
+.L4:
+ .byte 3
+ .long 51
+ .byte 0
+.Lnames3:
+.L1:
+ .byte 4
+ .long 133
+ .byte 0
+.Lnames4:
+.L2:
+ .byte 3
+ .long 139
+ .byte 0
+.Lnames5:
+.L6:
+ .byte 1
+ .long 184
+ .byte 0
+ .p2align 2, 0x0
+.Lnames_end0:
+ .section ".note.GNU-stack","", at progbits
+ .amdgpu_pal_metadata
+---
+amdpal.pipelines:
+ - .api: DX12
+ .compute_registers:
+ .tg_size_en: true
+ .tgid_x_en: true
+ .tgid_y_en: true
+ .tgid_z_en: true
+ .tidig_comp_cnt: 0
+ .hardware_stages:
+ .cs:
+ .checksum_value: 0xf6026295
+ .debug_mode: false
+ .entry_point: _amdgpu_cs_main
+ .entry_point_symbol: _amdgpu_cs_main
+ .excp_en: 0
+ .float_mode: 0xc0
+ .ieee_mode: false
+ .image_op: false
+ .lds_size: 0
+ .mem_ordered: true
+ .scratch_en: true
+ .scratch_memory_size: 0x10
+ .sgpr_count: 0xb
+ .sgpr_limit: 0x6a
+ .threadgroup_dimensions:
+ - 0x40
+ - 0x1
+ - 0x1
+ .trap_present: false
+ .user_data_reg_map:
+ - 0x10000000
+ - 0x4
+ - 0xffffffff
+ - 0xffffffff
+ - 0xffffffff
+ - 0xffffffff
+ - 0xffffffff
+ - 0xffffffff
+ - 0xffffffff
+ - 0xffffffff
+ - 0xffffffff
+ - 0xffffffff
+ - 0xffffffff
+ - 0xffffffff
+ - 0xffffffff
+ - 0xffffffff
+ - 0xffffffff
+ - 0xffffffff
+ - 0xffffffff
+ - 0xffffffff
+ - 0xffffffff
+ - 0xffffffff
+ - 0xffffffff
+ - 0xffffffff
+ - 0xffffffff
+ - 0xffffffff
+ - 0xffffffff
+ - 0xffffffff
+ - 0xffffffff
+ - 0xffffffff
+ - 0xffffffff
+ - 0xffffffff
+ .user_sgprs: 0x2
+ .vgpr_count: 0x7
+ .vgpr_limit: 0x100
+ .wavefront_size: 0x40
+ .wgp_mode: false
+ .internal_pipeline_hash:
+ - 0x54cfec268c68b7fa
+ - 0xe957d7f6d25d46bd
+ .registers: {}
+ .resource_hash: 0x8541eac80fec18c9
+ .shaders:
+ .compute:
+ .api_shader_hash:
+ - 0x660de82aef6897d6
+ - 0x78f09cf20797819b
+ .hardware_mapping:
+ - .cs
+ .spill_threshold: 0xffff
+ .type: Cs
+ .user_data_limit: 0x5
+amdpal.version:
+ - 0x3
+ - 0
+...
+ .end_amdgpu_pal_metadata
+ .section .debug_line,"", at progbits
+.Lline_table_start0:
diff --git a/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/amdgpu-ranges.test b/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/amdgpu-ranges.test
deleted file mode 100644
index 6d55236636710..0000000000000
--- a/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/amdgpu-ranges.test
+++ /dev/null
@@ -1,36 +0,0 @@
-; REUIRES: amdgpu-registered-target
-
-; Regression test for:
-; - DW_AT_ranges not being read properly
-; - Instructions at DW_AT_high_pc of a scope incorrectly included in the scope
-
-; test.hlsl
-; 01 RWBuffer<float> u0 : register(u0);
-; 02 RWBuffer<float> u1 : register(u1);
-; 03
-; 04 [RootSignature("DescriptorTable(UAV(u0,numDescriptors=2))")]
-; 05 [numthreads(64,1,1)]
-; 06 void main(uint3 dtid : SV_DispatchThreadID) {
-; 07 float my_var = u0[dtid.x];
-; 08 [loop]
-; 09 for (int i = 0; i < 10; i++) {
-; 10 float my_local_var = i*2;
-; 11 my_var += my_local_var;
-; 12 }
-; 13 u1[dtid.x] = my_var;
-; 14 }
-
-; RUN: llvm-debuginfo-analyzer --attribute=all \
-; RUN: --print=all \
-; RUN: --output-sort=offset \
-; RUN: %p/Inputs/amdgpu-ranges.o 2>&1 | \
-; RUN: FileCheck %s
-
-; Make sure these two ranges are present and point to the correct offsets
-; CHECK: [005] {Range} Lines 10:9 [0x00000000b0:0x00000000c8]
-; CHECK: [005] {Range} Lines 11:13 [0x00000000f4:0x0000000114]
-
-; Make sure the offset 0x114 does not show up at the scope level 005 and 004
-; CHECK-NOT: [0x0000000114][005]
-; CHECK-NOT: [0x0000000114][004]
-
diff --git a/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/high_pc_exclusive.s b/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/high_pc_exclusive.s
new file mode 100644
index 0000000000000..b5929af53ea0d
--- /dev/null
+++ b/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/high_pc_exclusive.s
@@ -0,0 +1,276 @@
+# Regression test for:
+# - Instructions at DW_AT_high_pc of a scope incorrectly included in the scope
+
+# clang test.cpp --target=i686-pc-linux -g -O0
+# 1
+# 2 int main(void) {
+# 3 float ret = 0;
+# 4 for (int i = 0; i < 10; i++) {
+# 5 ret += i;
+# 6 }
+# 7 return ret;
+# 8 }
+# 9
+
+# RUN: llvm-mc %s -triple=i686-pc-linux -filetype=obj -o - | \
+# RUN: llvm-debuginfo-analyzer --attribute=all \
+# RUN: --print=all \
+# RUN: --output-sort=offset \
+# RUN: - | \
+# RUN: FileCheck %s
+
+# Make sure the line mapping at 0x3c does not show up at the scope level 004
+# CHECK-NOT: [0x000000003c][004] 7 {Line}
+
+# Make sure it *does* appear at scope level 003
+# CHECK: [0x000000003c][003] 7 {Line}
+
+ .file "compile.cpp"
+ .text
+ .globl main # -- Begin function main
+ .p2align 4
+ .type main, at function
+main: # @main
+.Lfunc_begin0:
+ .file 0 "F:\\llvm-project" "F:\\inbox\\compile\\compile.cpp" md5 0xd6c1ff0111a28a274dda09b8b649ba31
+ .loc 0 2 0 # F:\inbox\compile\compile.cpp:2:0
+ .cfi_startproc
+# %bb.0: # %entry
+ pushl %ebp
+ .cfi_def_cfa_offset 8
+ .cfi_offset %ebp, -8
+ movl %esp, %ebp
+ .cfi_def_cfa_register %ebp
+ subl $12, %esp
+ movl $0, -4(%ebp)
+.Ltmp0:
+ .loc 0 3 15 prologue_end # F:\inbox\compile\compile.cpp:3:15
+ xorps %xmm0, %xmm0
+ movss %xmm0, -8(%ebp)
+.Ltmp1:
+ .loc 0 4 18 # F:\inbox\compile\compile.cpp:4:18
+ movl $0, -12(%ebp)
+.LBB0_1: # %for.cond
+ # =>This Inner Loop Header: Depth=1
+.Ltmp2:
+ .loc 0 4 27 is_stmt 0 # F:\inbox\compile\compile.cpp:4:27
+ cmpl $10, -12(%ebp)
+.Ltmp3:
+ .loc 0 4 9 # F:\inbox\compile\compile.cpp:4:9
+ jge .LBB0_4
+# %bb.2: # %for.body
+ # in Loop: Header=BB0_1 Depth=1
+.Ltmp4:
+ .loc 0 5 18 is_stmt 1 # F:\inbox\compile\compile.cpp:5:18
+ cvtsi2ssl -12(%ebp), %xmm0
+ .loc 0 5 15 is_stmt 0 # F:\inbox\compile\compile.cpp:5:15
+ addss -8(%ebp), %xmm0
+ movss %xmm0, -8(%ebp)
+.Ltmp5:
+# %bb.3: # %for.inc
+ # in Loop: Header=BB0_1 Depth=1
+ .loc 0 4 34 is_stmt 1 # F:\inbox\compile\compile.cpp:4:34
+ movl -12(%ebp), %eax
+ addl $1, %eax
+ movl %eax, -12(%ebp)
+ .loc 0 4 9 is_stmt 0 # F:\inbox\compile\compile.cpp:4:9
+ jmp .LBB0_1
+.Ltmp6:
+.LBB0_4: # %for.end
+ .loc 0 7 16 is_stmt 1 # F:\inbox\compile\compile.cpp:7:16
+ cvttss2si -8(%ebp), %eax
+ .loc 0 7 9 epilogue_begin is_stmt 0 # F:\inbox\compile\compile.cpp:7:9
+ addl $12, %esp
+ popl %ebp
+ .cfi_def_cfa %esp, 4
+ retl
+.Ltmp7:
+.Lfunc_end0:
+ .size main, .Lfunc_end0-main
+ .cfi_endproc
+ # -- End function
+ .section .debug_abbrev,"", at progbits
+ .byte 1 # Abbreviation Code
+ .byte 17 # DW_TAG_compile_unit
+ .byte 1 # DW_CHILDREN_yes
+ .byte 37 # DW_AT_producer
+ .byte 37 # DW_FORM_strx1
+ .byte 19 # DW_AT_language
+ .byte 5 # DW_FORM_data2
+ .byte 3 # DW_AT_name
+ .byte 37 # DW_FORM_strx1
+ .byte 114 # DW_AT_str_offsets_base
+ .byte 23 # DW_FORM_sec_offset
+ .byte 16 # DW_AT_stmt_list
+ .byte 23 # DW_FORM_sec_offset
+ .byte 27 # DW_AT_comp_dir
+ .byte 37 # DW_FORM_strx1
+ .byte 17 # DW_AT_low_pc
+ .byte 27 # DW_FORM_addrx
+ .byte 18 # DW_AT_high_pc
+ .byte 6 # DW_FORM_data4
+ .byte 115 # DW_AT_addr_base
+ .byte 23 # DW_FORM_sec_offset
+ .byte 0 # EOM(1)
+ .byte 0 # EOM(2)
+ .byte 2 # Abbreviation Code
+ .byte 46 # DW_TAG_subprogram
+ .byte 1 # DW_CHILDREN_yes
+ .byte 17 # DW_AT_low_pc
+ .byte 27 # DW_FORM_addrx
+ .byte 18 # DW_AT_high_pc
+ .byte 6 # DW_FORM_data4
+ .byte 64 # DW_AT_frame_base
+ .byte 24 # DW_FORM_exprloc
+ .byte 3 # DW_AT_name
+ .byte 37 # DW_FORM_strx1
+ .byte 58 # DW_AT_decl_file
+ .byte 11 # DW_FORM_data1
+ .byte 59 # DW_AT_decl_line
+ .byte 11 # DW_FORM_data1
+ .byte 73 # DW_AT_type
+ .byte 19 # DW_FORM_ref4
+ .byte 63 # DW_AT_external
+ .byte 25 # DW_FORM_flag_present
+ .byte 0 # EOM(1)
+ .byte 0 # EOM(2)
+ .byte 3 # Abbreviation Code
+ .byte 52 # DW_TAG_variable
+ .byte 0 # DW_CHILDREN_no
+ .byte 2 # DW_AT_location
+ .byte 24 # DW_FORM_exprloc
+ .byte 3 # DW_AT_name
+ .byte 37 # DW_FORM_strx1
+ .byte 58 # DW_AT_decl_file
+ .byte 11 # DW_FORM_data1
+ .byte 59 # DW_AT_decl_line
+ .byte 11 # DW_FORM_data1
+ .byte 73 # DW_AT_type
+ .byte 19 # DW_FORM_ref4
+ .byte 0 # EOM(1)
+ .byte 0 # EOM(2)
+ .byte 4 # Abbreviation Code
+ .byte 11 # DW_TAG_lexical_block
+ .byte 1 # DW_CHILDREN_yes
+ .byte 17 # DW_AT_low_pc
+ .byte 27 # DW_FORM_addrx
+ .byte 18 # DW_AT_high_pc
+ .byte 6 # DW_FORM_data4
+ .byte 0 # EOM(1)
+ .byte 0 # EOM(2)
+ .byte 5 # Abbreviation Code
+ .byte 36 # DW_TAG_base_type
+ .byte 0 # DW_CHILDREN_no
+ .byte 3 # DW_AT_name
+ .byte 37 # DW_FORM_strx1
+ .byte 62 # DW_AT_encoding
+ .byte 11 # DW_FORM_data1
+ .byte 11 # DW_AT_byte_size
+ .byte 11 # DW_FORM_data1
+ .byte 0 # EOM(1)
+ .byte 0 # EOM(2)
+ .byte 0 # EOM(3)
+ .section .debug_info,"", at progbits
+.Lcu_begin0:
+ .long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
+.Ldebug_info_start0:
+ .short 5 # DWARF version number
+ .byte 1 # DWARF Unit Type
+ .byte 4 # Address Size (in bytes)
+ .long .debug_abbrev # Offset Into Abbrev. Section
+ .byte 1 # Abbrev [1] 0xc:0x4d DW_TAG_compile_unit
+ .byte 0 # DW_AT_producer
+ .short 33 # DW_AT_language
+ .byte 1 # DW_AT_name
+ .long .Lstr_offsets_base0 # DW_AT_str_offsets_base
+ .long .Lline_table_start0 # DW_AT_stmt_list
+ .byte 2 # DW_AT_comp_dir
+ .byte 0 # DW_AT_low_pc
+ .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc
+ .long .Laddr_table_base0 # DW_AT_addr_base
+ .byte 2 # Abbrev [2] 0x23:0x2d DW_TAG_subprogram
+ .byte 0 # DW_AT_low_pc
+ .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc
+ .byte 1 # DW_AT_frame_base
+ .byte 85
+ .byte 3 # DW_AT_name
+ .byte 0 # DW_AT_decl_file
+ .byte 2 # DW_AT_decl_line
+ .long 80 # DW_AT_type
+ # DW_AT_external
+ .byte 3 # Abbrev [3] 0x32:0xb DW_TAG_variable
+ .byte 2 # DW_AT_location
+ .byte 145
+ .byte 120
+ .byte 5 # DW_AT_name
+ .byte 0 # DW_AT_decl_file
+ .byte 3 # DW_AT_decl_line
+ .long 84 # DW_AT_type
+ .byte 4 # Abbrev [4] 0x3d:0x12 DW_TAG_lexical_block
+ .byte 1 # DW_AT_low_pc
+ .long .Ltmp6-.Ltmp1 # DW_AT_high_pc
+ .byte 3 # Abbrev [3] 0x43:0xb DW_TAG_variable
+ .byte 2 # DW_AT_location
+ .byte 145
+ .byte 116
+ .byte 7 # DW_AT_name
+ .byte 0 # DW_AT_decl_file
+ .byte 4 # DW_AT_decl_line
+ .long 80 # DW_AT_type
+ .byte 0 # End Of Children Mark
+ .byte 0 # End Of Children Mark
+ .byte 5 # Abbrev [5] 0x50:0x4 DW_TAG_base_type
+ .byte 4 # DW_AT_name
+ .byte 5 # DW_AT_encoding
+ .byte 4 # DW_AT_byte_size
+ .byte 5 # Abbrev [5] 0x54:0x4 DW_TAG_base_type
+ .byte 6 # DW_AT_name
+ .byte 4 # DW_AT_encoding
+ .byte 4 # DW_AT_byte_size
+ .byte 0 # End Of Children Mark
+.Ldebug_info_end0:
+ .section .debug_str_offsets,"", at progbits
+ .long 36 # Length of String Offsets Set
+ .short 5
+ .short 0
+.Lstr_offsets_base0:
+ .section .debug_str,"MS", at progbits,1
+.Linfo_string0:
+ .asciz "clang version 22.0.0git (https://github.com/adam-yang/llvm-project.git a7fd15039d9846389b5e7fd7af1a63b1bfc70935)" # string offset=0
+.Linfo_string1:
+ .asciz "F:\\inbox\\compile\\compile.cpp" # string offset=113
+.Linfo_string2:
+ .asciz "F:\\llvm-project" # string offset=142
+.Linfo_string3:
+ .asciz "main" # string offset=158
+.Linfo_string4:
+ .asciz "int" # string offset=163
+.Linfo_string5:
+ .asciz "ret" # string offset=167
+.Linfo_string6:
+ .asciz "float" # string offset=171
+.Linfo_string7:
+ .asciz "i" # string offset=177
+ .section .debug_str_offsets,"", at progbits
+ .long .Linfo_string0
+ .long .Linfo_string1
+ .long .Linfo_string2
+ .long .Linfo_string3
+ .long .Linfo_string4
+ .long .Linfo_string5
+ .long .Linfo_string6
+ .long .Linfo_string7
+ .section .debug_addr,"", at progbits
+ .long .Ldebug_addr_end0-.Ldebug_addr_start0 # Length of contribution
+.Ldebug_addr_start0:
+ .short 5 # DWARF version number
+ .byte 4 # Address size
+ .byte 0 # Segment selector size
+.Laddr_table_base0:
+ .long .Lfunc_begin0
+ .long .Ltmp1
+.Ldebug_addr_end0:
+ .ident "clang version 22.0.0git (https://github.com/adam-yang/llvm-project.git a7fd15039d9846389b5e7fd7af1a63b1bfc70935)"
+ .section ".note.GNU-stack","", at progbits
+ .section .debug_line,"", at progbits
+.Lline_table_start0:
diff --git a/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/high_pc_exclusive.test b/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/high_pc_exclusive.test
deleted file mode 100644
index 2681d75ec4cd8..0000000000000
--- a/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/high_pc_exclusive.test
+++ /dev/null
@@ -1,28 +0,0 @@
-; Regression test for:
-; - Instructions at DW_AT_high_pc of a scope incorrectly included in the scope
-
-; clang test.cpp --target=i686-pc-linux -g -O0
-; 1
-; 2 int main(void) {
-; 3 float ret = 0;
-; 4 for (int i = 0; i < 10; i++) {
-; 5 ret += i;
-; 6 }
-; 7 return ret;
-; 8 }
-; 9
-
-; RUN: llvm-debuginfo-analyzer --attribute=all \
-; RUN: --print=all \
-; RUN: --output-sort=offset \
-; RUN: %p/Inputs/high_pc_exclusive.o 2>&1 | \
-; RUN: FileCheck %s
-
-; Make sure the line mapping at 0x122c does not show up at the scope level 004
-; CHECK-NOT: [0x000000122c][004] 7 {Line}
-
-; Make sure it *does* appear at scope level 003
-; CHECK: [0x000000122c][003] 7 {Line}
-
-
-
>From 909356eebd68fe6e400c5ed64bc91b1eab0e506a Mon Sep 17 00:00:00 2001
From: Adam Yang <hanbyang at microsoft.com>
Date: Fri, 22 Aug 2025 12:16:10 -0700
Subject: [PATCH 6/6] Deleted some unneeded metadata
---
.../DWARF/amdgpu-ranges.s | 203 ------------------
1 file changed, 203 deletions(-)
diff --git a/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/amdgpu-ranges.s b/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/amdgpu-ranges.s
index 1ece4e21d3bf6..fccc91be2a7fa 100644
--- a/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/amdgpu-ranges.s
+++ b/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/amdgpu-ranges.s
@@ -649,209 +649,6 @@ _amdgpu_cs_main:
.quad .Ltmp3
.Ldebug_addr_end0:
.section .debug_names,"", at progbits
- .long .Lnames_end0-.Lnames_start0
-.Lnames_start0:
- .short 5
- .short 0
- .long 1
- .long 0
- .long 0
- .long 7
- .long 7
- .long .Lnames_abbrev_end0-.Lnames_abbrev_start0
- .long 8
- .ascii "LLVM0700"
- .long .Lcu_begin0
- .long 0
- .long 1
- .long 0
- .long 2
- .long 5
- .long 0
- .long 7
- .long 259121563
- .long 193495088
- .long 2090499946
- .long -2056329416
- .long 276802040
- .long -696406599
- .long -1304652851
- .long .Linfo_string4
- .long .Linfo_string14
- .long .Linfo_string9
- .long .Linfo_string3
- .long .Linfo_string11
- .long .Linfo_string12
- .long .Linfo_string13
- .long .Lnames1-.Lnames_entries0
- .long .Lnames6-.Lnames_entries0
- .long .Lnames2-.Lnames_entries0
- .long .Lnames0-.Lnames_entries0
- .long .Lnames3-.Lnames_entries0
- .long .Lnames4-.Lnames_entries0
- .long .Lnames5-.Lnames_entries0
-.Lnames_abbrev_start0:
- .byte 1
- .byte 36
- .byte 3
- .byte 19
- .byte 4
- .byte 25
- .byte 0
- .byte 0
- .byte 2
- .byte 46
- .byte 3
- .byte 19
- .byte 4
- .byte 25
- .byte 0
- .byte 0
- .byte 3
- .byte 2
- .byte 3
- .byte 19
- .byte 4
- .byte 25
- .byte 0
- .byte 0
- .byte 4
- .byte 22
- .byte 3
- .byte 19
- .byte 4
- .byte 25
- .byte 0
- .byte 0
- .byte 0
-.Lnames_abbrev_end0:
-.Lnames_entries0:
-.Lnames1:
-.L0:
- .byte 1
- .long 64
- .byte 0
-.Lnames6:
-.L5:
- .byte 1
- .long 188
- .byte 0
-.Lnames2:
-.L3:
- .byte 2
- .long 77
- .byte 0
-.Lnames0:
-.L4:
- .byte 3
- .long 51
- .byte 0
-.Lnames3:
-.L1:
- .byte 4
- .long 133
- .byte 0
-.Lnames4:
-.L2:
- .byte 3
- .long 139
- .byte 0
-.Lnames5:
-.L6:
- .byte 1
- .long 184
- .byte 0
- .p2align 2, 0x0
-.Lnames_end0:
.section ".note.GNU-stack","", at progbits
- .amdgpu_pal_metadata
----
-amdpal.pipelines:
- - .api: DX12
- .compute_registers:
- .tg_size_en: true
- .tgid_x_en: true
- .tgid_y_en: true
- .tgid_z_en: true
- .tidig_comp_cnt: 0
- .hardware_stages:
- .cs:
- .checksum_value: 0xf6026295
- .debug_mode: false
- .entry_point: _amdgpu_cs_main
- .entry_point_symbol: _amdgpu_cs_main
- .excp_en: 0
- .float_mode: 0xc0
- .ieee_mode: false
- .image_op: false
- .lds_size: 0
- .mem_ordered: true
- .scratch_en: true
- .scratch_memory_size: 0x10
- .sgpr_count: 0xb
- .sgpr_limit: 0x6a
- .threadgroup_dimensions:
- - 0x40
- - 0x1
- - 0x1
- .trap_present: false
- .user_data_reg_map:
- - 0x10000000
- - 0x4
- - 0xffffffff
- - 0xffffffff
- - 0xffffffff
- - 0xffffffff
- - 0xffffffff
- - 0xffffffff
- - 0xffffffff
- - 0xffffffff
- - 0xffffffff
- - 0xffffffff
- - 0xffffffff
- - 0xffffffff
- - 0xffffffff
- - 0xffffffff
- - 0xffffffff
- - 0xffffffff
- - 0xffffffff
- - 0xffffffff
- - 0xffffffff
- - 0xffffffff
- - 0xffffffff
- - 0xffffffff
- - 0xffffffff
- - 0xffffffff
- - 0xffffffff
- - 0xffffffff
- - 0xffffffff
- - 0xffffffff
- - 0xffffffff
- - 0xffffffff
- .user_sgprs: 0x2
- .vgpr_count: 0x7
- .vgpr_limit: 0x100
- .wavefront_size: 0x40
- .wgp_mode: false
- .internal_pipeline_hash:
- - 0x54cfec268c68b7fa
- - 0xe957d7f6d25d46bd
- .registers: {}
- .resource_hash: 0x8541eac80fec18c9
- .shaders:
- .compute:
- .api_shader_hash:
- - 0x660de82aef6897d6
- - 0x78f09cf20797819b
- .hardware_mapping:
- - .cs
- .spill_threshold: 0xffff
- .type: Cs
- .user_data_limit: 0x5
-amdpal.version:
- - 0x3
- - 0
-...
- .end_amdgpu_pal_metadata
.section .debug_line,"", at progbits
.Lline_table_start0:
More information about the llvm-commits
mailing list