Skip to content

Commit

Permalink
[examples] Call setProcessAllSections to ensure debug sections aren't…
Browse files Browse the repository at this point in the history
… 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.
  • Loading branch information
lhames committed May 1, 2020
1 parent b420a09 commit 30b2876
Showing 1 changed file with 6 additions and 0 deletions.
Expand Up @@ -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());
Expand Down

0 comments on commit 30b2876

Please sign in to comment.