<div dir="ltr"><div><font face="arial, sans-serif">[Resending this email after subscribing to the group. Got an error message the previous time around]</font></div><span style="font-family:arial,sans-serif;font-size:13px"><div>
<span style="font-family:arial,sans-serif;font-size:13px"><br></span></div>Hey guys,</span><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">In our project we have the following workflow:</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">- Given a user request, we construct a C++ program to service the request</div><div style="font-family:arial,sans-serif;font-size:13px">
- We create a compiler invocation to compile that program into an IR module</div><div style="font-family:arial,sans-serif;font-size:13px">- We use JIT (and optionally MCJIT) to convert the IR into executable code and run it</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">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 style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">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 style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">Will that work? Is there a simpler way?</div><div style="font-family:arial,sans-serif;font-size:13px">
<br></div><div style="font-family:arial,sans-serif;font-size:13px">Thanks,</div><div style="font-family:arial,sans-serif;font-size:13px">-- Priyendra</div></div>