summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/strace.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2002-02-14 21:20:06 +0000
committerChristopher Faylor <me@cgf.cx>2002-02-14 21:20:06 +0000
commit907dc7d0c9f64d95b6d4da91dab6601d0e6054ec (patch)
tree09bc7dae25c4c1f67767dfc04fb1ee4c3a08c371 /winsup/cygwin/strace.cc
parent27530c31810976dec063f8ffdc6709945dfcef39 (diff)
downloadcygnal-907dc7d0c9f64d95b6d4da91dab6601d0e6054ec.tar.gz
cygnal-907dc7d0c9f64d95b6d4da91dab6601d0e6054ec.tar.bz2
cygnal-907dc7d0c9f64d95b6d4da91dab6601d0e6054ec.zip
* exceptions.cc (unused_sig_wrapper): Eliminate unused parameter to asm.
* external.cc (cygwin_internal): Change CW_STRACE_ON to CW_STRACE_TOGGLE. * strace.cc (strace::hello): Toggle strace on and off. * sync.cc (muto::init): Renamed from constructor. * sync.h (muto::new): Delete. (muto::delete): Ditto. (new_muto): Simplify. Use muto.init for nearly everything. * uinfo.cc (uinfo_init): Avoid closing a NULL handle. * include/sys/cygwin.h (cygwin_getinfo_types): Rename CW_STRACE_OFF to CW_STRACE_TOGGLE. Delete CW_STRACE_OFF. * include/sys/strace.h (strace): Add "inited" field.
Diffstat (limited to 'winsup/cygwin/strace.cc')
-rw-r--r--winsup/cygwin/strace.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/winsup/cygwin/strace.cc b/winsup/cygwin/strace.cc
index 993bfe1ef..00ad60139 100644
--- a/winsup/cygwin/strace.cc
+++ b/winsup/cygwin/strace.cc
@@ -34,6 +34,13 @@ void
strace::hello()
{
char buf[30];
+
+ if (inited)
+ {
+ active ^= 1;
+ return;
+ }
+
__small_sprintf (buf, "cYg%8x %x", _STRACE_INTERFACE_ACTIVATE_ADDR, &active);
OutputDebugString (buf);