[lldb-dev] Would it make sense to use lldb as a build in debugger within a Common Lisp READ-EVAL-PRINT-LOOP?

Greg Clayton gclayton at apple.com
Thu May 23 16:07:38 PDT 2013


On May 22, 2013, at 10:18 PM, Christian Schafmeister <chris.schaf at verizon.net> wrote:

> 
> Hi,
> 
> I'm writing a Common Lisp compiler and it has a top level read-eval-print loop wherein the use can enter forms and have them compiled and run. 

LLDB does the same, but does it from out of process by using a JIT that can generate code and install it into the program it is debugging.
> 
> My compiler generates DWARF metadata and I'm wondering if it makes sense to incorporate lldb as the built in debugger.

It might depending on what you want it to do.

> I'm on OS X and I know that lldb runs as a separate process from the program that its debugging so I don't see how it would work.

LLDB currently will load the debug info for your program and allow you to JIT up code that can be run in the other process (we allocate memory, copy code and data into the inferior process, and then execute it on one of the threads, and then restore memory and registers. If you already have an interpreter built in, it might not make sense to try and place LLDB in your process.

Greg


> 
> Best,
> 
> .Chris.
> 
> 
> 
> _______________________________________________
> lldb-dev mailing list
> lldb-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev




More information about the lldb-dev mailing list