Questions tagged [call-graph]

A Call-Graph is a visual representation of calls between functions/procedures/methods etc. Typically created from the entry point of the code through each of the calls.

A Call-Graph is a useful tool in researching problems in your code. By seeing a visual reference of the order calls are performed, it allows the individual to trace back to a piece of code quicker. This allows them to test data output in various points faster by reducing the number of files that will have to be opened and searched to track this data manually.

Questions with this tag would include:

  1. How to build a call-graph in a particular language.
  2. Understanding a particular call-graph. This should generally include a visual reference.

Additional information about call graphs can be found on Wikipedia under the entry Call_Graph

217 questions
17
votes
7 answers

How to print the next N executed lines automatically in GDB?

I have been trying to find a way for some time to automate the progress in GDB of tracing the control flow of a program. Even just a simple way of automating the n command so you can see in what order routines are called. I realise that you can…
sice
17
votes
8 answers

How to generate a Java call graph, Eclipse based solutions

I'd like to analyze and understand a certain Java app and I think a call graph would be very useful. How do I generate one? I'm using Eclipse.
Guy
  • 519
  • 1
  • 5
  • 10
15
votes
1 answer

How to use LLVM to generate a call graph?

I'm looking into generating a call-graph for the linux kernel that would include function pointers (see my previous question Static call graph generation for the Linux kernel for more information). I've been told LLVM should be suitable for this…
addalbx
  • 545
  • 1
  • 4
  • 9
15
votes
6 answers

Call graph generation from matlab src code

I am trying to create a function call graph for around 500 matlab src files. I am unable to find any tools which could help me do the same for multiple src files. Is anyone familiar with any tools or plugins? In case any such tools are not…
Vijay
  • 849
  • 1
  • 8
  • 10
14
votes
2 answers

Can clang generate a call graph for an Xcode project (in Objective-C?

I found this example that looks like it outputs what I want for C++. How can it be done for the Objective-C code in an Xcode project? I see mentions of Doxygen being able to create a call graph, but I can't find an example. (I want to get to know…
zekel
  • 9,227
  • 10
  • 65
  • 96
12
votes
1 answer

Create a call graph for a file with clang

Is there a way to create a call graph with clang that can reasonably fit on a page? i.e. given: #include using namespace std; int main() { int a; cin>>a; cout<
soandos
  • 4,978
  • 13
  • 62
  • 96
12
votes
5 answers

How can I make a static analysis call graph for Perl?

I am working on a moderately complex Perl program. As a part of its development, it has to go through modifications and testing. Due to certain environment constraints, running this program frequently is not an option that is easy to exercise. What…
Paul Nathan
  • 39,638
  • 28
  • 112
  • 212
11
votes
3 answers

How can I extract the call graph of a function from Python source files?

Do you know an integrated tool that will generate the call graph of a function from Python sources? I need one that is consistent and can run on Windows OS.
citn
  • 1,522
  • 3
  • 18
  • 29
10
votes
3 answers

how to make gcc spit out a mapping from flow graphs to source code line numbers

Can gcc spit out, given a C file, a list of the all function calls that occur, with filename and line number both for the call itself and for the function's declaration? I know gcc somehow retains this information with -g (debuggers rely on it) and…
reinierpost
  • 8,425
  • 1
  • 38
  • 70
9
votes
3 answers

Generating dynamic call graph of c/c++ programs on the run

If one were to visualize the running of a program, I suppose one would start by getting the call graphs of the program. But how would you get the call graph of c/c++ programs while on the run? edit: clarifications, I'm currently running things on…
kamziro
  • 7,882
  • 9
  • 55
  • 78
9
votes
2 answers

Tools to document/visualize call graph?

having recently joined a project with a vast amount of code to get to grips with, I would like to start documenting and visualizing some of the flows through the call graph to give me a better understanding of how everything fits together. This is…
Dave Griffiths
  • 1,962
  • 19
  • 22
9
votes
3 answers

Application to generate Java class hierarchy diagram

Looking for a tool that: Produces a visually pleasing (not garish), orthogonally structured graph hierarchy Outputs high-quality PNG images (300dpi+) Visually differentiates classes, abstract classes, interfaces, and enumerated types (preferably by…
Dave Jarvis
  • 30,436
  • 41
  • 178
  • 315
8
votes
1 answer

generate call hierarchy graph with ctags

Is there anyone who knows how to generate call hierarchy graph with ctags and cscope? I need to run the commands in the terminal and redirect the output to a file, rather than do it in vim.
Jason
  • 131
  • 1
  • 7
8
votes
2 answers

Determining if a method calls a method in another assembly containing a new statement and vice-versa

I want to write a rule that will fail if an object allocation is made within any method called by a method marked with a particular attribute. I've got this working so far, by iterating up all methods calling my method to check using…
George Duckett
  • 31,770
  • 9
  • 95
  • 162
8
votes
3 answers

Is there a free tool which can help visualize the logic of a stored procedure in SQL Server 2008 R2?

I would like to be able to plot a call graph of a stored procedure. I am not interested in every detail, and I am not concerned with dynamic SQL (although it would be cool to detect it and skip it maybe or mark it as such.) I would like the tool to…
Hamish Grubijan
  • 10,562
  • 23
  • 99
  • 147
1
2
3
14 15