[LLVMdev] Does llvm-db work?

Yiping Fan fanyp at cs.ucla.edu
Tue Nov 15 18:05:59 PST 2005


Problem 1:
I tried llvm-db of LLVM 1.6, in the Linux environment. However, it always
prompts the following info for different tests:

======================================
:> llvm-db a.out.bc
llvm-db: The LLVM source-level debugger
Loading program... successfully loaded 'a.out.bc'!
(llvm-db) run
Starting program: a.out.bc
Error: Error waiting for the child process to stop. It exited with status 1
======================================

I am wondering if llvm-db in 1.6 still works?


Problem 2:
I use llvm-gcc -g to compile this C program, and got the followed LLVM code
(part). It seems that debug information for some statements are missing, i.e.,
we don't know where the coressponding "+" statement is in the source code,
from a "add" instruction in the LLVM code. Can anyone comment on this? Thank
you very much.

======================================
short test(short br_data_0,
short br_data_1,
short br_data_2,
short br_data_3,
short br_data_4,
short br_data_5,
short br_data_6,
short br_data_7) {

short sm07 = br_data_0 + br_data_7;
short sm16 = br_data_1 + br_data_6;
short sm25 = br_data_2 + br_data_5;
short sm34 = br_data_3 + br_data_4;
short s0734 = sm07 + sm34;
short s1625 = sm16 + sm25;

return s0734 + s1625;
}
======================================


======================================
short %test(short %br_data_0, short %br_data_1, short %br_data_2, short
%br_data_3, short %br_data_4, short %br_data_5, short %br_data_6, short
%br_data_7) {
entry:
%dbg.1 = tail call { }* %llvm.dbg.func.start( %lldb.global* %d.test ) ; <{
}*> [#uses=1]
%dbg.tmp.1 = tail call { }* %llvm.dbg.stoppoint( { }* %dbg.1, uint 10, uint
0, %lldb.compile_unit* %d.compile_unit ) ; <{ }*> [#uses=1]
%dbg.tmp.3 = tail call { }* %llvm.dbg.stoppoint( { }* %dbg.tmp.1, uint 17,
uint 0, %lldb.compile_unit* %d.compile_unit ) ; <{ }*> [#uses=1]
%tmp.6 = add short %br_data_1, %br_data_0 ; <short> [#uses=1]
%tmp.15 = add short %tmp.6, %br_data_2 ; <short> [#uses=1]
%tmp.18 = add short %tmp.15, %br_data_3 ; <short> [#uses=1]
%tmp.12 = add short %tmp.18, %br_data_4 ; <short> [#uses=1]
%tmp.21 = add short %tmp.12, %br_data_5 ; <short> [#uses=1]
%tmp.9 = add short %tmp.21, %br_data_6 ; <short> [#uses=1]
%tmp.24 = add short %tmp.9, %br_data_7 ; <short> [#uses=1]
%dbg.tmp.7 = tail call { }* %llvm.dbg.region.end( { }* %dbg.tmp.3 ) ; <{ }*>
[#uses=0]
ret short %tmp.24
}
======================================
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20051115/52e17cd9/attachment.html>


More information about the llvm-dev mailing list