[llvm] 30b2876 - [examples] Call setProcessAllSections to ensure debug sections aren't droppped.

Lang Hames via llvm-commits llvm-commits at lists.llvm.org
Fri May 1 11:07:36 PDT 2020


Author: Lang Hames
Date: 2020-05-01T11:06:41-07:00
New Revision: 30b28766d62dc2800e2e203017b2f9625eb9df0b

URL: https://github.com/llvm/llvm-project/commit/30b28766d62dc2800e2e203017b2f9625eb9df0b
DIFF: https://github.com/llvm/llvm-project/commit/30b28766d62dc2800e2e203017b2f9625eb9df0b.diff

LOG: [examples] Call setProcessAllSections to ensure debug sections aren't droppped.

Calling setProcessAllSections(true) is required to make sure that all sections,
even those not marked as necessary for execution, are passed to the memory
manager.

Added: 
    

Modified: 
    llvm/examples/OrcV2Examples/LLJITWithGDBRegistrationListener/LLJITWithGDBRegistrationListener.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/examples/OrcV2Examples/LLJITWithGDBRegistrationListener/LLJITWithGDBRegistrationListener.cpp b/llvm/examples/OrcV2Examples/LLJITWithGDBRegistrationListener/LLJITWithGDBRegistrationListener.cpp
index 5cf7cd00ffc5..493d1214c602 100644
--- a/llvm/examples/OrcV2Examples/LLJITWithGDBRegistrationListener/LLJITWithGDBRegistrationListener.cpp
+++ b/llvm/examples/OrcV2Examples/LLJITWithGDBRegistrationListener/LLJITWithGDBRegistrationListener.cpp
@@ -69,8 +69,14 @@ int main(int argc, char *argv[]) {
                       auto ObjLinkingLayer =
                           std::make_unique<RTDyldObjectLinkingLayer>(
                               ES, std::move(GetMemMgr));
+
+                      // Register the event listener.
                       ObjLinkingLayer->registerJITEventListener(
                           *JITEventListener::createGDBRegistrationListener());
+
+                      // Make sure the debug info sections aren't stripped.
+                      ObjLinkingLayer->setProcessAllSections(true);
+
                       return ObjLinkingLayer;
                     })
                     .create());


        


More information about the llvm-commits mailing list