Author: fireball
Date: Fri Sep 19 05:35:30 2008
New Revision: 36323
URL:
http://svn.reactos.org/svn/reactos?rev=36323&view=rev
Log:
- Get rid of sprintf usage in default_dbg_vprintf.
- This make tracing macro usage safe in crt sprintf implementation and simplify overall
codepath (no need for intermediate buffer).
- Solution inspired by hackbunny's suggestion, fixes bug 3632.
- Add vDbgPrintExWithPrefix to debugsup libraries.
See issue #3632 for more details.
Modified:
trunk/reactos/lib/3rdparty/libwine/debug.c
trunk/reactos/lib/debugsup/debugsup-ntos.def
Modified: trunk/reactos/lib/3rdparty/libwine/debug.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/3rdparty/libwine/debug…
==============================================================================
--- trunk/reactos/lib/3rdparty/libwine/debug.c [iso-8859-1] (original)
+++ trunk/reactos/lib/3rdparty/libwine/debug.c [iso-8859-1] Fri Sep 19 05:35:30 2008
@@ -36,11 +36,14 @@
#include <cmfuncs.h>
ULONG
-__cdecl
-DbgPrint(
- IN PCCH Format,
- IN ...
-);
+NTAPI
+vDbgPrintExWithPrefix(
+ IN LPCSTR Prefix,
+ IN ULONG ComponentId,
+ IN ULONG Level,
+ IN LPCSTR Format,
+ IN va_list ap);
+
static const char * const debug_classes[] = { "fixme", "err",
"warn", "trace" };
@@ -387,10 +390,7 @@
/* default implementation of wine_dbg_vprintf */
static int default_dbg_vprintf( const char *format, va_list args )
{
- char buffer[512];
- vsnprintf( buffer, sizeof(buffer), format, args );
- buffer[sizeof(buffer) - 1] = '\0';
- return DbgPrint( "%s", buffer );
+ return vDbgPrintExWithPrefix("", -1, 0, format, args);
}
Modified: trunk/reactos/lib/debugsup/debugsup-ntos.def
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/debugsup/debugsup-ntos…
==============================================================================
--- trunk/reactos/lib/debugsup/debugsup-ntos.def [iso-8859-1] (original)
+++ trunk/reactos/lib/debugsup/debugsup-ntos.def [iso-8859-1] Fri Sep 19 05:35:30 2008
@@ -4,6 +4,7 @@
DbgPrint
DbgPrompt@12
DbgPrintEx
+vDbgPrintExWithPrefix@20
RtlAssert@16
RtlUnwind@16