Attempt to fix buildbot after r354972 NFCI.
@@ -37,8 +37,10 @@ bool __sanitizer_symbolize_code(const char *ModuleName, uint64_t ModuleOffset,
{
llvm::raw_string_ostream OS(Result);
llvm::symbolize::DIPrinter Printer(OS);
+ // TODO: it is neccessary to set proper SectionIndex here.
+ // object::SectionedAddress::UndefSection works for only absolute addresses.
auto ResOrErr =
- getDefaultSymbolizer()->symbolizeInlinedCode(ModuleName, ModuleOffset);
+ getDefaultSymbolizer()->symbolizeInlinedCode(ModuleName, {ModuleOffset, object::SectionedAddress::UndefSection});
Printer << (ResOrErr ? ResOrErr.get() : llvm::DIInliningInfo());
}
return __sanitizer::internal_snprintf(Buffer, MaxLength, "%s",
@@ -51,8 +53,10 @@ bool __sanitizer_symbolize_data(const char *ModuleName, uint64_t ModuleOffset,
{
llvm::raw_string_ostream OS(Result);
llvm::symbolize::DIPrinter Printer(OS);
+ // TODO: it is neccessary to set proper SectionIndex here.
+ // object::SectionedAddress::UndefSection works for only absolute addresses.
auto ResOrErr =
- getDefaultSymbolizer()->symbolizeData(ModuleName, ModuleOffset);
+ getDefaultSymbolizer()->symbolizeData(ModuleName, {ModuleOffset, object::SectionedAddress::UndefSection});
Printer << (ResOrErr ? ResOrErr.get() : llvm::DIGlobal());
}
return __sanitizer::internal_snprintf(Buffer, MaxLength, "%s",
