From: Justin Seyster Date: Thu, 1 Apr 2010 20:14:36 +0000 (-0400) Subject: Changed the location of the AOP instrumentation pass. X-Git-Tag: release-v1.0~113 X-Git-Url: https://git.fsl.cs.stonybrook.edu/?a=commitdiff_plain;h=70176dead4fcf83697c2e88683043531ee46821e;p=interaspect.git Changed the location of the AOP instrumentation pass. With the instrumentation pass occuring much earlier in compilation, it is much less likely for optimizations to interfere with intstrumentation. Added PAUSE_ON_START debugging feature. --- diff --git a/src/aop-main.c b/src/aop-main.c index 4d05415..1a461e1 100644 --- a/src/aop-main.c +++ b/src/aop-main.c @@ -53,6 +53,8 @@ #include "aop.h" #include "aop-pointcut.h" +//#define PAUSE_ON_START + static const char *aop_plugin_name; void @@ -100,9 +102,9 @@ aop_register_pass (const char *pass_name, pass_callback callback) pass_aop->execute = callback; pass_info.pass = pass_aop; - pass_info.reference_pass_name = "*all_optimizations"; + pass_info.reference_pass_name = "cfg"; pass_info.ref_pass_instance_number = 0; - pass_info.pos_op = PASS_POS_INSERT_BEFORE; + pass_info.pos_op = PASS_POS_INSERT_AFTER; /* Safe the pointer to this object so we can free it later. */ VEC_safe_push(aop_pass, heap, aop_pass_list, pass_aop); @@ -152,6 +154,12 @@ plugin_init (struct plugin_name_args *plugin_info, { fprintf (stderr, "InterAspect init.\n"); +#ifdef PAUSE_ON_START + fprintf(stderr, "cc has PID %d. Attach debugger now.\n", getpid()); + fprintf(stderr, "[Enter to continue.]\n"); + scanf("%*c"); +#endif + aop_plugin_name = plugin_info->base_name; /* Register our cleanup function. */