tracecc(1) - Linux man page
Name
tracecc - Debugging (tracing) preprocessor for C, C++, Objective-C and Java.
Synopsis
tracecc [<options>] <inputfile> <outputfile> tracecc [<options>] <directory>
Description
Tracecc converts sources containing special tracing instructions (*.ctr, *.cpt, *.mtr, *.jtr) to C, C ++ , Objective-C and Java source files (*.c, *.cpp, *.m, *.java).
Depending on the options the output file will or will not contain instructions to write a trace (which source code positions does a program reach, values of variables).
Options
- -h
Show a help text.
- Long option: --help
- -v
Show the version number.
- Long option: --version
- -c
Configure the program (set the options in the command line as permanent options).
- Long option: --configure
- -C
Show the permanent options.
- Long option: --show-configuration
- -u
Unconfigure, remove the permanent options set by the user.
- Long option: --unconfigure
- -r
Reset the program, skip permanent options set by the user and defaults set by the administrator, use built-in defaults instead.
- This option must appear before any of the following options.
Long option: --reset
- -d
Turn writing of debug instructions on.
- Long option: --debug-enable=bool
- -d-
Turn writing of debug instructions off.
-s
Use standard output for debug instructions (only in combination with -d).
- Long option: --debug-stdout=bool
- -s-
Write debug information to a file instead of standard output.
-t
Add timestamp to debug information.
- Long option: --debug-timestamp=bool
- -t-
Do not add a timestamp to debug information.
- -i IDE
- Long option: --help
- Debug information is printed in the style of the specified IDE or compiler (''none'', ''gcc'' for Gnu C compiler, ''msvc'' for
MS Visual Studio C compiler, ''workshop'' for Sun Workshop C compiler or ''tasm'' for Turbo Assembler).
Long option: --debug-ide= IDE
- -l
Write ''#line ...'' information to C/C ++ /Objective-C output files.
- Long option: --linenumbers=bool
- -l-
Do not write ''#line ...'' information.
-m
Enable make mode. When running on a directory in make mode the program checks for each input file whether the output file exists and is up to date. A conversion is only started if the output file does not exist or is not up to date.
- Long option: --make=bool
- -m-
Disables makde mode.
-p
Allows C ++ style comments. By default the program converts all C ++ style comments ''//'' to C style comments ''/* ... */''.
- Long option: --cpp-comments=bool
- -p-
Do not allow C ++ style comments.
- -b width
- Long option: --linenumbers=bool
- Sets the box width for comment boxes.
Long option: --boxwidth=width
Return Value
The program returns an exit status 0 on success, all other values indicate errors.
Special Instructions For Tracecc
The special instructions for tracecc in the source code are identified by ''$'', this character is not used by C or Java.
- $(trace-init outpufile)
- Starts debugging and specifies the output file name. The suggested place for this instruction is the beginning of the main() function.
- $(trace-end)
- Ends debugging. The suggested place for this instruction is the end of the main() function.
- $? "format", ...
- Specifies a text to print as debug information when the program reaches this position.
When entering a function you should use something like
$? "+ myfunction ..."
Before leaving a function (immediately before the return statement) use$? "- myfunction %d", result
Note: you must change ''%d'' to something matching the function result type. - Comment box
-
$* This is a comment box content $*
will be converted to/* ******************************************************* */ /* * This is a comment * */ /* ******************************************************* */
Author
Dirk Krause
Copyright And License
Copyright © 2010, Dirk Krause All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the Dirk Krause nor the names of contributors may be used to endorse or promote products derived from this software without specific prior written permission.THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT LIMITED TO , THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED TO , PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES ; LOSS OF USE , DATA , OR PROFITS ; OR BUSINESS INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING NEGLIGENCE OR OTHERWISE ) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE , EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE .
See Also
trana(1), http://dktools.sourceforge.net/tracecc.html