* pinfo.cc (pinfo_basic): New class.
(pinfo_basic::pinfo_basic): Define constructor for new class. (myself): Initialize from myself_initial. (set_myself): Set pid and progname from already myself_initial. * strace.cc (strace::strace): Split apart strace::hello. Send notification to strace as early as possible. (strace::hello): Just send clause which describes the current process. This can now be preceded by early initialization strace output. * include/sys/strace.h (strace::strace): Declare new constructor.
This commit is contained in:
@ -31,16 +31,19 @@ class strace NO_COPY strace;
|
||||
|
||||
#ifndef NOSTRACE
|
||||
|
||||
strace::strace ()
|
||||
{
|
||||
if (!dynamically_loaded && !_active && being_debugged ())
|
||||
{
|
||||
char buf[30];
|
||||
__small_sprintf (buf, "cYg%8x %x", _STRACE_INTERFACE_ACTIVATE_ADDR, &_active);
|
||||
OutputDebugString (buf);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
strace::hello ()
|
||||
{
|
||||
if (_active || !being_debugged ())
|
||||
return;
|
||||
|
||||
char buf[30];
|
||||
__small_sprintf (buf, "cYg%8x %x", _STRACE_INTERFACE_ACTIVATE_ADDR, &_active);
|
||||
OutputDebugString (buf);
|
||||
|
||||
if (active ())
|
||||
{
|
||||
char pidbuf[40];
|
||||
|
Reference in New Issue
Block a user