Generate backtrace info for JITed code

My app generates LLVM IR on the fly, JITs, and executes. It also has a backtrace printer installed as a signal handler, that prints a human-readable backtrace if the app crashes.

Is there a succinct guide to exactly what I need to do to the LLVM IR I generate (or the calls I make to JIT) so that backtrace() and backtrace_symbols() (on Linux or OS X) can correctly print the call stack when a crash occurs while executing the JITed code?