src/tracecut-advice.h File Reference

Public interface for implementing tracecut advice functions. More...

Go to the source code of this file.

Classes

struct  param_val
 Value of a param. More...
struct  matched_param
 The name and value of a param. More...

Functions

void tc_report_match (const char *symbol, const struct matched_param *param_array, int num_params)

Detailed Description

Public interface for implementing tracecut advice functions.

When the tracecut monitoring engine matches a tracecut rule, it calls the tracecut match function, tc_report_match(). By default, tc_report_match() just prints information about the match to stderr, but it is possible to override tc_report_match() to perform some other action.

Note that this include file is not intended for tracecut plug-ins. Rather, it is intended for tracecut advice, which gets compiled and linked with the target program.


Function Documentation

void tc_report_match ( const char *  symbol,
const struct matched_param param_array,
int  num_params 
)

This function gets called at runtime when a tracecut rule matches. Because it is marked as a weak symbol, if the target program (or some other library) implements tc_report_match(), it will override the default implementation.

The default implementation prints the symbol that triggered the match and the value of each param to stderr.

Parameters:
symbol The name of the symbol that triggered the match.
param_array A list of params associated with the tracecut. Each entry in the array has the param's name, as well as its value.
num_params The number of elements in the param_array list.
Generated on Tue Jul 31 21:46:42 2012 for InterAspect by doxygen 1.6.1