views:

55

answers:

1

I have debugging functions that are called in just about every function of a large program. They are conditionally turned on by a defined macro variable. I don't want these showing up in call graphs, since I can be fairly sure that every function has them. Is there a way to exclude the function from the graph

/*! Step 3:
 *  @callgraph
 */
void step3(double * phi, //...
{ // CODE:
/// inner_quadratic_form: 
/// \f$ s =  (\phi_j^{\mathrm{(old)}})^T  \Sigma_{\alpha\alpha} \phi_j^{\mathrm{(old)}}+1 \f$
double s = 1.0;debug_arg(s);
inner_quadratic_form(&s, old_phi_row, &one, ka, Saa, ka, dl, dp);
s+=1.0;debug_arg(s);
}

for example, the inner_quadratic form needs to be in the call graph but the debug_arg(s) does not. I think this is different from what is already on here because I need debug_arg documented but just not appearing in the call graphs.

A: 

How are you conditionally disabling debug_arg()? If debug_arg() is a macro defined thus:

#if defined INCLUDE_DEBUG
 #define debug_arg(s) debug_arg_function( s )
#else
 #define debug_arg(s)
#endif

then so long as you do not specify INCLUDE_DEBUG in the code or on the Doxygen configuration, then there will be no function call to document.

It is best to specify the INCLUDE_DEBUG on the command line rather than in the code so that you do not have to change the code to build the documentation.

Clifford
This works for the debugging code, and that is how they are defined. There are also a handful of special helper functions that perform special functions such as special handling of allocating memory, that I cannot turn off but I don't really need in the call graphs either. It would be nice if there were a way to specify it the functions documentation something like \ExcludeFromCallGraph that would have this not show up in call graphs.
Andrew Redd