* child_info.h (CURR_CHILD_INFO_MAGIC): Reset for previous changes.

* dcrt0.cc (get_cygwin_startup_info): Signal readiness when stracing since
strace::write_child relies on it.  Use strace.activate to notify strace
process, passing in arg indicating whether we're forked.
* sigproc.cc (wait_sig): Accommodate new strace::activate argument.
* spawn.cc (child_info_spawn::worker): Oops.  Previous suspended test was
actually correct.  Revert and document.
* strace.cc (strace::activate): Send additional flag indicating whether this is
an attempt to activate a forked process.
(strace::hello): Report on windows pid.
* include/sys/strace.h (strace::strace): Make a dummy.
(strace::activate): Modify declaration to accept an argument.
(strace::write_childpid): Set regparm.
This commit is contained in:
Christopher Faylor
2011-11-24 02:17:55 +00:00
parent 5f38ec4681
commit 8942ed09ac
7 changed files with 32 additions and 12 deletions

View File

@ -39,8 +39,8 @@ class strace
void write (unsigned category, const char *buf, int count);
unsigned char _active;
public:
void activate ();
strace () {activate ();}
void activate (bool) __attribute__ ((regparm (2)));;
strace () {}
int microseconds ();
int version;
int lmicrosec;
@ -50,7 +50,7 @@ public:
void prntf (unsigned, const char *func, const char *, ...) /*__attribute__ ((regparm(3)))*/;
void vprntf (unsigned, const char *func, const char *, va_list ap) /*__attribute__ ((regparm(3)))*/;
void wm (int message, int word, int lon) __attribute__ ((regparm(3)));
void write_childpid (child_info&, unsigned long) __attribute__ ((regparm (2)));
void write_childpid (child_info&, unsigned long) __attribute__ ((regparm (3)));
bool attached () const {return _active == 3;}
bool active () const {return _active & 1;}
unsigned char& active_val () {return _active;}