Help regarding Flow of function calls in llvm


Is there a way to know flow of function calls when i run a .bc file with opt.


Hi Ambika, try this:

   opt -print-callgraph file.bc



No, this is not what I am looking for. I am looking for something like may be a debugger so that I can trace the function calls in source of llvm.
llvm-db dosent work it says "debugger not implemented" when i try to use it. Can I use gdb or something like that with llvm.

What I basically want is to know that when I run some Alias Analysis then from where the functions of file BasicAliasAnalysis.cpp are called, in which order and which functions does it call while executing, ie the flow of calls in source of llvm.

Is it possible to do this.

Duncan Sands wrote:

llvm itself is a plain C++ program, so you can use gdb on it. gdb
doesn't know how to step through compiled IR, yet.

You will have to configure llvm with either --disable-optimized or