aboutsummaryrefslogtreecommitdiff
path: root/files/ja/mozilla/developer_guide/callgraph/index.html
blob: 8bc4e0c2bebc11db85941437162ae9126427db31 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
---
title: Callgraph
slug: Mozilla/Developer_guide/Callgraph
tags:
  - Callgraph
  - Developing Mozilla
  - NeedsTranslation
  - TopicStub
translation_of: Mozilla/Developer_guide/Callgraph
---
<p>The Callgraph project is intended to produce a complete callgraph covering C and C++ code within Mozilla. This can be used for performing static analysis based on the relationship between functions and methods. For instance, given the C++ code:</p>
<pre class="eval">int foo() {
  return good();
}

int good() {
  return evil() ? 0 : 1;
}
</pre>
<p>The callgraph would be <code>foo() -&gt; good() -&gt; evil()</code>. Given the knowledge that <code>evil()</code> does evil things, one could then determine <code>foo()</code> also does evil things.</p>
<p>The Callgraph project uses gcc and <a href="/en/Treehydra" title="en/Treehydra">Treehydra</a> to generate information about function and method calls at compile time, and aggregates it into a sqlite database.</p>
<h2 id="Documentation">Documentation</h2>
<dl> <dt><a href="/en/Developing_Mozilla/Callgraph/Installing_Callgraph" title="En/Callgraph/Installing_Callgraph">Installing Callgraph</a></dt> <dd>Download and installation of Callgraph</dd> <dt><a href="/en/Developing_Mozilla/Callgraph/Schema_Reference" title="En/Callgraph/Schema_Reference">Schema Reference</a></dt> <dd>Explanation of the database schema</dd> <dt><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=callgraph" class="link-https">Further details</a></dt> <dd>Implementation ideas for Callgraph</dd>
</dl>