aop_type Struct Reference

A type object used to match types in the instrumented program. More...


Detailed Description

A type object used to match types in the instrumented program.

Most pointcuts can be refined by type, using functions like aop_match_assignment_by_type() or aop_filter_call_pc_by_param(). An aop_type object represents specific criteria for matching a type in the target program. As a simple example, the type returned by aop_t_all_signed() will match (almost) any signed integer type (int, char, int16_t, et al.). There are several useful "all" types:

Additionally, there are aop_type objects for matching very specific target types, such as aop_t_signed32(). See the complete list of InterAspect types.

Besides providing filtering criteria, aop_type objects are also used to specify how a parameter gets passed to an advice hook at the target language level. Every aop_dynval has an associated aop_type which controls how it is represented in the hook function prototype. For example, a dynval with an associated aop_t_all_signed() type will be passed as int64_t because a 64-bit integer can hold any value that fits in one of the types that aop_t_all_signed() can match.

All aop_type objects have an indefinite lifetime: you can store pointers to an aop_type anywhere without worrying that the reference will become stale. Additionally, aop_type objects are stored with hash consing, so recreating identical aop_type objects will not unnecessarily consume memory. InterAspect cleans up all aop_type objects for you when the compiler exits.

Examples:

advice_header.c.


The documentation for this struct was generated from the following file:
Generated on Tue Jul 31 21:46:43 2012 for InterAspect by doxygen 1.6.1