============================================================================= = TBCppA project: tracer-based CPP analyzer. = = Copyright (C) 2006, Katsuhiko Gondow (gondow(at)cs.titech.ac.jp). = ============================================================================= License: -------- 'TBCppA' is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Disclaimer: ----------- WARNING: this software is experimental, and not tested well. This software is distributed in the hope that it will be interesting and useful, but it has no warranty. Any use is at your own risk. We disclaim any liability of any kind of damages whatsoever resulting from the use of this software. Overview: --------- 'TBCppA' is a tracer-based CPP analyzer. Macro expansion is recorded in XML file and visualized. Platforms: --------- Currently, we compiled and tested TBCppA on the following platforms. Windows XP SP2, Cygwin 1.5.19, GCC 3.4.4, Bison 2.1, Flex 2.5.4, Libxml2 2.6.22, Graphviz 2.8 Linux 2.4.19, GCC 3.3.2, Bison 2.1, Flex 2.5.4, Libxml2 2.6.27, Graphviz 2.8 Mac OS X 10.3.9, GCC 3.3, Bison 2.3, Flex 2.5.4, Libxml2 2.6.27, Graphviz 2.8 Build and install: ----------------- Before build, please install GCC, Bison, Flex, Libxml2 and Graphviz. To build TBCppA, just type % make (We have no 'configure' file) Homepage for TBCppA ----------------- http://www.sde.cs.titech.ac.jp/~gondow/TBCppA/ Currently we have the following versions, which are not compatible with each other. - TBCppA-0.0.1.tgz - TBCppA-0.0.2.tgz - TBCppA-0.0.3.tgz Usage: ------ Prepare your execution path and environment variables. % setenv TBCPPA_BINDIR /where/TBCppA/is/placed % set path = ($TBCPPA_BINDR $path:q) To get the TBCppA output (foo.c.xml), (Before you execute this, please read TBCppA.csh carefully. You probably need to modify CPP_CMD and/or TBCPPA_CPPOPT.) % cp $TBCPPA_BINDIR/TBCppA.dtd . % TBCppA.csh foo.c To visualize the macro 'FOO' at the line number 'LINE' % tmacro.csh foo.c.xml FOO [LINE] To visualize the #if or #elif expression at the line number 'LINE' % tifexp.csh foo.c.xml LINE To visualize recovering preprocessed C code using the TBCppA XML file % trecov-demo.exe foo.c.E foo.c.xml TBCppA.csh consists of the following utilities: - tadd.exe : C code -> C code with tracers - tdbxml.exe : db_file -> db_file.xml - txml.exe : preprocessed C code with tracers -> TBCppA XML - tfix.exe : eliminating duplicated ID attributes - tstrip.xsl : eliminating unchanged macro calls - tmacro.xsl : TBCppA XML -> macro expansion diagram - tifexp.xsl : TBCppA XML -> #if/#elif evaluation diagram - src2html.exe : C code -> HTML - tifdef_src2html.exe: C code -> HTML coloring conditional excluded code gray - setup-headers.csh : batch for adding tracers to /usr/include/*.h - src2html-headers.csh: batch for creating HTMLs for /usr/incude/*.h - trecov-demo.exe: preprocessed C code + TBCppA XML -> original C code - end-of-file