如何使用Eclipse CDT对C ++代码进行静态分析? [英] How to do static analysis for C++ code with Eclipse cdt?

查看:119
本文介绍了如何使用Eclipse CDT对C ++代码进行静态分析?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用CDT获得C ++程序的静态信息。无需构建项目,只需获取基本信息(名称空间,类,扩展关系,方法,调用,字段)并将其保存到数据库即可。有任何代码示例或开源插件吗?

I need to get the static information of C++ program with CDT. No need to build the project, just to get the basic information(namespace, class, extends relation, method, call, field) and save them to database. Is there any code examples or opensource plugin? thx!

我尝试了很多方法,但是它们不能很好地工作。有人说柯丹是一种选择,但它对我的环境不起作用...

I have tried a lot of methods but they do not work very well. someone says that codan is a choice, but it doesn't work on my environment...

PS:必须进行CDT。我使用Eclipse Indigo。

PS: CDT is necessary. I use Eclipse Indigo.

推荐答案

Eclipse CDT已经内置了用于扩展关系,方法调用的工具。它是类型层次结构视图调用层次结构视图。您必须为所有这些工具建立项目索引。

Eclipse CDT has already built-in tools for extends relation, method call. It is Type Hierarchy view and Call Hierarchy view. You have to build Index of your project for all this tools to work.

这篇关于如何使用Eclipse CDT对C ++代码进行静态分析?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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