Attempt to fix buildbot after r354972 [#1]. NFCI.
authorAlexey Lapshin <a.v.lapshin@mail.ru>
Wed, 27 Feb 2019 18:36:46 +0000 (18:36 +0000)
committerAlexey Lapshin <a.v.lapshin@mail.ru>
Wed, 27 Feb 2019 18:36:46 +0000 (18:36 +0000)
llvm-svn: 355013

compiler-rt/lib/sanitizer_common/symbolizer/sanitizer_symbolize.cc
llvm/lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp

index 28f72b9..ede15f8 100644 (file)
@@ -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",
index 4e83606..2b89f9d 100644 (file)
@@ -147,7 +147,9 @@ void IntelJITEventListener::notifyObjectLoaded(
     // Build the function loaded notification message
     iJIT_Method_Load FunctionMessage =
       FunctionDescToIntelJITFormat(*Wrapper, Name->data(), Addr, Size);
-    DILineInfoTable Lines = Context->getLineInfoForAddressRange(Addr, Size);
+    // TODO: it is neccessary to set proper SectionIndex here.
+    // object::SectionedAddress::UndefSection works for only absolute addresses.
+    DILineInfoTable Lines = Context->getLineInfoForAddressRange({Addr, object::SectionedAddress::UndefSection}, Size);
     DILineInfoTable::iterator Begin = Lines.begin();
     DILineInfoTable::iterator End = Lines.end();
     for (DILineInfoTable::iterator It = Begin; It != End; ++It) {