How To Draw A Call Graph
Call Graphs
CScout tin create telephone call graphs that list how functions call each other. Go on in listen that the graphs merely indicate the calls detected by statically analyzing the plan source. Calls via function pointers will not appear in the call graph.
Two global options specify the format of the call graph and the content on each graph'south node. Through these options you can obtain graphs in
- plain text form: suitable for processing with other tools,
- HTML: suitable for browsing via CScout,
- dot: suitable for generating high-quality graphics files,
- SVG: suitable for graphical browsing, if your browser supports this format, and
- GIF: suitable for viewing on SVG-challenged browsers.
All diagrams follow the notation
calling function -> chosen office
Two links on the primary page (part and macro call graph, and non-static function call graph) can give yous the call graphs of the complete program. For any program larger than a few thousand lines, these graphs are only useful in their textual class. In their graphical course, even with node information disabled, they tin can only serve to requite you a rough idea of how the programme is structured. The following image depicts how the three different programs we analyzed in the bin instance relate to each other.
More than useful are the call graphs that can be generated for individual functions or files. These tin permit you to see what paths tin possibly lead to a given function (call graph of all callers), which functions can be reached starting from a given function, the function in context, and how functions in a given file relate to each other.
As an example, the following diagram depicts all paths leading to the setfile office.
Correspondingly, the functions that tin can exist reached starting from the copy_file function appears in the following diagram.
while the following shows the part setsymtab in context, depicting all the paths leading to it (callers) and leaving from information technology (called functions).
Finally, the post-obit is an example of how the functions in a unmarried file (parse.c) relate to each other.
Source: https://www.spinellis.gr/cscout/doc/cg.html
Posted by: cervantezarrierld.blogspot.com

0 Response to "How To Draw A Call Graph"
Post a Comment