[LLVMdev] how to debug with interpreter

Reid Kleckner reid.kleckner at gmail.com
Mon Mar 21 07:19:45 PDT 2011


On Mon, Mar 21, 2011 at 5:42 AM, Rob Nikander <rob.nikander at gmail.com> wrote:
> On Sun, Mar 20, 2011 at 11:56 AM, Reid Kleckner <reid.kleckner at gmail.com> wrote:
>
>> Alternatively, if you're on Linux, there's the gdb-jit interface,
>> which should give you symbols and unwind tables without any extra
>> effort on your part:
>> http://llvm.org/docs/DebuggingJITedCode.html
>
> This page says to run `lli -jit-emit-debug myfile.bc' under gdb.  Does
> the entire program need to be .bc files running through lli, or is
> there a way to pass that -jit-emit-debug flag to the C++ api, inside a
> normally compiled program?

I thought there was a mechanism for doing that, but I can't find it.
If you build LLVM in debug mode, it will be on by default.  Or
wherever you wrap LLVM's parsing of command line flags you can pass it
in.

Reid




More information about the llvm-dev mailing list