@@ -832,10 +832,10 @@ dataExtractorFromSection(const NormalizedFile &normalizedFile,
832
832
833
833
// FIXME: Cribbed from llvm-dwp -- should share "lightweight CU DIE
834
834
// inspection" code if possible.
835
- static uint32_t getCUAbbrevOffset (llvm::DataExtractor abbrevData,
835
+ static uint64_t getCUAbbrevOffset (llvm::DataExtractor abbrevData,
836
836
uint64_t abbrCode) {
837
837
uint64_t curCode;
838
- uint32_t offset = 0 ;
838
+ uint64_t offset = 0 ;
839
839
while ((curCode = abbrevData.getULEB128 (&offset)) != abbrCode) {
840
840
// Tag
841
841
abbrevData.getULEB128 (&offset);
@@ -853,13 +853,13 @@ static uint32_t getCUAbbrevOffset(llvm::DataExtractor abbrevData,
853
853
static Expected<const char *>
854
854
getIndexedString (const NormalizedFile &normalizedFile,
855
855
llvm::dwarf::Form form, llvm::DataExtractor infoData,
856
- uint32_t &infoOffset, const Section &stringsSection) {
856
+ uint64_t &infoOffset, const Section &stringsSection) {
857
857
if (form == llvm::dwarf::DW_FORM_string)
858
858
return infoData.getCStr (&infoOffset);
859
859
if (form != llvm::dwarf::DW_FORM_strp)
860
860
return llvm::make_error<GenericError>(
861
861
" string field encoded without DW_FORM_strp" );
862
- uint32_t stringOffset = infoData.getU32 (&infoOffset);
862
+ uint64_t stringOffset = infoData.getU32 (&infoOffset);
863
863
llvm::DataExtractor stringsData =
864
864
dataExtractorFromSection (normalizedFile, stringsSection);
865
865
return stringsData.getCStr (&stringOffset);
@@ -875,7 +875,7 @@ readCompUnit(const NormalizedFile &normalizedFile,
875
875
StringRef path) {
876
876
// FIXME: Cribbed from llvm-dwp -- should share "lightweight CU DIE
877
877
// inspection" code if possible.
878
- uint32_t offset = 0 ;
878
+ uint64_t offset = 0 ;
879
879
llvm::dwarf::DwarfFormat Format = llvm::dwarf::DwarfFormat::DWARF32;
880
880
auto infoData = dataExtractorFromSection (normalizedFile, info);
881
881
uint32_t length = infoData.getU32 (&offset);
@@ -897,7 +897,7 @@ readCompUnit(const NormalizedFile &normalizedFile,
897
897
898
898
uint32_t abbrCode = infoData.getULEB128 (&offset);
899
899
auto abbrevData = dataExtractorFromSection (normalizedFile, abbrev);
900
- uint32_t abbrevOffset = getCUAbbrevOffset (abbrevData, abbrCode);
900
+ uint64_t abbrevOffset = getCUAbbrevOffset (abbrevData, abbrCode);
901
901
uint64_t tag = abbrevData.getULEB128 (&abbrevOffset);
902
902
if (tag != llvm::dwarf::DW_TAG_compile_unit)
903
903
return llvm::make_error<GenericError>(" top level DIE is not a compile unit" );
0 commit comments