有没有一种工具可以检测 C 代码中的递归函数调用? [英] is there a tool that will detect a recursive function call in C code?

查看:39
本文介绍了有没有一种工具可以检测 C 代码中的递归函数调用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在继承的代码库中搜索并消除递归函数调用.到目前为止,我找不到任何可以进行静态分析并找到这些函数的工具.

I need to search and eliminate recursive function calls in an inherited code base. Thus far I was unable to find any tool that will do a static analysis and find these functions.

推荐答案

你可能想试试 cflow:

cflow 实用程序应分析一组目标文件或汇编程序、C 语言、lex 或 yacc 源文件,并尝试构建一个图形,写入标准输出,绘制外部引用的图表.

The cflow utility shall analyze a collection of object files or assembler, C-language, lex, or yacc source files, and attempt to build a graph, written to standard output, charting the external references.

它应该打印一个调用图并标记递归函数.

It should print a callgraph and mark the recursive functions.

这篇关于有没有一种工具可以检测 C 代码中的递归函数调用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆