[llvm] da91325 - [DebugInfo] Report the format of line tables [7/10]

Igor Kudrin via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 2 03:57:17 PDT 2020


Author: Igor Kudrin
Date: 2020-06-02T17:55:31+07:00
New Revision: da913259c7ff03d07ba52c49859c6b6669a0b386

URL: https://github.com/llvm/llvm-project/commit/da913259c7ff03d07ba52c49859c6b6669a0b386
DIFF: https://github.com/llvm/llvm-project/commit/da913259c7ff03d07ba52c49859c6b6669a0b386.diff

LOG: [DebugInfo] Report the format of line tables [7/10]

Differential Revision: https://reviews.llvm.org/D80523

Added: 
    

Modified: 
    llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp
    llvm/test/DebugInfo/RISCV/dwarf-riscv-relocs.ll
    llvm/test/DebugInfo/X86/dwarfdump-line-dwo.s
    llvm/test/tools/llvm-dwarfdump/X86/debug-line.s
    llvm/test/tools/llvm-dwarfdump/X86/debug_line_dwarf64_large_table.s
    llvm/test/tools/llvm-dwarfdump/X86/debug_line_invalid.test

Removed: 
    


################################################################################
diff  --git a/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp b/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp
index df5941615b5a..2c1c28407ac5 100644
--- a/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp
+++ b/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp
@@ -110,6 +110,7 @@ void DWARFDebugLine::Prologue::dump(raw_ostream &OS,
   OS << "Line table prologue:\n"
      << format("    total_length: 0x%0*" PRIx64 "\n", OffsetDumpWidth,
                TotalLength)
+     << "          format: " << dwarf::FormatString(FormParams.Format) << "\n"
      << format("         version: %u\n", getVersion());
   if (!versionIsSupported(getVersion()))
     return;

diff  --git a/llvm/test/DebugInfo/RISCV/dwarf-riscv-relocs.ll b/llvm/test/DebugInfo/RISCV/dwarf-riscv-relocs.ll
index e923810aa72f..22c5f850965f 100644
--- a/llvm/test/DebugInfo/RISCV/dwarf-riscv-relocs.ll
+++ b/llvm/test/DebugInfo/RISCV/dwarf-riscv-relocs.ll
@@ -37,6 +37,7 @@
 ; DWARF-DUMP-NEXT: debug_line[0x00000000]
 ; DWARF-DUMP-NEXT: Line table prologue:
 ; DWARF-DUMP-NEXT:     total_length: 0x0000005f
+; DWARF-DUMP-NEXT:           format: DWARF32
 ; DWARF-DUMP-NEXT:          version: 5
 ; DWARF-DUMP-NEXT:     address_size: 4
 ; DWARF-DUMP-NEXT:  seg_select_size: 0

diff  --git a/llvm/test/DebugInfo/X86/dwarfdump-line-dwo.s b/llvm/test/DebugInfo/X86/dwarfdump-line-dwo.s
index d5646bf87e1f..d82c861b8403 100644
--- a/llvm/test/DebugInfo/X86/dwarfdump-line-dwo.s
+++ b/llvm/test/DebugInfo/X86/dwarfdump-line-dwo.s
@@ -44,6 +44,7 @@ LH_1_end:
 
 # PART1:      Line table prologue:
 # PART1-NEXT: total_length: 0x0000002e
+# PART1-NEXT: format: DWARF32
 # PART1-NEXT: version: 4
 # PART1-NEXT: prologue_length: 0x00000028
 # PART1:      include_directories[  1] = "Directory1"
@@ -90,6 +91,7 @@ LH_2_end:
 
 # PART2:      Line table prologue:
 # PART2-NEXT: total_length: 0x00000028
+# PART2-NEXT: format: DWARF32
 # PART2-NEXT: version: 4
 # PART2-NEXT: prologue_length: 0x00000022
 # PART2-NOT:  prologue:

diff  --git a/llvm/test/tools/llvm-dwarfdump/X86/debug-line.s b/llvm/test/tools/llvm-dwarfdump/X86/debug-line.s
index 7793d1a0ad69..1a3504790bb5 100644
--- a/llvm/test/tools/llvm-dwarfdump/X86/debug-line.s
+++ b/llvm/test/tools/llvm-dwarfdump/X86/debug-line.s
@@ -8,6 +8,7 @@
 # CHECK-NEXT: debug_line[0x00000000]
 # CHECK-NEXT: Line table prologue:
 # CHECK-NEXT:     total_length: 0x00000069
+# CHECK-NEXT:           format: DWARF32
 # CHECK-NEXT:          version: 5
 # CHECK-NEXT:     address_size: 8
 # CHECK-NEXT:  seg_select_size: 0
@@ -47,6 +48,7 @@
 # CHECK-NEXT: debug_line[0x0000006d]
 # CHECK-NEXT: Line table prologue:
 # CHECK-NEXT:     total_length: 0x0000001b
+# CHECK-NEXT:           format: DWARF32
 # CHECK-NEXT:          version: 4
 # CHECK-NEXT:  prologue_length: 0x00000015
 # CHECK-NEXT:  min_inst_length: 2

diff  --git a/llvm/test/tools/llvm-dwarfdump/X86/debug_line_dwarf64_large_table.s b/llvm/test/tools/llvm-dwarfdump/X86/debug_line_dwarf64_large_table.s
index 7194010e3eb3..c7746e54b8b1 100644
--- a/llvm/test/tools/llvm-dwarfdump/X86/debug_line_dwarf64_large_table.s
+++ b/llvm/test/tools/llvm-dwarfdump/X86/debug_line_dwarf64_large_table.s
@@ -9,6 +9,7 @@
 # CHECK-NEXT: warning: line table program with offset 0x00000000 has length 0xfffffffc but only 0x0000003a bytes are available
 # CHECK-NEXT: Line table prologue:
 # CHECK-NEXT:     total_length: 0x00000000fffffff0
+# CHECK-NEXT:           format: DWARF64
 # CHECK-NEXT:          version: 4
 # CHECK-NEXT:  prologue_length: 0x0000000000000016
 

diff  --git a/llvm/test/tools/llvm-dwarfdump/X86/debug_line_invalid.test b/llvm/test/tools/llvm-dwarfdump/X86/debug_line_invalid.test
index 5c9f6edf014c..23ebdf1ad6f1 100644
--- a/llvm/test/tools/llvm-dwarfdump/X86/debug_line_invalid.test
+++ b/llvm/test/tools/llvm-dwarfdump/X86/debug_line_invalid.test
@@ -59,6 +59,7 @@
 # NONFATAL:      debug_line[0x00000048]
 # NONFATAL-NEXT: Line table prologue
 # NONFATAL-NEXT:    total_length: 0x00000002
+# NONFATAL-NEXT:          format: DWARF32
 # NONFATAL-NEXT:         version: 0
 # NONFATAL-NOT: prologue_length
 
@@ -66,6 +67,7 @@
 # NONFATAL:      debug_line[0x0000004e]
 # NONFATAL-NEXT: Line table prologue
 # NONFATAL-NEXT:    total_length: 0x00000002
+# NONFATAL-NEXT:          format: DWARF32
 # NONFATAL-NEXT:         version: 1
 # NONFATAL-NOT: prologue_length
 


        


More information about the llvm-commits mailing list