Python example does not work with latest LLDBs

I’m testing example from (USING THE LLDB.PY MODULE IN PYTHON) on Ubuntu 16.04

For some reason it works only with LLDB 3.9, is it because LLDB 4.0/5.0 are not stable yet?

#5.0   -- Does not work
deb []( llvm-toolchain-xenial main
# 3.9  -- Works
deb []( llvm-toolchain-xenial-3.9 main
# 4.0  -- Does not work
deb []( llvm-toolchain-xenial-4.0 main

>clang-5.0 -g test.cpp

Creating a target for './a.out'
SBBreakpoint: id = 1, name = 'main', locations = 1
SBProcess: pid = 0, state = launching, threads = 0, executable = a.out


The example code is:

Yes Greg, this was my expectation that it should not return until stops on break-point. But I had to downgrade sequentially from 5.0 to 4.0 to 3.9 to make it work as expected.

Can I get some diagnostics? Any log files?

I would be probably best to just step through it and see why it is incorrectly returning. We know it is broken. We should also add a test for this so we don’t regress again.


Do you mean you were able to reproduce it? Because it is used to work on trunk month ago, but since then I’ve switched from ubuntu 14.04 to fresh 16.04 and it no longer works for me.

Works for me with top of tree:

% PYTHONPATH=/tmp/lldb/build/Debug/LLDB.framework/Resources/Python ; ./ )
Creating a target for ‘./a.out’
SBBreakpoint: id = 1, name = ‘main’, module = a.out, locations = 1
SBProcess: pid = 62855, state = stopped, threads = 1, executable = a.out
thread #1: tid = 0x558f56, 0x000000010226bf74 a.outmain(argc=1, argv=0x00007fff5d994ec8) at main.cpp:15, queue = '', stop reason = breakpoint 1.1 frame #0: 0x000000010226bf74 a.outmain(argc=1, argv=0x00007fff5d994ec8) at main.cpp:15
SBFunction: id = 0x0000004b, name = main, type = main
a.out[0x100000f60]: pushq %rbp
a.out[0x100000f61]: movq %rsp, %rbp
a.out[0x100000f64]: xorl %eax, %eax
a.out[0x100000f66]: movl $0x0, -0x4(%rbp)
a.out[0x100000f6d]: movl %edi, -0x8(%rbp)
a.out[0x100000f70]: movq %rsi, -0x10(%rbp)
a.out[0x100000f74]: popq %rbp
a.out[0x100000f75]: retq

this is on a Mac though. Might be something specific to linux.


I’ve noticed that apt created some invalid symlinks, but fixing them did not helped. I have a gut feeling that the problem is with prebuilt packages from , not with lldb sources .

But we need someone else with Ubuntu 16.04 to confirm.