<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Am 11.10.17 um 19:44 schrieb Yichao Yu via llvm-dev:<br>
<blockquote type="cite">So while I totally believe one can use
`JITEventListener::createGDBRegistrationListener()` to hook the
JIT with the the gdb registration function, it won't work without
writing code to explicitly do that </blockquote>
Implementing the GDB JIT Interface for an ORC-based JIT is pretty
straightforward. For 5.0 you need that tiny workaround, fixed on
trunk:<br>
<a class="moz-txt-link-freetext" href="https://github.com/weliveindetail/JitFromScratch/commit/d4b6778d8d462299674e103d8ecdec1140a45cfe">https://github.com/weliveindetail/JitFromScratch/commit/d4b6778d8d462299674e103d8ecdec1140a45cfe</a><br>
<br>
It will work out-of-the box on Linux, as the native object format is
ELF. It does not work with other object formats, because no one else
implements LoadedObjectInfo::<span class="pl-en">getObjectForDebug():</span><br>
<a class="moz-txt-link-freetext" href="https://github.com/llvm-mirror/llvm/blob/a5204d048729eef09b162dd12622c4afefb4978a/include/llvm/ExecutionEngine/RuntimeDyld.h#L79">https://github.com/llvm-mirror/llvm/blob/a5204d048729eef09b162dd12622c4afefb4978a/include/llvm/ExecutionEngine/RuntimeDyld.h#L79</a><br>
<br>
<div class="moz-cite-prefix">Am 07.10.17 um 23:12 schrieb Connor
Gray via llvm-dev:<br>
</div>
<blockquote type="cite"
cite="mid:4D16E0CF-4887-4FAC-85F5-46A1F62F4A62@connorgray.com">I’m
wondering if it’s possible to debug code JIT’ed with the newer ORC
JIT. The LLVM documentation has a page at <a
href="http://llvm.org/docs/DebuggingJITedCode.html" class="">llvm.org/docs/DebuggingJITedCode.html</a></blockquote>
So bascially: yes. I think you could use ELF on any OS (like Julia
does), but depending on your use-case you will need to workaround
other issues. If you have requirements that restrict you to your
OS's native object format, you need to implement <span
class="pl-en">getObjectForDebug(). I guess with COFF on Windows it
will be complicated, but possible with the newly added PDB
support. </span><span class="pl-en"><span class="pl-en">I'd be
surprised </span> about major issues for MachO on Mac.</span><br>
<br>
I heard that request from other parties, so at some point it's gonna
be worth a "common endeavor" :)<br>
<br>
Cheers<br>
Stefan<br>
<br>
<div class="moz-cite-prefix">Am 11.10.17 um 21:34 schrieb Yichao Yu
via llvm-dev:<br>
</div>
<blockquote type="cite"
cite="mid:CAMvDr+Ti449=s1UXJeXndjiPmz4J_U7cW3bzTC7Svwb=RR4RUg@mail.gmail.com">
<blockquote type="cite">
<pre wrap="">RTDyldObjectLinkingLayer has a NotifyObjectLoaded hook that you can use to
</pre>
<blockquote type="cite">
<pre wrap="">call NotifyObjectEmitted on your GDBRegistrationListener.
</pre>
</blockquote>
</blockquote>
<pre wrap="">
</pre>
<blockquote type="cite">
<pre wrap="">but not well documented anywhere yet. :/
</pre>
</blockquote>
<pre wrap="">
Right. That's exactly what we (julia) do although we don't use
`GDBRegistrationListener` directly. I just mean that this has to be
done manually (so no "builtin" support for some meaning of "builtin")
and it can't be accomplished just by reading the mcjit doc. :/
_______________________________________________
LLVM Developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>
<a class="moz-txt-link-freetext" href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
<a class="moz-txt-link-freetext" href="https://weliveindetail.github.io/blog/">https://weliveindetail.github.io/blog/</a>
<a class="moz-txt-link-freetext" href="https://cryptup.org/pub/stefan.graenitz@gmail.com">https://cryptup.org/pub/stefan.graenitz@gmail.com</a></pre>
</body>
</html>