首页 > 编程知识 正文

Call Graph,调用图形过程call

时间:2023-05-03 20:57:03 阅读:181807 作者:2895

Ubuntu版: Ubuntu---- gnome---- 16.04---- desktop---- amd64,gnome版------gnome

要安装Callgraph Callgraph,请实际使用三种工具的组合。 一种是用于生成c函数调用树的cflow或calltree,以下主要对cflow进行说明。 一种处理通过graphviz改进的dot文本图形语言的工具。 用于将c函数调用树转换为dot格式的脚本。 tree2dotx以Ubuntu为例,安装各自。 sudo apt-getinstallcflowgraphviz然后安装tree2dotx和Callgraph。 此处默认安装在/usr/local/中$ wget-c https://github.com/tiny club/Linux-0.11-lab/raw/master/tools/trels tree2dotx $ wget-c 3359 call graph $ sudocptree2dotxcallgraph/usr/local /风中故事$ sudo chmod x /usr/local/风中故事/{ tree

2.2.1使用调用图call graph-f main-d./file.c-bfirefox指定对文件file.c中的main函数的分析,并使用Firefox显示图像。 也可以使用其他浏览器。 缺省情况下,生成的函数调用图保存为main.file_c.svg。

2.2其他用法1 )类似于main函数,但实际上也可以呈现其他函数。 例如callgraph -f test1 -d ./file.c -b firefox 2)指定函数所在的文件(或使用d选项指定函数搜索路径)3)不感兴趣的函数分支call graph-f main-dfile.c-fprintf-3 ) 指定e.c-fprintf-bfirefox c-f ' printf test3test2'-bfirefox4)函数调用的深度。 可以使用-D命令指定。 call graph-f main-dfile.c-D2-bfirefox

33558 www.Sina.com/# include stdio.hvoidtest1(; void test2(; void test3(; void test1 () printf ) ' Hello ); }void test2() {test3; }void test3() {}void main ) ) ) {test1); test2(; test3(; printf(Hello.(n ) ); }

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。