+1
0
-1

Stubbing a macro

Hi,
I want stub a macro #define CMD(x,y)
this is in a header file headex.h
and i am working on headex.c file. how do i this?

Posting in: 

9 Answers:

+1
-1
-1

The way that the VectorCAST tool works is that it uses your preprocessor to preprocess, and therefore expand, the macro definitions in the source code.  If there is a #define in the source code,...

+1
0
-1

We also have a project which has lots of macros that perform important functions. It would be very important to "stub the macro" with VectorCAST, as otherwise we see always the same...

+1
0
-1

We also have a project which has lots of macros that perform important functions. It would be very important to "stub the macro" with VectorCAST, as otherwise we see always the same...

+1
0
-1

Hello,

Use an Enterprise project

Project view > Files tab

Right click on file > View > Original source coverage report.

Regards,

Brian

+1
0
-1

Is there any solution for calling macro function from another file?

I want stub a macro #define CMD(x,y)\

this is in a header file headex.h
and i am working on headex.c file....

+1
0
-1

Hello Grace,

The procedure should always work, unless the header file is not macro guarded.

If it is not macro guarded, there is no solution and a macro guard must be introduced....

+1
0
-1

To complete Brian's explanations...

Usually, when I see something like this in the field, it is a sign that the user is either not using the same compiler as outside of VectorCAST or not...

+1
0
-1

Thanks!

The instrumentation compile output report:
function call is not allowed in a constant expression
{(VCAST_STATEMENT_INSTRUMENTATION_POINT_REALTIME(vcast_unit_stmt_bytes_9...

+1
0
-1

Hello,

Try tools>coverage>instrumentation options>avoid using comma separator in declarations.

Rebuild

Regards,

Brian