Project

General

Profile

Bug #3131

Updated by Denis Efremov over 12 years ago

Aspectator doesn't support can't create aspects for function-like macros without arguments as join points (or [primitive] pointcuts). arguments. But sometimes this feature is needed. For example, if we want to create kernel configuration invariant rule, we should create two types of aspects( on function and on macros ) in the following case: 

 <pre> 
 include/linux/cpu.h-165:#ifdef CONFIG_HOTPLUG_CPU 
 include/linux/cpu.h:168:extern void get_online_cpus(void); 
 include/linux/cpu.h-169:extern void put_online_cpus(void); 
 include/linux/cpu.h-188:#else              /* CONFIG_HOTPLUG_CPU */ 
 include/linux/cpu.h:190:#define get_online_cpus()          do { } while (0) 
 include/linux/cpu.h-191:#define put_online_cpus()          do { } while (0) 
 </pre> 


 -- 

 Aspect (model0115_1a-blast.aspect): 
 <pre> 
 

 8:after: call( void get_online_cpus(..) ) 
 503:around: define( get_online_cpus() ) 
 </pre> 


 -- 

 Error: 
 <pre> 
 

 model0115_1a-blast.aspect:503.33-503.33: aspect file processed has incorrect syntax 
 cc1: fatal error: terminate work after syntax error happened 
 compilation terminated. 
 Aspectator fails on the 1st stage 
 </pre>

Back