summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorge Rimar <grimar@accesssoftek.com>2018-10-22 12:18:30 +0000
committerGeorge Rimar <grimar@accesssoftek.com>2018-10-22 12:18:30 +0000
commit209232091cdcb6b8e8e61d91170c32166b2ec2c1 (patch)
tree700c4574230c3f15026c639c9337e4b1d814bf5c
parent4c7dd9cf0ad5d4de0281205c3e1017d21dbb6ba1 (diff)
downloadbcm5719-llvm-209232091cdcb6b8e8e61d91170c32166b2ec2c1.tar.gz
bcm5719-llvm-209232091cdcb6b8e8e61d91170c32166b2ec2c1.zip
[llvm-dwarfdump] - Fix win10 build bot failture.
Bot failed: http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/20877/steps/test/logs/stdio This was broken after the r344895 "[llvm-dwarfdump] - Add the support of parsing .debug_loclists." because of wrong formatting specifiers used. llvm-svn: 344896
-rw-r--r--llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp9
-rw-r--r--llvm/test/DebugInfo/X86/dwarfdump-debug-loclists.test12
2 files changed, 12 insertions, 9 deletions
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp b/llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp
index bfcf799d230..b4bdaaac0c2 100644
--- a/llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp
+++ b/llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp
@@ -227,13 +227,16 @@ void DWARFDebugLoclists::LocationList::dump(raw_ostream &OS, uint64_t BaseAddr,
case dwarf::DW_LLE_start_length:
OS << '\n';
OS.indent(Indent);
- OS << format("[0x%8.8x, 0x%8.8x): ", E.Value0, E.Value0 + E.Value1);
+ OS << format("[0x%*.*" PRIx64 ", 0x%*.*x): ", AddressSize * 2,
+ AddressSize * 2, E.Value0, AddressSize * 2, AddressSize * 2,
+ E.Value0 + E.Value1);
break;
case dwarf::DW_LLE_offset_pair:
OS << '\n';
OS.indent(Indent);
- OS << format("[0x%8.8x, 0x%8.8x): ", BaseAddr + E.Value0,
- BaseAddr + E.Value1);
+ OS << format("[0x%*.*" PRIx64 ", 0x%*.*x): ", AddressSize * 2,
+ AddressSize * 2, BaseAddr + E.Value0, AddressSize * 2,
+ AddressSize * 2, BaseAddr + E.Value1);
break;
case dwarf::DW_LLE_base_address:
BaseAddr = E.Value0;
diff --git a/llvm/test/DebugInfo/X86/dwarfdump-debug-loclists.test b/llvm/test/DebugInfo/X86/dwarfdump-debug-loclists.test
index de8cb15596a..e5f7fb0c1c1 100644
--- a/llvm/test/DebugInfo/X86/dwarfdump-debug-loclists.test
+++ b/llvm/test/DebugInfo/X86/dwarfdump-debug-loclists.test
@@ -4,16 +4,16 @@
# CHECK: .debug_info
# CHECK: DW_AT_name{{.*}}"stub"
# CHECK: DW_AT_location [DW_FORM_sec_offset] (0x0000000c
-# CHECK-NEXT: [0x00000010, 0x00000020): DW_OP_breg5 RDI+0
-# CHECK-NEXT: [0x00000530, 0x00000540): DW_OP_breg6 RBP-8, DW_OP_deref
-# CHECK-NEXT: [0x00000700, 0x00000710): DW_OP_breg5 RDI+0
+# CHECK-NEXT: [0x0000000000000010, 0x0000000000000020): DW_OP_breg5 RDI+0
+# CHECK-NEXT: [0x0000000000000530, 0x0000000000000540): DW_OP_breg6 RBP-8, DW_OP_deref
+# CHECK-NEXT: [0x0000000000000700, 0x0000000000000710): DW_OP_breg5 RDI+0
# CHECK: .debug_loclists contents:
# CHECK-NEXT: 0x00000000: locations list header: length = 0x00000031, version = 0x0005, addr_size = 0x08, seg_size = 0x00, offset_entry_count = 0x00000000
# CHECK-NEXT: 0x00000000:
-# CHECK-NEXT: [0x00000000, 0x00000010): DW_OP_breg5 RDI+0
-# CHECK-NEXT: [0x00000530, 0x00000540): DW_OP_breg6 RBP-8, DW_OP_deref
-# CHECK-NEXT: [0x00000700, 0x00000710): DW_OP_breg5 RDI+0
+# CHECK-NEXT: [0x0000000000000000, 0x0000000000000010): DW_OP_breg5 RDI+0
+# CHECK-NEXT: [0x0000000000000530, 0x0000000000000540): DW_OP_breg6 RBP-8, DW_OP_deref
+# CHECK-NEXT: [0x0000000000000700, 0x0000000000000710): DW_OP_breg5 RDI+0
.section .debug_str,"MS",@progbits,1
.asciz "stub"
OpenPOWER on IntegriCloud