[cfe-dev] [RFC] New ClangDebuggerSupport Library

Robinson, Paul via cfe-dev cfe-dev at lists.llvm.org
Wed Nov 9 20:59:43 PST 2016


>> To achieve your longer-term goal, LLDB would need to be completely
>> isolated from AST and have no "native" understanding of the format.
>> And yet, a library capable of evaluating a source-language expression 
>> would need to be able to call back into the debugger in order to read
>> and write process memory.  An interesting design challenge for sure.
												
> I’ve been talking with Lang Hames about ways to abstract the remote JIT
> APIs to support this end goal. Hopefully we won’t need the language
> support library to have any access to the remote process. That said, this
> is all just my pipe dream at the moment.

My impression (not having ever used it) is that the JIT basically is
premised on having complete functions executing in their own context,
rather than expressions or individual statements executing within an
existing call frame and likely to need to access variables optimized
into registers.  That's a hefty chunk of context LLDB would have to
produce at each stopping point, if it doesn't want to understand
anything about the source-language constructs you're expecting your
users to type in.  I'm going to stop rambling about it at this point,
because it's really straying from your original question (and I have
nothing further to contribute there), but it would be kind of fun to 
hack away at this during a social sometime.
--paulr
 


More information about the cfe-dev mailing list