Skip to content

Commit 95817d3

Browse files
[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 llvm-svn: 355607
1 parent 9404955 commit 95817d3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

llvm/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ void CIE::dump(raw_ostream &OS, const MCRegisterInfo *MRI, bool IsEH) const {
300300
OS << format(" Data alignment factor: %d\n", (int32_t)DataAlignmentFactor);
301301
OS << format(" Return address column: %d\n", (int32_t)ReturnAddressRegister);
302302
if (Personality)
303-
OS << format(" Personality Address: %08x\n", *Personality);
303+
OS << format(" Personality Address: %016" PRIx64 "\n", *Personality);
304304
if (!AugmentationData.empty()) {
305305
OS << " Augmentation data: ";
306306
for (uint8_t Byte : AugmentationData)
@@ -319,7 +319,7 @@ void FDE::dump(raw_ostream &OS, const MCRegisterInfo *MRI, bool IsEH) const {
319319
(uint32_t)InitialLocation,
320320
(uint32_t)InitialLocation + (uint32_t)AddressRange);
321321
if (LSDAAddress)
322-
OS << format(" LSDA Address: %08x\n", *LSDAAddress);
322+
OS << format(" LSDA Address: %016" PRIx64 "\n", *LSDAAddress);
323323
CFIs.dump(OS, MRI, IsEH);
324324
OS << "\n";
325325
}

llvm/test/tools/llvm-objdump/eh_frame-coff.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# CHECK: Code alignment factor: 1
99
# CHECK: Data alignment factor: -4
1010
# CHECK: Return address column: 8
11-
# CHECK: Personality Address: 004025d7
11+
# CHECK: Personality Address: 00000000004025d7
1212
# CHECK: Augmentation data: 00 D7 25 40 00 00 00
1313

1414
# CHECK: DW_CFA_def_cfa: reg4 +4
@@ -17,7 +17,7 @@
1717
# CHECK: DW_CFA_nop:
1818

1919
# CHECK: 00000020 0000001c 00000024 FDE cie=00000024 pc=00401410...00401488
20-
# CHECK: LSDA Address: 00406000
20+
# CHECK: LSDA Address: 0000000000406000
2121
# CHECK: DW_CFA_advance_loc: 1
2222
# CHECK: DW_CFA_def_cfa_offset: +8
2323
# CHECK: DW_CFA_offset: reg5 -8

0 commit comments

Comments
 (0)