X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=libmudflap%2Fmf-impl.h;h=55706c13dba7e70fdbb793f00ffaf247518ed707;hb=aa951e73c15ab8273794a0267ca82c4a55c5e6f7;hp=ef962bfaf01a88182fdf3ff2cdbcbd14decbb64f;hpb=9a1a84ca103b211b3b5c02d9618752a2a57d6201;p=pf3gnuchains%2Fgcc-fork.git diff --git a/libmudflap/mf-impl.h b/libmudflap/mf-impl.h index ef962bfaf01..55706c13dba 100644 --- a/libmudflap/mf-impl.h +++ b/libmudflap/mf-impl.h @@ -133,9 +133,6 @@ struct __mf_options /* Emit internal tracing message. */ unsigned verbose_trace; - /* Support multiple threads. XXX: not yet implemented. */ - /* unsigned multi_threaded; */ - /* Wipe stack/heap objects upon unwind. */ unsigned wipe_stack; unsigned wipe_heap; @@ -153,6 +150,12 @@ struct __mf_options /* Maintain this many stack frames for contexts. */ unsigned backtrace; + /* Ignore read operations even if mode_check is in effect. */ + unsigned ignore_reads; + + /* Collect register/unregister timestamps. */ + unsigned timestamps; + #ifdef LIBMUDFLAPTH /* Thread stack size. */ unsigned thread_stack; @@ -168,9 +171,7 @@ struct __mf_options } mudflap_mode; - /* How to handle a violation. */ - enum { viol_nop, /* Return control to application. */ @@ -240,7 +241,6 @@ extern enum __mf_state_enum *__mf_state_perthread (); extern enum __mf_state_enum __mf_state; #endif extern int __mf_starting_p; - extern struct __mf_options __mf_opts; /* ------------------------------------------------------------------------ */ @@ -355,6 +355,7 @@ ret __mfwrap_ ## fname (__VA_ARGS__) #define MF_VALIDATE_EXTENT(value,size,acc,context) \ do { \ if (UNLIKELY (size > 0 && __MF_CACHE_MISS_P (value, size))) \ + if (acc == __MF_CHECK_WRITE || ! __mf_opts.ignore_reads) \ __mf_check ((void *) (value), (size), acc, "(" context ")"); \ } while (0) #define BEGIN_PROTECT(fname, ...) \