[LLVMdev] make lldb work
Malea, Daniel
daniel.malea at intel.com
Tue Jul 16 11:04:57 PDT 2013
Hi,
I notice you're running a 32-bit program; are you also on a 32-bit host, or do you have a 64-bit OS installed? We don't generally test on 32-bit hosts, so it's possible you found a new bug. In addition, there are some known bugs with debugging 32-bit programs (even on 64-bit hosts) which will we hopefully be resolving soon.
Nonetheless, I was unable to reproduce the behaviour you reported (with lldb-3.4 Ubuntu package version r186406). What's the output of "breakpoint list" -- does LLDB resolve any address for the breakpoint?
Here is my LLDB session on a 64-bit host debugging a 32-bit program:
daniel at lautrec:~$ lldb ./a.out
Current executable set to './a.out' (i386).
(lldb) breakpoint set -l 8
Breakpoint 1: where = a.out`main + 67 at bla.cpp:9, address = 0x080484f3
(lldb) breakpoint set -l 12
Breakpoint 2: no locations (pending).
WARNING: Unable to resolve breakpoint to any actual locations.
(lldb) breakpoint list
Current breakpoints:
1: file = '/home/daniel/bla.cpp', line = 8, locations = 1
1.1: where = a.out`main + 67 at bla.cpp:9, address = 0x080484f3, unresolved, hit count = 0
2: file = '/home/daniel/bla.cpp', line = 12, locations = 0 (pending)
(lldb) process launch
Process 22954 launched: './a.out' (i386)
Process 22954 stopped
* thread #1: tid = 0x59aa, 0x080484f3 a.out`main(argc=1, argv=0xffa37624) + 67 at bla.cpp:9, name = 'a.out, stop reason = breakpoint 1.1
frame #0: 0x080484f3 a.out`main(argc=1, argv=0xffa37624) + 67 at bla.cpp:9
6 while ( counter < 10 )
7 counter++;
8
-> 9 printf("counter: %d\n", counter);
10
11 return 0;
12 }
(lldb)
From: 小刚 <maple.hl at gmail.com<mailto:maple.hl at gmail.com>>
Reply-To: "Maple.HL at gmail.com<mailto:Maple.HL at gmail.com>" <Maple.HL at gmail.com<mailto:Maple.HL at gmail.com>>
Date: Monday, 15 July, 2013 10:00 PM
To: LLVM List <llvmdev at cs.uiuc.edu<mailto:llvmdev at cs.uiuc.edu>>
Subject: [LLVMdev] make lldb work
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<http://llvm.org/apt>. It's svn186357.
——
美丽有两种:
一是深刻又动人的方程,
一是你泛着倦意淡淡的笑容。
More information about the llvm-dev
mailing list