Identify control statements in source code

Hermann Felbinger hermann19829 at gmail.com
Thu Aug 13 19:06:33 UTC 2015


Hi all!

I am working on a tool to analyze source code coverage for RTEMS.
Currently I am looking for a tool to annotate source code such that I can
extract information about statements and conditions that affect the control
flow of a program.
A similar tool exists for Ada programs. They call this information 'Source
Coverage Obligations'. Some information about SCOs can be found in [1].
I attached a program triangle.c which contains some if-statements. Each of
these statements contains two or more conditions. The second attached file
is the output of compiling triangle.c with
gcc -O1 -fdump-tree-cfg -o triangle triangle.c
This output is almost what I am looking for, but I think that there has to
be something better out there.

Does anybody of you know a tool which I can use to annotate source code?

Best,
Hermann

[1] http://docs.adacore.com/gnatcoverage-docs/html/cov_source.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20150813/22f6d7c4/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: triangle.c
Type: text/x-csrc
Size: 859 bytes
Desc: not available
URL: <http://lists.rtems.org/pipermail/devel/attachments/20150813/22f6d7c4/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: triangle.c.012t.cfg
Type: application/octet-stream
Size: 1606 bytes
Desc: not available
URL: <http://lists.rtems.org/pipermail/devel/attachments/20150813/22f6d7c4/attachment.obj>


More information about the devel mailing list