]> granicus.if.org Git - llvm/commitdiff
Merging r355607:
authorTom Stellard <tstellar@redhat.com>
Fri, 3 May 2019 00:12:22 +0000 (00:12 +0000)
committerTom Stellard <tstellar@redhat.com>
Fri, 3 May 2019 00:12:22 +0000 (00:12 +0000)
------------------------------------------------------------------------
r355607 | petarj | 2019-03-07 08:31:08 -0800 (Thu, 07 Mar 2019) | 11 lines

[DebugInfo] Fix the type of the formated variable

Change the format type of *Personality and *LSDAAddress to PRIx64 since
they are of type uint64_t.
The problem was detected on mips builds, where it was printing junk values
and causing test failure.

Patch by Milos Stojanovic.

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

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_80@359851 91177308-0d34-0410-b5e6-96231b3b80d8

lib/DebugInfo/DWARF/DWARFDebugFrame.cpp
test/tools/llvm-objdump/eh_frame-coff.test

index ba55ffc28174f583db0c64b0b219b8f95124dc8e..8a88a2fa3a09a30a9eef1ead2b1e415283149148 100644 (file)
@@ -301,7 +301,7 @@ void CIE::dump(raw_ostream &OS, const MCRegisterInfo *MRI, bool IsEH) const {
   OS << format("  Data alignment factor: %d\n", (int32_t)DataAlignmentFactor);
   OS << format("  Return address column: %d\n", (int32_t)ReturnAddressRegister);
   if (Personality)
-    OS << format("  Personality Address: %08x\n", *Personality);
+    OS << format("  Personality Address: %016" PRIx64 "\n", *Personality);
   if (!AugmentationData.empty()) {
     OS << "  Augmentation data:    ";
     for (uint8_t Byte : AugmentationData)
@@ -320,7 +320,7 @@ void FDE::dump(raw_ostream &OS, const MCRegisterInfo *MRI, bool IsEH) const {
                (uint32_t)InitialLocation,
                (uint32_t)InitialLocation + (uint32_t)AddressRange);
   if (LSDAAddress)
-    OS << format("  LSDA Address: %08x\n", *LSDAAddress);
+    OS << format("  LSDA Address: %016" PRIx64 "\n", *LSDAAddress);
   CFIs.dump(OS, MRI, IsEH);
   OS << "\n";
 }
index 74eceeec4f31aed7bbcc1cbd1d8ba1a3ffff1842..cb481939dcc833b10b7a8b56295bb8200ea34c72 100644 (file)
@@ -8,7 +8,7 @@
 # CHECK:   Code alignment factor: 1
 # CHECK:   Data alignment factor: -4
 # CHECK:   Return address column: 8
-# CHECK:   Personality Address: 004025d7
+# CHECK:   Personality Address: 00000000004025d7
 # CHECK:   Augmentation data:     00 D7 25 40 00 00 00
 
 # CHECK:   DW_CFA_def_cfa: reg4 +4
@@ -17,7 +17,7 @@
 # CHECK:   DW_CFA_nop:
 
 # CHECK: 00000020 0000001c 00000024 FDE cie=00000024 pc=00401410...00401488
-# CHECK:   LSDA Address: 00406000
+# CHECK:   LSDA Address: 0000000000406000
 # CHECK:   DW_CFA_advance_loc: 1
 # CHECK:   DW_CFA_def_cfa_offset: +8
 # CHECK:   DW_CFA_offset: reg5 -8