[LLVMdev] make lldb work

小刚 maple.hl at gmail.com
Mon Jul 15 19:00:00 PDT 2013


Sorry if asked before.

I'm new to LLDB, try to use it according to the lldb project site. I write
some very simple code like:

#include <stdio.h>

int main(int argc, char **argv)
{
    int counter = 0;
    while ( counter < 10 )
        counter++;

    printf("counter: %d\n", counter);

    return 0;
}

and the session like:

$ clang -g main.c
$ lldb-3.4 a.out
(lldb) breakpoint set -l 8
......
(lldb) breakpoint set -l 12
......
(lldb) breakpoint list
......
(lldb) process launch
Process 1105 launched: '/home/maple/debug/arena/a.out' (i386)
counter: 10
Process 1105 exited with status = 0 (0x00000000)

I checked with gdb, it works well. I'm not sure whether it's a bug or my
false command.

I'm using Ubuntu 12.04, and the lldb is from llvm.org/apt. It's svn186357.

——
美丽有两种:
一是深刻又动人的方程,
一是你泛着倦意淡淡的笑容。
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130716/097f13db/attachment.html>


More information about the llvm-dev mailing list