diff options
author | marcel <marcel@FreeBSD.org> | 2003-07-11 01:03:55 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2003-07-11 01:03:55 +0000 |
commit | 3b3c37c7db7e37f6e95a35539a96dc6b2d5edd8f (patch) | |
tree | 40d905e598ca4a847254b273186a0db367822859 /sys/contrib/ia64/libuwx | |
parent | 1edc7465a0eedb6ceb50376d0ef2bcd13a40e03d (diff) | |
download | FreeBSD-src-3b3c37c7db7e37f6e95a35539a96dc6b2d5edd8f.zip FreeBSD-src-3b3c37c7db7e37f6e95a35539a96dc6b2d5edd8f.tar.gz |
Rename DISABLE_TRACE to UWX_TRACE_ENABLE and change the conditional
compilation accordingly. The net effect is that tracing is not by
default present and that it can easily be compiled-in.
The tracer uses getenv() and printf(), which cannot be used in all
cases (ie from the debugger) and with this change we improved the
applicability of the unwinder.
This change is made on the vendor branch and given back to the
vendor for possible inclusion in future versions.
Diffstat (limited to 'sys/contrib/ia64/libuwx')
-rw-r--r-- | sys/contrib/ia64/libuwx/src/Makefile | 2 | ||||
-rw-r--r-- | sys/contrib/ia64/libuwx/src/uwx_trace.c | 3 | ||||
-rw-r--r-- | sys/contrib/ia64/libuwx/src/uwx_trace.h | 6 |
3 files changed, 7 insertions, 4 deletions
diff --git a/sys/contrib/ia64/libuwx/src/Makefile b/sys/contrib/ia64/libuwx/src/Makefile index f0f0871..4989db8 100644 --- a/sys/contrib/ia64/libuwx/src/Makefile +++ b/sys/contrib/ia64/libuwx/src/Makefile @@ -8,7 +8,7 @@ AR = ar RANLIB = : -# OTHERCFLAGS = -DDISABLE_TRACE # Disables trace output +# OTHERCFLAGS = -DUWX_TRACE_ENABLE # Enables trace output # OTHERCFLAGS = +DD64 # Builds 64-bit library OTHERCFLAGS = diff --git a/sys/contrib/ia64/libuwx/src/uwx_trace.c b/sys/contrib/ia64/libuwx/src/uwx_trace.c index 695192a..1b26179 100644 --- a/sys/contrib/ia64/libuwx/src/uwx_trace.c +++ b/sys/contrib/ia64/libuwx/src/uwx_trace.c @@ -25,6 +25,8 @@ #include "uwx_scoreboard.h" #include "uwx_trace.h" +#ifdef UWX_TRACE_ENABLE + void uwx_trace_init(struct uwx_env *env) { char *tstr; @@ -136,3 +138,4 @@ void uwx_dump_scoreboard( uwx_dump_rstate(i, scoreboard->rstate[i]); } +#endif /* UWX_TRACE_ENABLE */ diff --git a/sys/contrib/ia64/libuwx/src/uwx_trace.h b/sys/contrib/ia64/libuwx/src/uwx_trace.h index 4b8cdaa..97ea260 100644 --- a/sys/contrib/ia64/libuwx/src/uwx_trace.h +++ b/sys/contrib/ia64/libuwx/src/uwx_trace.h @@ -29,7 +29,7 @@ #define UWX_TRACE_COPYIN 64 /* UWX_TRACE=C: copyin callback */ #define UWX_TRACE_LOOKUPIP 128 /* UWX_TRACE=L: lookupip callback */ -#ifdef DISABLE_TRACE +#ifndef UWX_TRACE_ENABLE #define TRACE_INIT #define TRACE_B_REUSE(id) @@ -76,7 +76,7 @@ #define TRACE_SELF_LOOKUP(ip) #define TRACE_SELF_LOOKUP_DESC(text_base, unwind_base) -#else /* not TRACE_DISABLED */ +#else /* !UWX_TRACE_ENABLE */ extern void uwx_trace_init(struct uwx_env *env); @@ -344,5 +344,5 @@ extern void uwx_dump_scoreboard( (unsigned int) ((text_base)+(unwind_base)[2])); \ } -#endif /* TRACE_DISABLED */ +#endif /* !UWX_TRACE_ENABLE */ |