[cfe-dev] Debugging Clang with LLDB

Jonas Devlieghere via cfe-dev cfe-dev at lists.llvm.org
Mon Mar 25 16:24:40 PDT 2019



> On Mar 25, 2019, at 2:05 PM, Adrian Prantl <aprantl at apple.com> wrote:
> 
> 
> 
>> On Mar 25, 2019, at 1:13 PM, Jan Svoboda <jansvoboda11 at gmail.com> wrote:
>> 
>> The `argv.size()` expression doesn't crash with SIGSEGV when used directly in the Clang binary though, only when evaluated in LLDB.
>> I'm running x64 Linux (Ubuntu 18.04) and compiled the binary in debug mode using Clang, LLD, libc++ (all in version 8.0.0) installed from the official APT repository.
> 
> That sounds like an LLDB bug then. If you are interested you could report it on the LLVM bugzilla and include steps to reproduce and most importantly a full expression log (run "log enable lldb expr") before running your command.
> 
> +Jonas—are LLDB reproducers usable enough for this example already?

It might be a good test case, let's find out!  

If you don't mind giving this experimental feature a shot, you can pass --capture to the  lldb driver. After you see the error, type "reproducer generate" in the command and it will tell you the path where it generated the reproducer. The reproducer is a directory, which you'd have to compress yourself (at least for now). Keep in mind that it will include binaries and debug info, but since it's open source clang I assume that should be fine.

> 
> -- adrian




More information about the cfe-dev mailing list