summaryrefslogtreecommitdiff
path: root/libmudflap/mf-impl.h
diff options
context:
space:
mode:
authorfche <fche@138bc75d-0d04-0410-961f-82ee72b054a4>2004-07-20 20:00:56 +0000
committerfche <fche@138bc75d-0d04-0410-961f-82ee72b054a4>2004-07-20 20:00:56 +0000
commit80a84069dc74d96566f0be6e6f509df53e6336b0 (patch)
treedf6d56c256a656100ff79a37c174b4b0ce4893cc /libmudflap/mf-impl.h
parent916c9cefb227abebb2124d1dc1abeb3435c6814b (diff)
downloadgcc-80a84069dc74d96566f0be6e6f509df53e6336b0.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@84971 138bc75d-0d04-0410-961f-82ee72b054a4
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, ...) \