How to get function information in a generated call graph?

Hi All,

I use opt -dot-callgraph test.bc to generate a dot format call graph from the given bitcode file. I am just wondering if there is any implementation to get information for each function, which is a node in the .dot file, in a call graph? (e.g. which file the function is in, and the specific line number)

Thanks,
Chen

Hi,

I use opt -dot-callgraph test.bc to generate a dot format call graph from the
given bitcode file. I am just wondering if there is any implementation to get
information for each function, which is a node in the .dot file, in a call
graph? (e.g. which file the function is in, and the specific line number)

you need debug info to get this information: if you compile a file without debug
info then the LLVM IR will contain no information about files functions were
defined in, which lines etc.

Ciao, Duncan.