<div dir="ltr">Hey guys,<div><br></div><div>In our project we have the following workflow:</div><div><br></div><div>- Given a user request, we construct a C++ program to service the request</div><div>- We create a compiler invocation to compile that program into an IR module</div>
<div>- We use JIT (and optionally MCJIT) to convert the IR into executable code and run it</div><div><br></div><div>Occasionally, we have a crash in the JIT code and we are looking to figure out best practices around debuggability. With the MCJIT option, we can debug in gdb so that is already a big step forward.</div>
<div><br></div><div>However, that does not work for a production crash. We want to capture the stack trace from the crash and write it to stderr. Our binary has a signal handler that does stack unwinding and symbolization upon crash. Based on my reading so far, we need to implement a JITEventListener which would keep track of the dynamically generated symbol addresses and use the resulting maps for symbolization.</div>
<div><br></div><div>Will that work? Is there a simpler way?</div><div><br></div><div>Thanks,</div><div>-- Priyendra</div><div><br></div><div><br></div><div><br></div></div>