diff --git a/llvm/examples/OrcV2Examples/LLJITWithGDBRegistrationListener/LLJITWithGDBRegistrationListener.cpp b/llvm/examples/OrcV2Examples/LLJITWithGDBRegistrationListener/LLJITWithGDBRegistrationListener.cpp index 5cf7cd00ffc533..493d1214c60259 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( 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());