当前位置:网站首页>Use GCC to generate an abstract syntax tree "ast" and dump it to Dot file and visualization
Use GCC to generate an abstract syntax tree "ast" and dump it to Dot file and visualization
2022-06-27 14:21:00 【Wine like Longjing】
reference :https://stackoverflow.com/questions/49876942/how-to-use-graph-option-on-gccs-fdump-tree
Can pass -fdump- Command to get this information .
Example :
// main.c
int sum(int a, int b) {
return a + b;
}
int main(void) {
if (sum(8, 10) < 20) {
return -1;
}
return 1;
}
about gcc 7.3.0:
gcc -fdump-tree-all-graph main.c -o main
After that, you will get a lot .dot file 
Use GraphViz You can retrieve a nice print map for each function :
dot -Tpng main.c.012t.cfg.dot -o main.png

GCC Developer options :https://gcc.gnu.org/onlinedocs/gcc/Developer-Options.html
边栏推荐
- SFINAE
- [安洵杯 2019]Attack
- 线程同步之信号量
- [advanced MySQL] MTS master-slave synchronization principle and Practice Guide (7)
- 522. 最长特殊序列 II / 剑指 Offer II 101. 分割等和子集
- Implementing springboard agent through SSH port forwarding configuration
- 基于 xml 配置文件的入门级 SSM 框架整合
- How to solve the problem of missing language bar in win10 system
- [xman2018 qualifying] pass
- Domestic database disorder
猜你喜欢
![[PHP code injection] common injectable functions of PHP language and utilization examples of PHP code injection vulnerabilities](/img/19/9827a5e8becfc9d5bf2f51bddf803e.png)
[PHP code injection] common injectable functions of PHP language and utilization examples of PHP code injection vulnerabilities

At a time of oversupply of chips, China, the largest importer, continued to reduce imports, and the United States panicked

Openssf security plan: SBOM will drive software supply chain security

【业务安全-02】业务数据安全测试及商品订购数量篡改实例

基于Vue+Node+MySQL的美食菜谱食材网站设计与实现

国产数据库乱象

【PHP代码注入】PHP语言常见可注入函数以及PHP代码注入漏洞的利用实例

How to solve the problem of missing language bar in win10 system
![[business security-04] universal user name and universal password experiment](/img/09/73d8356d00cefb6d1af086669f69ff.png)
[business security-04] universal user name and universal password experiment

【OS命令注入】常见OS命令执行函数以及OS命令注入利用实例以及靶场实验—基于DVWA靶场
随机推荐
Summary of basic usage of command line editor sed
简析国内外电商的区别
Interpretation of new version features of PostgreSQL 15 (including live Q & A and PPT data summary)
SFINAE
Axi bus
[WUSTCTF2020]girlfriend
跨境电商多商户系统怎么选
图书管理系统
【每日3题(3)】盒子中小球的最大数量
PostgreSQL 15新版本特性解读(含直播问答、PPT资料汇总)
Acwing game 57
my.ini文件配置
522. longest special sequence II / Sword finger offer II 101 Split equal sum subset
初识云原生安全:云时代的最佳保障
【业务安全-02】业务数据安全测试及商品订购数量篡改实例
Too many requests at once, and the database is in danger
Resolve activity startup - lifecycle Perspective
[OS command injection] common OS command execution functions and OS command injection utilization examples and range experiments - based on DVWA range
基于SSM的Web网页聊天室系统
[business security-04] universal user name and universal password experiment