Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Exception analysis tool for C++ [closed]

I've been looking for a tool to extract exception information from a C++ program. The most wanted feature I'm looking for: I want to know all the exceptions that can be thrown from a function (which would include all the function that is called from that function recursively).

I've always thought that documenting errors and exceptions in particular is very hard (and takes a lot of effort to keep up to date). But if there is some way to automate that, it would be very helpful.

A tool for windows and Visual Studio would be preferred but not necessary, I could always work around that.

like image 690
Magnus Westin Avatar asked Aug 26 '08 14:08

Magnus Westin


People also ask

Which of the following is a type of C or C static code analysis tool?

Helix QAC is an excellent static analysis testing tool for C and C++ code from Perforce (formerly PRQA). The tool comes with a single installer and supports platforms like Windows 7, Linex Rhel 5 and Solaris 10.

What is commercial code quality tool for C C++ language?

CppDepend is a commercial static code analysis tool for C++.

What is exception handling C?

Exception handling is a mechanism that separates code that detects and handles exceptional circumstances from the rest of your program. Note that an exceptional circumstance is not necessarily an error. When a function detects an exceptional situation, you represent this with an object.

Can C throw exceptions?

C doesn't support exception handling. To throw an exception in C, you need to use something platform specific such as Win32's structured exception handling -- but to give any help with that, we'll need to know the platform you care about. ...and don't use Win32 structured exception handling.


2 Answers

PC-Lint claims to do static exception analysis of C++ code.
Coverity is another static C++ code analysis tool that apparently informs you of unhandled exceptions.
AQtime claims to have exception tracing as part of its code analysis. Plus, they advertise Visual Studio integration.
Here is a list of several static code analysis tools.

like image 102
postfuturist Avatar answered Sep 28 '22 10:09

postfuturist


DISCLAIMER: Working on this tool is my day job.

Its hard for me to write this without it looking like a sales pitch, so I apologise in advance.

As well as other analysis, QA C++ outputs the list of types that are thrown from the body of functions and the call tree. I believe that this would be all the information that you require.

like image 27
Richard Corden Avatar answered Sep 28 '22 11:09

Richard Corden