* strace.cc (strace::prntf): Make second argument the function name, rather

than use special format options.
(strace::vprntf): Ditto.
(getfunc): New function.
* include/sys/strace.h: Reflect above changes.
* smallprint.c (__small_vsprintf): Eliminate '%F' formatting.
* pinfo.cc (set_myself): Modify for new strace::prntf parameter.
* errno.cc (seterrno_from_win_error): Ditto.
* fhandler_tty.cc (fhandler_tty_common::__acquire_output_mutex): Ditto.
* fhandler_tty.cc (fhandler_tty_common::__release_output_mutex): Ditto.
This commit is contained in:
Christopher Faylor
2000-08-02 19:26:01 +00:00
parent 5a7b5870ff
commit 20d7f75837
8 changed files with 79 additions and 61 deletions

View File

@@ -24,14 +24,14 @@
class strace
{
int microseconds ();
int vsprntf (char *buf, const char *infmt, va_list ap);
int vsprntf (char *buf, const char *func, 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, const char *, ...);
void prntf (unsigned, const char *func, const char *, ...);
void wm (int message, int word, int lon);
};
@@ -74,7 +74,7 @@ extern "C" void small_printf (const char *, ...);
#define define_strace0(c,...) \
do { \
if ((c & _STRACE_SYSTEM) || strace.active) \
strace.prntf (c, "%F: " __VA_ARGS__); \
strace.prntf (c, __PRETTY_FUNCTION__, __VA_ARGS__); \
} \
while (0)
@@ -96,13 +96,13 @@ extern "C" void small_printf (const char *, ...);
#define strace_printf_wrap(what, fmt, args...) \
((void) ({\
if (strace.active) \
strace.prntf(_STRACE_ ## what, "%F: " fmt, __PRETTY_FUNCTION__ , ## args); \
strace.prntf(_STRACE_ ## what, __PRETTY_FUNCTION__, fmt, ## args); \
0; \
}))
#define strace_printf_wrap1(what, fmt, args...) \
((void) ({\
if (strace.active) \
strace.prntf((_STRACE_ ## what) | _STRACE_NOTALL, "%F: " fmt, __PRETTY_FUNCTION__ , ## args); \
strace.prntf((_STRACE_ ## what) | _STRACE_NOTALL, __PRETTY_FUNCTION__, fmt, ## args); \
0; \
}))