Hacker News new | past | comments | ask | show | jobs | submit login

How usable is LLDB nowadays? I'm curious how easily it could be extended to support other LLVM-backed compilers.



I've been using it regularly and I think it's ready. I used it some time ago when even basic commands would fail with cryptic error messages, but over the last couple of months, the version that came with Xcode has improved a lot. I find that it can evaluate more C++ expressions that gdb can now and I think the command structure feels more regular. Heartily recommended.


gdb's C++ support leaves much to be desired, in my opinion.

Can you ask LLDB to never stop at certain functions or files? (like gdb's skip command except that unfortunately you cannot put that in your .gdbinit file). Very useful for skipping copy constructors, etc.

Can I use C++ syntax for overloaded operators? I.e., can I use A(1,1) for matrix object access instead of A.operator()(1,1) like gdb requires?

Can you wrap a class with some user defined script to simplify its interface for debugging? E.g., let the user browse and edit the elements of an STL vector without understanding the vector class implementation? (pretty-printing is implemented for gdb but Visual Studio does a much better job here!)


> Can you ask LLDB to never stop at certain functions or files?

LLDB has a setting named target.process.thread.step-avoid-regexp, the value of which is a regular expression defining functions that step-in won't stop in.

> Can you wrap a class with some user defined script to simplify its interface for debugging?

LLDB exposes its entire API to Python, so you can either embed Python scripts in to the LLDB debugger or embed the LLDB debugger in to a Python script. There's an introduction available at http://lldb.llvm.org/python-reference.html, but for more detailed documentation you'll need to use the help functionality within lldb's built-in Python prompt.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: