[JITLink][MachO] Add more detail to error message.
authorLang Hames <lhames@gmail.com>
Wed, 25 Aug 2021 03:31:06 +0000 (13:31 +1000)
committerLang Hames <lhames@gmail.com>
Wed, 25 Aug 2021 03:31:52 +0000 (13:31 +1000)
llvm/lib/ExecutionEngine/JITLink/MachOLinkGraphBuilder.cpp

index 03a8b98..34bda09 100644 (file)
@@ -299,8 +299,9 @@ Error MachOLinkGraphBuilder::createNormalizedSymbols() {
         return NSec.takeError();
 
       if (Value < NSec->Address || Value > NSec->Address + NSec->Size)
-        return make_error<JITLinkError>("Symbol address does not fall within "
-                                        "section");
+        return make_error<JITLinkError>("Address " + formatv("{0:x}", Value) +
+                                        " for symbol " + *Name +
+                                        " does not fall within section");
 
       if (!NSec->GraphSection) {
         LLVM_DEBUG({