[lldb-dev] strange behaviour at lldb cmd line

Shawn Best sbest at blueshiftinc.com
Thu Jun 19 10:29:54 PDT 2014


Hi All,

I would like to start contributing to lldb project and help improve it on
linux.  I am seeing some strange behaviour that makes lldb appear a little
flakey.  Some details of my system:

- Ubuntu 14.04, 64 bit running inside a VM on windows
- built from top of top of tree with gcc 4.8.2.  Issue happens either
configure/make or cmake/ninja
- stock lldb-3.4 version shipped with Ubuntu does not exhibit this behaviour

There are two intermittent issues:  1. When I run a program, I see messages
that do not belong (indicating the process was stopped)  2.  There appears
to be a race condition sending text to the console where (lldb) prompt will
come out of order making it appear there is no command prompt.

shawn at shawn-VirtualBox:~/Projects$ ./lldb.sh
(lldb) file a.out
Current executable set to 'a.out' (x86_64).
(lldb) br se -l 7
Breakpoint 1: where = a.out`main + 35 at hello2.cpp:7, address =
0x0000000000400553
(lldb) run
Process 2509 launching
Process 2509 launched: '/home/shawn/Projects/a.out' (x86_64)
Process 2509 stopped
* thread #1: tid = 2509, 0x00007f50bd2af2d0, name = 'a.out', stop reason =
trace
    frame #0: 0x00007f50bd2af2d0
-> 0x7f50bd2af2d0:  movq   %rsp, %rdi
   0x7f50bd2af2d3:  callq  0x7f50bd2b2a70
   0x7f50bd2af2d8:  movq   %rax, %r12
   0x7f50bd2af2db:  movl   0x221b17(%rip), %eax
Hello world!
Process 2509 stopped
* thread #1: tid = 2509, 0x0000000000400553 a.out`main + 35 at
hello2.cpp:7, name = 'a.out', stop reason = breakpoint 1.1
    frame #0: 0x0000000000400553 a.out`main + 35 at hello2.cpp:7
   4       {
   5           printf("Hello world!\n");
   6
-> 7           return 0;
   8       }
(lldb) cont
Process 2509 resuming
(lldb) Process 2509 exited with status = 0 (0x00000000)

My process was:

Build simple hello world program.  gcc -g hello.cpp
Run lldb:
file a.out
br se -l 7
run
cont

Notice all the unexpected stuff before it prints "Hello world!", also
notice the (lldb) prompt that shows up before the "Process 2509 exited"
message.

Any suggestions where I can look in the code and start tracking this down?

Thanks,
Shawn Best.
Blueshift Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20140619/f16ae53b/attachment.html>


More information about the lldb-dev mailing list