[llvm] [llvm-c] Expose debug object registration in Orc C-API bindings (PR #73257)

Stefan Gränitz via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 29 15:00:37 PST 2023


================
@@ -39,7 +39,7 @@ Error enableDebuggerSupport(LLJIT &J) {
     if (!Registrar)
       return Registrar.takeError();
     ObjLinkingLayer->addPlugin(std::make_unique<DebugObjectManagerPlugin>(
-        ES, std::move(*Registrar), true, true));
+        ES, std::move(*Registrar), false, true));
----------------
weliveindetail wrote:

This is the `RequireDebugSections` flag. Without this change the test won't pass, because the bitcode for the `sum()` example has no debug info.

This change may cause some overhead, but this shouldn't be a surprise in the context of debugging. And it may avoid headaches for users: Not remembering to generate debug info is a common problem for JITed code. With this change users get at least function names, like in release builds. Without it, the debugger has zero info.

Alternatively, we could expose it in the C-API and wire it up in the internal function here. See my second comment for details.

https://github.com/llvm/llvm-project/pull/73257


More information about the llvm-commits mailing list