|
|
INSTALLATION README ©Copyright 1999-2006 by Software Research, Inc. |
The following information is available in this README file:
The fully working examples are provided in Examples subdirectory:
Before starting, you will need to have installed Microsoft Visual Studio 6.0 or higher.
DEMO versions of TCAT C/C++ for Windows contains a temporary access license file located in TCAT C/C++'s Program directory. EVAL versions will require a license key to operate properly.
DEMO versions are restricted to writing at most 5 modules into the MDF
file. To request a FULL evaluation license key, please contact Software
Research by sending email to <licenses@soft.com>
NOTE: Please read details attached with each emailed license key.
The default installation directory for TCAT C/C++ is
C:\Program Files\Software Research\Coverage\TCAT-CPP
The path needs to be appended to your path in autoexec.bat and/or the
path environment variable.
TCAT C/C++ also needs the COMSPEC variable to be set in order to spawn
the compiler on the instrumented code. Please set up your environment's startup files
to an appropriate value:
TCAT C/C++ may create temporary files of the form _sbxxxx.tmp in your temp
directory. These can be removed after the current instrumentation is
done.
TCAT C/C++ supports Microsoft Visual C++ 6.0.
Please use the Scribble sample provided in the
...\Examples\Uninstrumented Examples\Scribble - VC 6.0
directory. The files in these directories are exactly the same as those
provided in the Visual C++ CD-ROM. So if you need to restore their contents,
you could copy the files from CD-ROM:
...\SAMPLES\VC98\MFC\TUTORIAL\SCRIBBLE\STEP7
The Runtime module of the instrumentor writes the coverage data
into a trace file. The library "runtmdll.lib" must be linked with
your instrumented application.
The number of coverage data to buffer before writing into the
trace file defaults to infinite, that is all data is buffered
before they are flushed into the trace file. This can be modified
from the TCAT Options configuration tool that you will install
in your Visual Studio Environment.
The Runtime module of the instrumentor (which writes the trace file)
is provided in three categories. The choice of which one to link with
your application depends upon the application's target and how it is
compiled. The small table below illustrates the combinations possible.
An already instrumented example to demonstrate the viewing parts ahead
can help you in getting a quicker headstart. This bypasses the compiler
instrumentation section.
The example is created using the scribble example from Visual C++ 6.0,
and the directory is located at
$SR Examples\Instrumented Example\Scribble - VC 6.0
where $SR is your TCAT C/C++ installation directory, for example,
C:\Program Files\Software Research\Coverage\TCAT-CPP
All Scribble files are instrumented by using WinIC9. Calltree and Digraph
are used to view the control structure associated with the source code.
The trace file ("trace.trc") is created after running the instrumented
code and the coverage report can be viewed by using Cover.
A step by step instruction is given below.
There are two methods to instrument Scribble by either using options from
the TCAT/C-C++ Integrated with Microsoft Visual C++ 6.0 window. Or applying
your own workspace within WinIC9 along with IC9 command lines.
1) Integrating TCAT C/C++ into Microsoft Visual C++...
If you cannot find the file, make sure the "Files of type:"
drop-down list reads "Add-ins (.dll)".
2) Opening the Scribble Example...
3) Creating a Coverage Project Configuration for Scribble...
4) Configuring TCAT C/C++...
5) Instrumenting the Scribble Example...
6) Executing the Instrumented Scribble
...\Examples\Instrumented Example\Scribble - VC 6.0\Coverage\tcat_db\Scribble\d_graph\
...\Examples\Instrumented Example\Scribble - VC 6.0\Coverage\tcat_db\Scribble\c_graph\
(3) Environment Settings
(4) Runtime Library
Application Targets links with Multi-threaded library Runtmdll.lib Multi-threaded DLL Runtmdll.dll (5) Getting Started
Preparing and Instrumenting Scribble
Using the TCAT C/C++ Integrated with Microsoft Visual C++ 6.0
From Tools pull-down menu select Customize.
On the Add-ins and Macro Files tab menu, click on the Browse button and select the
SRCov.dll file from your TCAT C/C++ installation directory
C:\Program Files\Software Research\Coverage\TCAT-CPP\Program
This will integrate TCAT C/C++ into Microsoft Visual C++ 6.0.
Select File | Open Workspace
Select the Scribble.dsw file from the
...\Examples\Uninstrumented Examples\Scribble - VC 6.0 directory.
From the Build pull-down menu, select Configurations.
Click the Add button.
Type in Coverage as a new Project Configuration name.
Click on OK and then on Close to accept the changes.
Select Project | Settings.
Select Win32 Coverage in the drop down box labeled Settings For:.
Make sure the Scribble Project Name is selected.
The Intermediate files: and the Output files: in the General tab
must contain the string Coverage.
At the C/C++ tab menu, select Category: Precompiled Headers from the drop down menu.
Select the Not using precompiled headers option.
Do the same for the stdafx.cpp file. Click on OK to accept the changes.
Click on the Configure TCAT Options button on the TCAT C/C++ Toolbar.
At the Instrumentor Options tab menu,
check C1 and S1.
At the Runtime Selection tab menu.
enter the path to Runtmdll.lib file located in the TCAT C/C++ Program directory,
if default choice differs.
Click on the Build The Instrumented App button.
Click on the Run The Instrumented App button.
Test-drive the instrumented Scribble app to create a TCAT C/C++ trace file,
trace. trc.
Viewing Coverage Reports
Click on the Run Coverage Report button to run the WinCover.
From the menu, select File > Open.
In the Open dialogue, click on the filename trace.trc from the Scribble's
\Coverage\tcat_db\Scribble\
directory, created during instrumentation.
The dialog box then asks for an archive file; ignore this request by clicking
the Cancel button, if no archives exist.
WinCover will display a coverage report generated while running the instrumented Scribble app.
Viewing the Source Code Associated With Coverage Reports
Viewing Directed Graphs
Click on the Run Digraph button.
Select File | Open.
You are prompted for the name of the directed graph file to view.
Find the Scribble.dg file under the d_graph directory, e.g.
A window listing the available functions is displayed.
Select one of the functions to view.
WinDigraph displays a directed graph depicting possible program flows of the function.
By clicking near the number associated with an edge
and clicking on the View Source button...
... you can call up and view the associated source code.
Viewing a Calltree
Click on the Run Callgraph button.
Select Open | File.
Select SCRIBBLE.cg under the c_graph directory, e.g.
A Select a Function ID window is displayed. Select a function to view from the list.
WinCalltree displays a calltree depicting the selected function.
Viewing the Directed Graph Associated With a Calltree Node
Select the Root node of the calltree.
Click on the View Digraph button on the toolbar.
A directed graph of the function appears.
Viewing the Source Code Associated With A Calltree
Click on the edge running from the root node to the left-most node.
Click on the Source Code button on the toolbar (It gives you a red arrow if
there is a source file.).
The code is displayed in a separate window with the
calling statement highlighted in red.
(6) Solutions to potential problems.
Command line warning D4002 : ignoring unknown option '-TCAT-B'
Go to your "Microsoft Visual Studio/VC98/Bin" directory, delete
"mscl.exe", and re-install TCAT C/C++.
The DEMO license limits instrumentation to a small number of
modules. Unless your sample test run covers that section of code,
you will not receive any coverage data.
Ensure the path to your TCAT/C-C++ Program directory is in your
Environment path.
Solution: TCAT C/C++ Ver. 3.2 and later assume that you are installing
on a system which has connections only for Visual C/C++ 6.0 (or later)
Developer's Studio environment. If you have any older versions of the
compiler(i.e. "cl.exe") you must make certain that your Studio and
project settings contain references to and select the path to TestWorks'
modified version of "cl.exe".(This file is copied into the directory
C:\Program Files\Microsoft Visual Studio\Vc98\Bin during installation.)
To setup the correct path for Visual C/C++ 6.0, please add the path
C:\Program Files\Software Research\Coverage\TCAT-CPP\Program to
Tools | Options | Directories | Executable Files.
If you are having any problems either setting up or working with this version of TCAT C/C++, Ver. 3.2, please report them to Software Research and every effort will be made to get them resolved and included in the next release.
A quick start document in PDF or postscript format is also available in the Help directory.
To view the PDF file, you need the Acrobat Reader which can be downloaded from:
http://www.adobe.com/prodindex/acrobat/readstep.html
If you do not have a postscript printer, you may get a postscript viewer called GhostScript (and GhostView) which may print to your printer, but at the very least would display the file on the screen. To obtain this, connect to:
http://www.cs.wisc.edu/~ghost/index.html
The complete manual is provided with the CD-ROM version in PDF format. You can view and print the document without a postscript printer.
We would also appreciate feedback on how we can improve the usability, the project and
workflow.
We welcome any other comments or insights from you.
Please contact Software Research by:
Incident Form
Phone: +1 (415) 861-2800 or +1 (800) 942-SOFT
FAX: +1 (415) 861-9801
Updated: December, 2006