Skip to content
This repository was archived by the owner on Mar 28, 2020. It is now read-only.

Commit f79e8f9

Browse files
committed
[DWARF] Use 32-bit format specifier for offset
This should fix PR42730. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@366859 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 48313e1 commit f79e8f9

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

lib/DebugInfo/DWARF/DWARFDebugLine.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ parseV5EntryFormat(const DWARFDataExtractor &DebugLineData, uint32_t *OffsetPtr,
201201
return createStringError(
202202
errc::invalid_argument,
203203
"failed to parse entry content descriptions at offset "
204-
"0x%8.8" PRIx64
204+
"0x%8.8" PRIx32
205205
" because offset extends beyond the prologue end at offset "
206206
"0x%8.8" PRIx64,
207207
*OffsetPtr, EndPrologueOffset);
@@ -244,7 +244,7 @@ parseV5DirFileTables(const DWARFDataExtractor &DebugLineData,
244244
return createStringError(
245245
errc::invalid_argument,
246246
"failed to parse directory entry at offset "
247-
"0x%8.8" PRIx64
247+
"0x%8.8" PRIx32
248248
" because offset extends beyond the prologue end at offset "
249249
"0x%8.8" PRIx64,
250250
*OffsetPtr, EndPrologueOffset);
@@ -280,7 +280,7 @@ parseV5DirFileTables(const DWARFDataExtractor &DebugLineData,
280280
return createStringError(
281281
errc::invalid_argument,
282282
"failed to parse file entry at offset "
283-
"0x%8.8" PRIx64
283+
"0x%8.8" PRIx32
284284
" because offset extends beyond the prologue end at offset "
285285
"0x%8.8" PRIx64,
286286
*OffsetPtr, EndPrologueOffset);
@@ -382,8 +382,8 @@ Error DWARFDebugLine::Prologue::parse(const DWARFDataExtractor &DebugLineData,
382382
errc::invalid_argument,
383383
"parsing line table prologue at 0x%8.8" PRIx64
384384
" found an invalid directory or file table description at"
385-
" 0x%8.8" PRIx64,
386-
PrologueOffset, (uint64_t)*OffsetPtr),
385+
" 0x%8.8" PRIx32,
386+
PrologueOffset, *OffsetPtr),
387387
std::move(e));
388388
}
389389
} else
@@ -394,8 +394,8 @@ Error DWARFDebugLine::Prologue::parse(const DWARFDataExtractor &DebugLineData,
394394
return createStringError(errc::invalid_argument,
395395
"parsing line table prologue at 0x%8.8" PRIx64
396396
" should have ended at 0x%8.8" PRIx64
397-
" but it ended at 0x%8.8" PRIx64,
398-
PrologueOffset, EndPrologueOffset, (uint64_t)*OffsetPtr);
397+
" but it ended at 0x%8.8" PRIx32,
398+
PrologueOffset, EndPrologueOffset, *OffsetPtr);
399399
return Error::success();
400400
}
401401

0 commit comments

Comments
 (0)