Throughout use strace class in place of individual functions and variables.
* cygwin.din: Eliminate _strace_wm. * sigproc.cc (wait_sig): Temporarily add more debugging output. * include/cygwin/version.h: Bump minor api to reflect export change.
This commit is contained in:
parent
b5314dabec
commit
5abc9b830b
|
@ -1,3 +1,11 @@
|
||||||
|
Tue Mar 7 00:29:34 2000 Christopher Faylor <cgf@cygnus.com>
|
||||||
|
|
||||||
|
Throughout use strace class in place of individual functions and
|
||||||
|
variables.
|
||||||
|
* cygwin.din: Eliminate _strace_wm.
|
||||||
|
* sigproc.cc (wait_sig): Temporarily add more debugging output.
|
||||||
|
* include/cygwin/version.h: Bump minor api to reflect export change.
|
||||||
|
|
||||||
Sun Mar 5 01:17:05 2000 Christopher Faylor <cgf@cygnus.com>
|
Sun Mar 5 01:17:05 2000 Christopher Faylor <cgf@cygnus.com>
|
||||||
|
|
||||||
* exceptions.cc (call_handler): Streamline to use only one call to
|
* exceptions.cc (call_handler): Streamline to use only one call to
|
||||||
|
|
|
@ -11,7 +11,6 @@ __swbuf
|
||||||
__vc__10pinfo_listi
|
__vc__10pinfo_listi
|
||||||
@ALLOCA@
|
@ALLOCA@
|
||||||
cygwin_stackdump
|
cygwin_stackdump
|
||||||
_strace_wm
|
|
||||||
abort
|
abort
|
||||||
_abort = abort
|
_abort = abort
|
||||||
abs
|
abs
|
||||||
|
|
|
@ -142,9 +142,7 @@ hinfo::release (int fd)
|
||||||
{
|
{
|
||||||
if (!not_open (fd))
|
if (!not_open (fd))
|
||||||
{
|
{
|
||||||
MALLOC_CHECK;
|
|
||||||
delete (fds[fd]);
|
delete (fds[fd]);
|
||||||
MALLOC_CHECK;
|
|
||||||
fds[fd] = NULL;
|
fds[fd] = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -119,15 +119,15 @@ seterrno_from_win_error (const char *file, int line, int code)
|
||||||
|
|
||||||
if (errmap[i].w != 0)
|
if (errmap[i].w != 0)
|
||||||
{
|
{
|
||||||
if (strace_active)
|
if (strace.active)
|
||||||
strace_printf (_STRACE_SYSCALL, "%s:%d seterrno: %d (%s) -> %d",
|
strace.prntf (_STRACE_SYSCALL, "%s:%d seterrno: %d (%s) -> %d",
|
||||||
file, line, code, errmap[i].s, errmap[i].e);
|
file, line, code, errmap[i].s, errmap[i].e);
|
||||||
set_errno (errmap[i].e);
|
set_errno (errmap[i].e);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (strace_active)
|
if (strace.active)
|
||||||
strace_printf (_STRACE_SYSCALL, "%s:%d seterrno: unknown error %d", file, line, code);
|
strace.prntf (_STRACE_SYSCALL, "%s:%d seterrno: unknown error %d", file, line, code);
|
||||||
set_errno (EACCES);
|
set_errno (EACCES);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -491,7 +491,7 @@ fhandler_base::read (void *in_ptr, size_t in_len)
|
||||||
rpos_ += copied_chars;
|
rpos_ += copied_chars;
|
||||||
|
|
||||||
#ifndef NOSTRACE
|
#ifndef NOSTRACE
|
||||||
if (strace_active)
|
if (strace.active)
|
||||||
{
|
{
|
||||||
char buf[16 * 6 + 1];
|
char buf[16 * 6 + 1];
|
||||||
char *p = buf;
|
char *p = buf;
|
||||||
|
|
|
@ -105,8 +105,8 @@ DWORD
|
||||||
fhandler_tty_common::__acquire_output_mutex (const char *fn, int ln,
|
fhandler_tty_common::__acquire_output_mutex (const char *fn, int ln,
|
||||||
DWORD ms)
|
DWORD ms)
|
||||||
{
|
{
|
||||||
if (strace_active)
|
if (strace.active)
|
||||||
strace_printf (_STRACE_TERMIOS, "%F (%d): tty output_mutex: waiting %d ms", fn, ln, ms);
|
strace.prntf (_STRACE_TERMIOS, "%F (%d): tty output_mutex: waiting %d ms", fn, ln, ms);
|
||||||
DWORD res = WaitForSingleObject (output_mutex, ms);
|
DWORD res = WaitForSingleObject (output_mutex, ms);
|
||||||
if (res == WAIT_OBJECT_0)
|
if (res == WAIT_OBJECT_0)
|
||||||
{
|
{
|
||||||
|
@ -118,8 +118,8 @@ fhandler_tty_common::__acquire_output_mutex (const char *fn, int ln,
|
||||||
osi++;
|
osi++;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
if (strace_active)
|
if (strace.active)
|
||||||
strace_printf (_STRACE_TERMIOS, "%F (%d): tty output_mutex: acquired", fn, ln, res);
|
strace.prntf (_STRACE_TERMIOS, "%F (%d): tty output_mutex: acquired", fn, ln, res);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -136,8 +136,8 @@ fhandler_tty_common::__release_output_mutex (const char *fn, int ln)
|
||||||
ostack[osi].ln = -ln;
|
ostack[osi].ln = -ln;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
if (strace_active)
|
if (strace.active)
|
||||||
strace_printf (_STRACE_TERMIOS, "%F (%d): tty output_mutex released", fn, ln);
|
strace.prntf (_STRACE_TERMIOS, "%F (%d): tty output_mutex released", fn, ln);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define acquire_output_mutex(ms) \
|
#define acquire_output_mutex(ms) \
|
||||||
|
|
|
@ -93,10 +93,11 @@ details. */
|
||||||
15: Export glob
|
15: Export glob
|
||||||
16: Export cygwin_stackdump
|
16: Export cygwin_stackdump
|
||||||
17: Export fast math stuff
|
17: Export fast math stuff
|
||||||
|
18: Stop exporting _strace_wm
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define CYGWIN_VERSION_API_MAJOR 0
|
#define CYGWIN_VERSION_API_MAJOR 0
|
||||||
#define CYGWIN_VERSION_API_MINOR 17
|
#define CYGWIN_VERSION_API_MINOR 18
|
||||||
|
|
||||||
/* There is also a compatibity version number associated with the
|
/* There is also a compatibity version number associated with the
|
||||||
shared memory regions. It is incremented when incompatible
|
shared memory regions. It is incremented when incompatible
|
||||||
|
|
|
@ -19,11 +19,25 @@
|
||||||
#ifndef _SYS_STRACE_H
|
#ifndef _SYS_STRACE_H
|
||||||
#define _SYS_STRACE_H
|
#define _SYS_STRACE_H
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#include <stdarg.h>
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define _STRACE_INTERFACE_ACTIVATE_ADDR -1
|
class strace
|
||||||
|
{
|
||||||
|
friend void __system_printf (const char *fmt, ...);
|
||||||
|
int microseconds ();
|
||||||
|
int vsprntf (char *buf, const char *infmt, va_list ap);
|
||||||
|
void write (unsigned category, const char *buf, int count);
|
||||||
|
public:
|
||||||
|
int version;
|
||||||
|
int active;
|
||||||
|
int lmicrosec;
|
||||||
|
strace() : version(1) {}
|
||||||
|
void prntf (unsigned category, const char *fmt,...);
|
||||||
|
void wm (int message, int word, int lon);
|
||||||
|
};
|
||||||
|
|
||||||
|
#define _STRACE_INTERFACE_ACTIVATE_ADDR -1
|
||||||
|
#define _STRACE_INTERFACE_ACTIVATE_ADDR1 -2
|
||||||
|
|
||||||
/* Bitmasks of tracing messages to print. */
|
/* Bitmasks of tracing messages to print. */
|
||||||
|
|
||||||
|
@ -47,33 +61,23 @@ extern "C" {
|
||||||
#define _STRACE_THREAD 0x40000 // thread-locking calls
|
#define _STRACE_THREAD 0x40000 // thread-locking calls
|
||||||
#define _STRACE_NOTALL 0x80000 // don't include if _STRACE_ALL
|
#define _STRACE_NOTALL 0x80000 // don't include if _STRACE_ALL
|
||||||
|
|
||||||
void small_printf (const char *, ...);
|
extern "C" void small_printf (const char *, ...);
|
||||||
|
|
||||||
#ifdef NOSTRACE
|
#ifndef NOSTRACE
|
||||||
#define strace_printf(category, fmt...) 0
|
|
||||||
#define strace_printf_wrap(category, fmt...) 0
|
|
||||||
#define strace_printf_wrap1(category, fmt...) 0
|
|
||||||
#define strace_wm(category, msg...) 0
|
|
||||||
#else
|
|
||||||
/* Output message to strace log */
|
/* Output message to strace log */
|
||||||
void strace_printf (unsigned, const char *, ...);
|
|
||||||
void __system_printf (const char *, ...);
|
|
||||||
|
|
||||||
#define system_printf(fmt, args...) \
|
#define system_printf(fmt, args...) \
|
||||||
__system_printf("%F: " fmt, __PRETTY_FUNCTION__ , ## args)
|
__system_printf("%F: " fmt, __PRETTY_FUNCTION__ , ## args)
|
||||||
|
|
||||||
void _strace_wm (int __message, int __word, int __lon);
|
|
||||||
|
|
||||||
#define strace_printf_wrap(what, fmt, args...) \
|
#define strace_printf_wrap(what, fmt, args...) \
|
||||||
((void) ({\
|
((void) ({\
|
||||||
if (strace_active) \
|
if (strace.active) \
|
||||||
strace_printf(_STRACE_ ## what, "%F: " fmt, __PRETTY_FUNCTION__ , ## args); \
|
strace.prntf(_STRACE_ ## what, "%F: " fmt, __PRETTY_FUNCTION__ , ## args); \
|
||||||
0; \
|
0; \
|
||||||
}))
|
}))
|
||||||
#define strace_printf_wrap1(what, fmt, args...) \
|
#define strace_printf_wrap1(what, fmt, args...) \
|
||||||
((void) ({\
|
((void) ({\
|
||||||
if (strace_active) \
|
if (strace.active) \
|
||||||
strace_printf((_STRACE_ ## what) | _STRACE_NOTALL, "%F: " fmt, __PRETTY_FUNCTION__ , ## args); \
|
strace.prntf((_STRACE_ ## what) | _STRACE_NOTALL, "%F: " fmt, __PRETTY_FUNCTION__ , ## args); \
|
||||||
0; \
|
0; \
|
||||||
}))
|
}))
|
||||||
#endif /*NOSTRACE*/
|
#endif /*NOSTRACE*/
|
||||||
|
@ -89,8 +93,4 @@ void _strace_wm (int __message, int __word, int __lon);
|
||||||
#define malloc_printf(fmt, args...) strace_printf_wrap1(MALLOC, fmt , ## args)
|
#define malloc_printf(fmt, args...) strace_printf_wrap1(MALLOC, fmt , ## args)
|
||||||
#define thread_printf(fmt, args...) strace_printf_wrap1(THREAD, fmt , ## args)
|
#define thread_printf(fmt, args...) strace_printf_wrap1(THREAD, fmt , ## args)
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* _SYS_STRACE_H */
|
#endif /* _SYS_STRACE_H */
|
||||||
|
|
|
@ -7,9 +7,6 @@
|
||||||
/* CYGNUS LOCAL */
|
/* CYGNUS LOCAL */
|
||||||
#define lint
|
#define lint
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <sys/strace.h>
|
|
||||||
|
|
||||||
extern DWORD strace_active;
|
|
||||||
|
|
||||||
#define USG_COMPAT
|
#define USG_COMPAT
|
||||||
|
|
||||||
|
|
|
@ -43,26 +43,26 @@ set_myself (pinfo *p)
|
||||||
myself->start_time = time (NULL); /* Register our starting time. */
|
myself->start_time = time (NULL); /* Register our starting time. */
|
||||||
|
|
||||||
char buf[30];
|
char buf[30];
|
||||||
__small_sprintf (buf, "cYg%8x %x %x", _STRACE_INTERFACE_ACTIVATE_ADDR,
|
__small_sprintf (buf, "cYg%8x %x", _STRACE_INTERFACE_ACTIVATE_ADDR,
|
||||||
&strace_active);
|
&strace.active);
|
||||||
OutputDebugString (buf);
|
OutputDebugString (buf);
|
||||||
|
|
||||||
(void) GetModuleFileName (NULL, myself->progname,
|
(void) GetModuleFileName (NULL, myself->progname,
|
||||||
sizeof(myself->progname));
|
sizeof(myself->progname));
|
||||||
if (strace_active)
|
if (strace.active)
|
||||||
{
|
{
|
||||||
extern char osname[];
|
extern char osname[];
|
||||||
strace_printf (1, "**********************************************");
|
strace.prntf (1, "**********************************************");
|
||||||
strace_printf (1, "Program name: %s", myself->progname);
|
strace.prntf (1, "Program name: %s", myself->progname);
|
||||||
strace_printf (1, "App version: %d.%d, api: %d.%d",
|
strace.prntf (1, "App version: %d.%d, api: %d.%d",
|
||||||
user_data->dll_major, user_data->dll_minor,
|
user_data->dll_major, user_data->dll_minor,
|
||||||
user_data->api_major, user_data->api_minor);
|
user_data->api_major, user_data->api_minor);
|
||||||
strace_printf (1, "DLL version: %d.%d, api: %d.%d",
|
strace.prntf (1, "DLL version: %d.%d, api: %d.%d",
|
||||||
cygwin_version.dll_major, cygwin_version.dll_minor,
|
cygwin_version.dll_major, cygwin_version.dll_minor,
|
||||||
cygwin_version.api_major, cygwin_version.api_minor);
|
cygwin_version.api_major, cygwin_version.api_minor);
|
||||||
strace_printf (1, "DLL build: %s", cygwin_version.dll_build_date);
|
strace.prntf (1, "DLL build: %s", cygwin_version.dll_build_date);
|
||||||
strace_printf (1, "OS version: Windows %s", osname);
|
strace.prntf (1, "OS version: Windows %s", osname);
|
||||||
strace_printf (1, "**********************************************");
|
strace.prntf (1, "**********************************************");
|
||||||
}
|
}
|
||||||
|
|
||||||
return myself;
|
return myself;
|
||||||
|
|
|
@ -1262,7 +1262,7 @@ wait_sig (VOID *)
|
||||||
|
|
||||||
/* Internal signal to force a flush of strace data to disk. */
|
/* Internal signal to force a flush of strace data to disk. */
|
||||||
case __SIGSTRACE:
|
case __SIGSTRACE:
|
||||||
// proc_strace (); // Dump cached strace_printf stuff.
|
// proc_strace (); // Dump cached strace.prntf stuff.
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* Signalled from a child process that it has stopped */
|
/* Signalled from a child process that it has stopped */
|
||||||
|
@ -1301,11 +1301,14 @@ wait_sig (VOID *)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
SetEvent (sigcomplete_main);
|
SetEvent (sigcomplete_main);
|
||||||
|
sigproc_printf ("signalled sigcomplete_main");
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
ReleaseSemaphore (sigcomplete_nonmain, 1, NULL);
|
ReleaseSemaphore (sigcomplete_nonmain, 1, NULL);
|
||||||
|
sigproc_printf ("signalled sigcomplete_nonmain");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
sigproc_printf ("Did not signal anyone");
|
||||||
/* Signal from another process. No need to synchronize. */
|
/* Signal from another process. No need to synchronize. */
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,6 @@ Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||||
details. */
|
details. */
|
||||||
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <stdarg.h>
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include "winsup.h"
|
#include "winsup.h"
|
||||||
|
@ -17,7 +16,8 @@ details. */
|
||||||
#define PROTECT(x) x[sizeof(x)-1] = 0
|
#define PROTECT(x) x[sizeof(x)-1] = 0
|
||||||
#define CHECK(x) if (x[sizeof(x)-1] != 0) { small_printf("array bound exceeded %d\n", __LINE__); ExitProcess(1); }
|
#define CHECK(x) if (x[sizeof(x)-1] != 0) { small_printf("array bound exceeded %d\n", __LINE__); ExitProcess(1); }
|
||||||
|
|
||||||
DWORD NO_COPY strace_active = 0;
|
|
||||||
|
class strace NO_COPY strace;
|
||||||
|
|
||||||
/* 'twould be nice to declare this in winsup.h but winsup.h doesn't require
|
/* 'twould be nice to declare this in winsup.h but winsup.h doesn't require
|
||||||
stdarg.h, so we declare it here instead. */
|
stdarg.h, so we declare it here instead. */
|
||||||
|
@ -25,13 +25,15 @@ DWORD NO_COPY strace_active = 0;
|
||||||
#ifndef NOSTRACE
|
#ifndef NOSTRACE
|
||||||
|
|
||||||
#ifndef STRACE_HHMMSS
|
#ifndef STRACE_HHMMSS
|
||||||
static long long hires_frequency = 0;
|
int
|
||||||
static int hires_initted = 0;
|
strace::microseconds()
|
||||||
|
|
||||||
static int strace_microseconds()
|
|
||||||
{
|
{
|
||||||
static int first_microsec = 0;
|
static int first_microsec = 0;
|
||||||
|
static long long hires_frequency = 0;
|
||||||
|
static int hires_initted = 0;
|
||||||
|
|
||||||
int microsec;
|
int microsec;
|
||||||
|
|
||||||
if (!hires_initted)
|
if (!hires_initted)
|
||||||
{
|
{
|
||||||
hires_initted = 1;
|
hires_initted = 1;
|
||||||
|
@ -59,8 +61,8 @@ static int strace_microseconds()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* sprintf analog for use by output routines. */
|
/* sprintf analog for use by output routines. */
|
||||||
static int
|
int
|
||||||
strace_vsprintf (char *buf, const char *infmt, va_list ap)
|
strace::vsprntf (char *buf, const char *infmt, va_list ap)
|
||||||
{
|
{
|
||||||
int count;
|
int count;
|
||||||
char fmt[80];
|
char fmt[80];
|
||||||
|
@ -68,8 +70,7 @@ strace_vsprintf (char *buf, const char *infmt, va_list ap)
|
||||||
DWORD err = GetLastError ();
|
DWORD err = GetLastError ();
|
||||||
const char *tn = threadname (0);
|
const char *tn = threadname (0);
|
||||||
|
|
||||||
static int lmicrosec = 0;
|
int microsec = microseconds ();
|
||||||
int microsec = strace_microseconds ();
|
|
||||||
lmicrosec = microsec;
|
lmicrosec = microsec;
|
||||||
|
|
||||||
__small_sprintf (fmt, "%7d [%s] %s ", microsec, tn, "%s %d%s");
|
__small_sprintf (fmt, "%7d [%s] %s ", microsec, tn, "%s %d%s");
|
||||||
|
@ -125,8 +126,8 @@ done:
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Write to strace file or strace queue. */
|
/* Write to strace file or strace queue. */
|
||||||
static void
|
void
|
||||||
strace_write (unsigned category, const char *buf, int count)
|
strace::write (unsigned category, const char *buf, int count)
|
||||||
{
|
{
|
||||||
# define PREFIX (3 + 8 + 1 + 8 + 1)
|
# define PREFIX (3 + 8 + 1 + 8 + 1)
|
||||||
char outbuf[PREFIX + 1 + count + 1];
|
char outbuf[PREFIX + 1 + count + 1];
|
||||||
|
@ -141,10 +142,10 @@ strace_write (unsigned category, const char *buf, int count)
|
||||||
Warning: DO NOT SET ERRNO HERE! */
|
Warning: DO NOT SET ERRNO HERE! */
|
||||||
|
|
||||||
void
|
void
|
||||||
strace_printf (unsigned category, const char *fmt,...)
|
strace::prntf (unsigned category, const char *fmt,...)
|
||||||
{
|
{
|
||||||
DWORD err = GetLastError ();
|
DWORD err = GetLastError ();
|
||||||
if (strace_active)
|
if (active)
|
||||||
{
|
{
|
||||||
int count;
|
int count;
|
||||||
va_list ap;
|
va_list ap;
|
||||||
|
@ -153,11 +154,11 @@ strace_printf (unsigned category, const char *fmt,...)
|
||||||
PROTECT(buf);
|
PROTECT(buf);
|
||||||
va_start (ap, fmt);
|
va_start (ap, fmt);
|
||||||
SetLastError (err);
|
SetLastError (err);
|
||||||
count = strace_vsprintf (buf, fmt, ap);
|
count = this->vsprntf (buf, fmt, ap);
|
||||||
va_end (ap);
|
va_end (ap);
|
||||||
CHECK(buf);
|
CHECK(buf);
|
||||||
|
|
||||||
strace_write (category, buf, count);
|
this->write (category, buf, count);
|
||||||
}
|
}
|
||||||
SetLastError (err);
|
SetLastError (err);
|
||||||
}
|
}
|
||||||
|
@ -325,9 +326,10 @@ ta[] =
|
||||||
{ WM_ASYNCIO, "ASYNCIO" },
|
{ WM_ASYNCIO, "ASYNCIO" },
|
||||||
{ 0, 0 }};
|
{ 0, 0 }};
|
||||||
|
|
||||||
void _strace_wm (int message, int word, int lon)
|
void
|
||||||
|
strace::wm (int message, int word, int lon)
|
||||||
{
|
{
|
||||||
if (strace_active)
|
if (active)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@ -335,11 +337,11 @@ void _strace_wm (int message, int word, int lon)
|
||||||
{
|
{
|
||||||
if (ta[i].v == message)
|
if (ta[i].v == message)
|
||||||
{
|
{
|
||||||
strace_printf (_STRACE_WM, "wndproc %d %s %d %d", message, ta[i].n, word, lon);
|
this->prntf (_STRACE_WM, "wndproc %d %s %d %d", message, ta[i].n, word, lon);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
strace_printf (_STRACE_WM, "wndproc %d unknown %d %d", message, word, lon);
|
this->prntf (_STRACE_WM, "wndproc %d unknown %d %d", message, word, lon);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -356,7 +358,7 @@ __system_printf (const char *fmt,...)
|
||||||
|
|
||||||
PROTECT (buf);
|
PROTECT (buf);
|
||||||
va_start (ap, fmt);
|
va_start (ap, fmt);
|
||||||
count = strace_vsprintf (buf, fmt, ap);
|
count = strace.vsprntf (buf, fmt, ap);
|
||||||
va_end (ap);
|
va_end (ap);
|
||||||
CHECK (buf);
|
CHECK (buf);
|
||||||
|
|
||||||
|
@ -365,25 +367,12 @@ __system_printf (const char *fmt,...)
|
||||||
FlushFileBuffers (GetStdHandle (STD_ERROR_HANDLE));
|
FlushFileBuffers (GetStdHandle (STD_ERROR_HANDLE));
|
||||||
|
|
||||||
#ifndef NOSTRACE
|
#ifndef NOSTRACE
|
||||||
if (strace_active)
|
if (strace.active)
|
||||||
strace_write (1, buf, count);
|
strace.write (1, buf, count);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef DEBUGGING
|
#ifdef DEBUGGING
|
||||||
// try_to_debug ();
|
// try_to_debug ();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
/* empty functions for when strace is disabled */
|
|
||||||
|
|
||||||
void
|
|
||||||
strace_init (const char *buf)
|
|
||||||
{}
|
|
||||||
|
|
||||||
extern "C" {
|
|
||||||
void _strace_wm (int message, int word, int lon)
|
|
||||||
{}
|
|
||||||
}
|
|
||||||
#endif /*NOSTRACE*/
|
#endif /*NOSTRACE*/
|
||||||
|
|
|
@ -24,7 +24,7 @@ static LRESULT CALLBACK
|
||||||
WndProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
WndProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
#ifndef NOSTRACE
|
#ifndef NOSTRACE
|
||||||
_strace_wm (uMsg, wParam, lParam);
|
strace.wm (uMsg, wParam, lParam);
|
||||||
#endif
|
#endif
|
||||||
switch (uMsg)
|
switch (uMsg)
|
||||||
{
|
{
|
||||||
|
|
|
@ -392,8 +392,7 @@ void events_terminate (void);
|
||||||
|
|
||||||
void __stdcall close_all_files (void);
|
void __stdcall close_all_files (void);
|
||||||
|
|
||||||
/* Strace facility. See strace.cc, sys/strace.h and utils/strace.cc. */
|
extern class strace strace;
|
||||||
extern DWORD strace_active;
|
|
||||||
|
|
||||||
/* Invisible window initialization/termination. */
|
/* Invisible window initialization/termination. */
|
||||||
HWND __stdcall gethwnd (void);
|
HWND __stdcall gethwnd (void);
|
||||||
|
|
Loading…
Reference in New Issue