version 2.1 uploaded

2009-08-02
2013-04-02
  • I have uploaded covtool-2.1.zip.  This change fixes compile errors on later g++ compilers and should fix similar problems on windows.  However, it has not been tested on windows.

    The source code is not yet configured in CVS on the site.

    This change makes it compile and pass its tests using g++ version 4.2.4.

    The makefiles had to be changed and the cov++ wrapper script had to be chanted to account for new keywords in the g++ headers (__extension__).  I may make more changes to eliminate the necessify of using -D__extension__= on the command line in several places, but for the moment this is required.

    I also fixed bugs in the parser what were always there but which the newer C++ header files exacerbated.

    I'm still trying to re-learn how to run the web site.  I can't figure out to do some of the things I used do before the site revamped itself.   Hopefully, I can get back into supporting this project more effectively now.

     
  • abhishek gupta
    abhishek gupta
    2010-03-30

    hi
    I am unable to make at centOS4.6 32 bit. I am getting following error

    g++ -o covtool.o  -O2 -Wall -pedantic -I. -I/usr/include/g++ -fpermissive -c covtool.c
    g++ -o covstream.o  -O2 -Wall -pedantic -I. -I/usr/include/g++ -fpermissive -c covstream.c
    g++ -o bomb.o  -O2 -Wall -pedantic -I. -I/usr/include/g++ -fpermissive -c bomb.c
    g++ -o read_database.o  -O2 -Wall -pedantic -I. -I/usr/include/g++ -fpermissive-c read_database.c
    rm -f covlib.aar cvq covlib.a covstream.o bomb.o read_database.o
    a - covstream.o
    a - bomb.o
    a - read_database.o
    g++ -o covtool.exe covtool.o covlib.a
    g++ -o covtoolhelper.o  -O2 -Wall -pedantic -I. -I/usr/include/g++ -fpermissive
    -c covtoolhelper.c
    covtoolhelper.c:67: error: expected initializer before '<' token
    covtoolhelper.c:88: error: `Allocator' was not declared in this scope
    covtoolhelper.c:88: error: template argument 3 is invalid
    covtoolhelper.c:88: warning: ISO C++ forbids declaration of `line_ref_set' withno type
    covtoolhelper.c:95: error: `Allocator' was not declared in this scope
    covtoolhelper.c:95: error: template argument 4 is invalid
    covtoolhelper.c:95: warning: ISO C++ forbids declaration of `line_ref_table' with no type
    covtoolhelper.c:116: error: `Allocator' was not declared in this scope
    covtoolhelper.c:117: error: template argument 3 is invalid
    covtoolhelper.c:117: warning: ISO C++ forbids declaration of `base_file_info_t'with no type
    covtoolhelper.c: In member function `void __CvT__module_info____::construct()':
    covtoolhelper.c:214: error: `base_file_info_t' is not a class or namespace
    covtoolhelper.c:214: error: missing template arguments before "n"
    covtoolhelper.c:214: error: expected `;' before "n"
    covtoolhelper.c:216: error: `n' was not declared in this scope
    covtoolhelper.c:216: warning: unused variable 'n'
    covtoolhelper.c:257: error: `line_ref_table' is not a class or namespace
    covtoolhelper.c:257: error: missing template arguments before "location"
    covtoolhelper.c:257: error: expected `;' before "location"
    covtoolhelper.c:259: error: `location' was not declared in this scope
    covtoolhelper.c:259: error: request for member `end' in `*instrumented_lines', w
    hich is of non-class type `int'
    covtoolhelper.c:262: error: `line_ref_table' is not a class or namespace
    covtoolhelper.c:262: error: `data_type' was not declared in this scope
    covtoolhelper.c:262: error: expected `;' before "empty"
    covtoolhelper.c:264: error: `line_ref_table' is not a class or namespace
    covtoolhelper.c:264: error: `value_type' was not declared in this scope
    covtoolhelper.c:264: error: expected `;' before "tmp"
    covtoolhelper.c:266: error: request for member `insert' in `*instrumented_lines'
    , which is of non-class type `int'
    covtoolhelper.c:266: error: `tmp' was not declared in this scope
    covtoolhelper.c:262: warning: unused variable 'data_type'
    covtoolhelper.c:264: warning: unused variable 'value_type'
    covtoolhelper.c:266: warning: unused variable 'tmp'
    covtoolhelper.c:270: error: `location' was not declared in this scope
    covtoolhelper.c:255: warning: unused variable 'filename'
    covtoolhelper.c:270: warning: unused variable 'location'
    covtoolhelper.c: In function `void __CvT__record_line____(const __CvT__module_in
    fo____*, int, int)':
    covtoolhelper.c:347: error: `line_ref_table' is not a class or namespace
    covtoolhelper.c:347: error: missing template arguments before "location"
    covtoolhelper.c:347: error: expected `;' before "location"
    covtoolhelper.c:349: error: `location' was not declared in this scope
    covtoolhelper.c:349: error: request for member `end' in `*executed_lines', which
    is of non-class type `int'
    covtoolhelper.c:351: error: `Allocator' was not declared in this scope
    covtoolhelper.c:351: error: template argument 3 is invalid
    covtoolhelper.c:351: error: invalid type in declaration before ';' token
    covtoolhelper.c:354: error: request for member `insert' in `*executed_lines', wh
    ich is of non-class type `int'
    covtoolhelper.c:354: error: `line_ref_table' is not a class or namespace
    covtoolhelper.c:354: error: `value_type' was not declared in this scope
    covtoolhelper.c:351: warning: unused variable 'Allocator'
    covtoolhelper.c:354: warning: unused variable 'value_type'
    covtoolhelper.c:359: error: `location' was not declared in this scope
    covtoolhelper.c:359: warning: unused variable 'location'
    covtoolhelper.c: In destructor `CvT_dump_database::~CvT_dump_database()':
    covtoolhelper.c:394: error: `base_file_info_t' is not a class or namespace
    covtoolhelper.c:394: error: missing template arguments before "i"
    covtoolhelper.c:394: error: expected `;' before "i"
    covtoolhelper.c:396: error: `i' was not declared in this scope
    covtoolhelper.c:396: error: request for member `begin' in `*all_files', which is
    of non-class type `int'
    covtoolhelper.c:397: error: request for member `end' in `*all_files', which is o
    f non-class type `int'
    covtoolhelper.c:401: error: `base_file_info_t' is not a class or namespace
    covtoolhelper.c:401: error: `value_type' was not declared in this scope
    covtoolhelper.c:401: error: expected `;' before "const"
    covtoolhelper.c:403: error: `r' was not declared in this scope
    covtoolhelper.c:405: error: `line_ref_table' is not a class or namespace
    covtoolhelper.c:405: error: missing template arguments before "ref_location"
    covtoolhelper.c:405: error: expected `;' before "ref_location"
    covtoolhelper.c:407: error: `ref_location' was not declared in this scope
    covtoolhelper.c:407: error: request for member `end' in `*executed_lines', which
    is of non-class type `int'
    covtoolhelper.c:409: error: `Allocator' was not declared in this scope
    covtoolhelper.c:409: error: template argument 3 is invalid
    covtoolhelper.c:409: error: invalid type in declaration before ';' token
    covtoolhelper.c:410: error: request for member `insert' in `*executed_lines', wh
    ich is of non-class type `int'
    covtoolhelper.c:410: error: `line_ref_table' is not a class or namespace
    covtoolhelper.c:409: warning: unused variable 'Allocator'
    covtoolhelper.c:407: warning: unused variable 'ref_location'
    covtoolhelper.c:403: warning: unused variable 'r'
    covtoolhelper.c:417: error: `line_ref_table' is not a class or namespace
    covtoolhelper.c:417: error: missing template arguments before "scan"
    covtoolhelper.c:417: error: expected `;' before "scan"
    covtoolhelper.c:421: error: `scan' was not declared in this scope
    covtoolhelper.c:421: error: request for member `begin' in `*executed_lines', whi
    ch is of non-class type `int'
    covtoolhelper.c:422: error: request for member `end' in `*executed_lines', which
    is of non-class type `int'
    covtoolhelper.c:430: error: `base_file_info_t' is not a class or namespace
    covtoolhelper.c:430: error: missing template arguments before "file_location"
    covtoolhelper.c:430: error: expected `;' before "file_location"
    covtoolhelper.c:435: error: `file_location' was not declared in this scope
    covtoolhelper.c:449: error: `file_location' was not declared in this scope
    covtoolhelper.c:461: error: `line_ref_table' is not a class or namespace
    covtoolhelper.c:461: error: missing template arguments before "i"
    covtoolhelper.c:461: error: expected `;' before "i"
    covtoolhelper.c:468: error: `i' was not declared in this scope
    covtoolhelper.c:488: error: `line_ref_table' is not a class or namespace
    covtoolhelper.c:488: error: missing template arguments before "fileinfo"
    covtoolhelper.c:488: error: expected `;' before "fileinfo"
    covtoolhelper.c:490: error: `fileinfo' was not declared in this scope
    covtoolhelper.c:490: error: request for member `end' in `*instrumented_lines', w
    hich is of non-class type `int'
    covtoolhelper.c:498: error: `line_ref_table' is not a class or namespace
    covtoolhelper.c:498: error: missing template arguments before "i"
    covtoolhelper.c:498: error: expected `;' before "i"
    covtoolhelper.c:500: error: `i' was not declared in this scope
    covtoolhelper.c:486: warning: unused variable 'filename'
    make: ***  Error 1

     
  • On Mobile,

    After receiving your email, I tried building both on red had fedora and on centos and did not receive the errors you are showing here.

    Here are the compiler versions that I was using:

    gcc version 4.1.2 20080704 (Red Hat 4.1.2-46)   (centos)

    gcc version 4.1.1 20070105 (Red Hat 4.1.1-51)  (fedora)

    Note that I downloaded the .zip file in version 2.1 (there are two version 2.1s, the top one is really 2.0, the bottom one, the latest version, is the one that you should use.  I have no idea why they both show 2.1.  The top one originally said 2.0….)

     
  • abhishek gupta
    abhishek gupta
    2010-03-31

    thanks. It is working at CentOS5.3 32 -bit.
    For .c file it is working.
    but now when we try with cpp file, we are getting following error.
    # ./cov++ -c Test.cpp -EXT .cpp .cpp
    cov++ error:  input file name has the wrong extension
                        file name:
                         expected:  *.cpp

     
  • abhishek gupta
    abhishek gupta
    2010-03-31

    now it is working fine with following command

    cov++  -EXT .cpp .c++ -c Test.cpp

    please update readme.txt

     
  • abhishek gupta
    abhishek gupta
    2010-03-31

    in my project in one make file is responsible for compiling .cpp and .cxx file.
    how I can solve this problem, because using -EXT i can give
    cov++ -EXT .cpp .c++
    or
    cov++ -EXT .cxx .c++

     
  • Presumably in your makefile you either have or can create lines of this form:

       .SUFFIXES:  .o .cxx .cpp

    .cxx.o:
         cov++ -EXT .cxx .c++ $<

    .cpp.o:
        cov++ -EXT .cpp .c++ $<

    Or some such thing.

     
  • abhishek gupta
    abhishek gupta
    2010-04-01

    Thanks a lot . I have build the binaries using different compile options (as suggested) for cpp and cxx files.
    Now I have an another issue. For some reason I can't build the main executable file with code coverage(cov) but I have build the shared libraries (libxyz.so) to be loaded at runtime with code coverage tool. When I am running the application, it is not writing any code coverage report. Is it suppose to write any report in this scenerio or executable also need to be build with code coverage tool ?

     
  • abhishek gupta
    abhishek gupta
    2010-04-01

    Hi

    We are now facing problem in widechar varibales.
    It is unable to compile code containing wide char

    wchar_t widechar = L'a';

    Error:

    error: 'L' was not declared in this scope

     
  • yes, the executable does have to be built with the coverage tool in order to get the static inits correct for the main function.

     
  • I'm afraid that you are in trouble with the wide character constants.  Those were not commonly available when I wrote the parser.  You will have to modify it to handle the syntax yourself I am afraid.  I am pretty busy at this time to make the change and test it.  It should not be that hard to detect the "L" followed by "'" and parse till the next "'" and treat that as a single token.

    Sorry.

    By the way, covtool does not support multi-threading.