Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2011-11-24 06:17:55 +0400
committerChristopher Faylor <me@cgf.cx>2011-11-24 06:17:55 +0400
commit8942ed09ac9491f52337395e11b6dc0c554be05f (patch)
treebdd0f41aa11c48fe91eb07f483fad89f7baffe8f /winsup/cygwin/strace.cc
parent5f38ec468115a6ddf2c458f2b8f9c4abfd8b0359 (diff)
* 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.
Diffstat (limited to 'winsup/cygwin/strace.cc')
-rw-r--r--winsup/cygwin/strace.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/winsup/cygwin/strace.cc b/winsup/cygwin/strace.cc
index 6b3de5c73..58dbb8887 100644
--- a/winsup/cygwin/strace.cc
+++ b/winsup/cygwin/strace.cc
@@ -32,12 +32,12 @@ class strace NO_COPY strace;
#ifndef NOSTRACE
void
-strace::activate ()
+strace::activate (bool isfork)
{
if (!dynamically_loaded && !_active && being_debugged ())
{
char buf[30];
- __small_sprintf (buf, "cYg%8x %x", _STRACE_INTERFACE_ACTIVATE_ADDR, &_active);
+ __small_sprintf (buf, "cYg%8x %x %d", _STRACE_INTERFACE_ACTIVATE_ADDR, &_active, isfork);
OutputDebugString (buf);
}
}
@@ -47,9 +47,10 @@ strace::hello ()
{
if (active ())
{
- char pidbuf[40];
+ char pidbuf[80];
if (myself->progname[0])
- __small_sprintf (pidbuf, "(pid %d, ppid %d)", myself->pid, myself->ppid ?: 1);
+ __small_sprintf (pidbuf, "(pid %d, ppid %d, windows pid %u)", myself->pid,
+ myself->ppid ?: 1, GetCurrentProcessId ());
else
{
GetModuleFileNameW (NULL, myself->progname, sizeof (myself->progname));