From bc3f0d64c98c361b5183def1a7ec1d6964607660 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Wed, 31 Mar 2010 18:06:02 +0000 Subject: [PATCH] * sigproc.cc (wait_sig): Make sure that strace is activated on __SIGSTRACE by calling new strace::activate function. * strace.cc (strace::activate): Rename from strace::strace. * strace.h (strace::activate): Define new function. (strace::strace): Call activate. --- winsup/cygwin/ChangeLog | 8 ++++++++ winsup/cygwin/include/sys/strace.h | 3 ++- winsup/cygwin/sigproc.cc | 1 + winsup/cygwin/strace.cc | 3 ++- 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 5e8253ccd..734001f8e 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,11 @@ +2010-03-31 Christopher Faylor + + * sigproc.cc (wait_sig): Make sure that strace is activated on + __SIGSTRACE by calling new strace::activate function. + * strace.cc (strace::activate): Rename from strace::strace. + * strace.h (strace::activate): Define new function. + (strace::strace): Call activate. + 2010-03-31 Christopher Faylor * fhandler.h (fhandler_base_overlapped): Temporarily (?) make diff --git a/winsup/cygwin/include/sys/strace.h b/winsup/cygwin/include/sys/strace.h index 683cde0a6..376cf7ac6 100644 --- a/winsup/cygwin/include/sys/strace.h +++ b/winsup/cygwin/include/sys/strace.h @@ -39,7 +39,8 @@ class strace void write (unsigned category, const char *buf, int count); unsigned char _active; public: - strace (); + void activate (); + strace () {activate ();} int microseconds (); int version; int lmicrosec; diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc index cb70568fa..74e96ce30 100644 --- a/winsup/cygwin/sigproc.cc +++ b/winsup/cygwin/sigproc.cc @@ -1224,6 +1224,7 @@ wait_sig (VOID *) talktome (&pack.si); break; case __SIGSTRACE: + strace.activate (); strace.hello (); break; case __SIGPENDING: diff --git a/winsup/cygwin/strace.cc b/winsup/cygwin/strace.cc index fb62e29dc..beba5b335 100644 --- a/winsup/cygwin/strace.cc +++ b/winsup/cygwin/strace.cc @@ -31,7 +31,8 @@ class strace NO_COPY strace; #ifndef NOSTRACE -strace::strace () +void +strace::activate () { if (!dynamically_loaded && !_active && being_debugged ()) {