summaryrefslogtreecommitdiff
path: root/libmudflap/mf-impl.h
diff options
context:
space:
mode:
authorFrank Ch. Eigler <fche@redhat.com>2004-07-20 20:00:56 +0000
committerFrank Ch. Eigler <fche@gcc.gnu.org>2004-07-20 20:00:56 +0000
commita082fc7afc0eeb6aaf30ffdc1bbf36d4853814ad (patch)
treedf6d56c256a656100ff79a37c174b4b0ce4893cc /libmudflap/mf-impl.h
parent9a55eab313314c6004a3833cd20df6e7f77d59ea (diff)
downloadgcc-a082fc7afc0eeb6aaf30ffdc1bbf36d4853814ad.tar.gz
mf-impl.h (__mf_options): Add ignore_reads and timestamps fields.
2004-07-20 Frank Ch. Eigler <fche@redhat.com> * mf-impl.h (__mf_options): Add ignore_reads and timestamps fields. * mf-runtime.c (options): Give them a name. (__mf_set_default_options): Set them. (__mf_insert_new_object, __mfu_unregister): Optionalize timestamps. (__mf_violation): Warning cleanup. * mf-impl.h (MF_VALIDATE_EXTENT): Support ignore_reads option. * splay-tree.c (splay_tree_delete_helper): Remove obsolete decl. From-SVN: r84971
Diffstat (limited to 'libmudflap/mf-impl.h')
-rw-r--r--libmudflap/mf-impl.h13
1 files changed, 7 insertions, 6 deletions
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, ...) \