msvcrt: Use %#I64x format in traces.

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Piotr Caban 2022-02-08 19:38:57 +01:00 committed by Alexandre Julliard
parent 9b802a3d56
commit 83fb79d41d
7 changed files with 36 additions and 39 deletions

View File

@ -2731,7 +2731,7 @@ void __cdecl Concurrency_wait(unsigned int time)
/* ?_Trace_agents@Concurrency@@YAXW4Agents_EventType@1@_JZZ */ /* ?_Trace_agents@Concurrency@@YAXW4Agents_EventType@1@_JZZ */
void WINAPIV _Trace_agents(/*enum Concurrency::Agents_EventType*/int type, __int64 id, ...) void WINAPIV _Trace_agents(/*enum Concurrency::Agents_EventType*/int type, __int64 id, ...)
{ {
FIXME("(%d %s)\n", type, wine_dbgstr_longlong(id)); FIXME("(%d %#I64x)\n", type, id);
} }
#endif #endif

View File

@ -578,7 +578,7 @@ int CDECL __conio_common_vcprintf(unsigned __int64 options, const char* format,
_locale_t locale, va_list valist) _locale_t locale, va_list valist)
{ {
if (options & ~UCRTBASE_PRINTF_MASK) if (options & ~UCRTBASE_PRINTF_MASK)
FIXME("options %s not handled\n", wine_dbgstr_longlong(options)); FIXME("options %#I64x not handled\n", options);
return pf_printf_a(puts_clbk_console_a, NULL, format, locale, return pf_printf_a(puts_clbk_console_a, NULL, format, locale,
options & UCRTBASE_PRINTF_MASK, arg_clbk_valist, NULL, &valist); options & UCRTBASE_PRINTF_MASK, arg_clbk_valist, NULL, &valist);
} }
@ -590,7 +590,7 @@ int CDECL __conio_common_vcwprintf(unsigned __int64 options, const wchar_t* form
_locale_t locale, va_list valist) _locale_t locale, va_list valist)
{ {
if (options & ~UCRTBASE_PRINTF_MASK) if (options & ~UCRTBASE_PRINTF_MASK)
FIXME("options %s not handled\n", wine_dbgstr_longlong(options)); FIXME("options %#I64x not handled\n", options);
return pf_printf_w(puts_clbk_console_w, NULL, format, locale, return pf_printf_w(puts_clbk_console_w, NULL, format, locale,
options & UCRTBASE_PRINTF_MASK, arg_clbk_valist, NULL, &valist); options & UCRTBASE_PRINTF_MASK, arg_clbk_valist, NULL, &valist);
} }

View File

@ -738,8 +738,8 @@ void __cdecl _local_unwind( void *frame, void *target )
int __cdecl _fpieee_flt(__msvcrt_ulong exception_code, EXCEPTION_POINTERS *ep, int __cdecl _fpieee_flt(__msvcrt_ulong exception_code, EXCEPTION_POINTERS *ep,
int (__cdecl *handler)(_FPIEEE_RECORD*)) int (__cdecl *handler)(_FPIEEE_RECORD*))
{ {
FIXME("(%lx %p %p) opcode: %s\n", exception_code, ep, handler, FIXME("(%lx %p %p) opcode: %#I64x\n", exception_code, ep, handler,
wine_dbgstr_longlong(*(ULONG64*)ep->ContextRecord->Rip)); *(ULONG64*)ep->ContextRecord->Rip);
return EXCEPTION_CONTINUE_SEARCH; return EXCEPTION_CONTINUE_SEARCH;
} }

View File

@ -1290,11 +1290,10 @@ __int64 CDECL _lseeki64(int fd, __int64 offset, int whence)
return -1; return -1;
} }
TRACE(":fd (%d) to %s pos %s\n", TRACE(":fd (%d) to %#I64x pos %s\n",
fd,wine_dbgstr_longlong(offset), fd, offset, (whence == SEEK_SET) ? "SEEK_SET" :
(whence==SEEK_SET)?"SEEK_SET": (whence == SEEK_CUR) ? "SEEK_CUR" :
(whence==SEEK_CUR)?"SEEK_CUR": (whence == SEEK_END) ? "SEEK_END" : "UNKNOWN");
(whence==SEEK_END)?"SEEK_END":"UNKNOWN");
/* The MoleBox protection scheme expects msvcrt to use SetFilePointer only, /* The MoleBox protection scheme expects msvcrt to use SetFilePointer only,
* so a LARGE_INTEGER offset cannot be passed directly via SetFilePointerEx. */ * so a LARGE_INTEGER offset cannot be passed directly via SetFilePointerEx. */
@ -1468,7 +1467,7 @@ int CDECL _chsize_s(int fd, __int64 size)
__int64 cur, pos; __int64 cur, pos;
BOOL ret = FALSE; BOOL ret = FALSE;
TRACE("(fd=%d, size=%s)\n", fd, wine_dbgstr_longlong(size)); TRACE("(fd=%d, size=%#I64x)\n", fd, size);
if (!MSVCRT_CHECK_PMT(size >= 0)) return EINVAL; if (!MSVCRT_CHECK_PMT(size >= 0)) return EINVAL;
@ -3061,9 +3060,8 @@ int CDECL _stat64(const char* path, struct _stat64 * buf)
buf->st_atime = dw; buf->st_atime = dw;
RtlTimeToSecondsSince1970((LARGE_INTEGER *)&hfi.ftLastWriteTime, &dw); RtlTimeToSecondsSince1970((LARGE_INTEGER *)&hfi.ftLastWriteTime, &dw);
buf->st_mtime = buf->st_ctime = dw; buf->st_mtime = buf->st_ctime = dw;
TRACE("%d %d 0x%08x%08x %d %d %d\n", buf->st_mode,buf->st_nlink, TRACE("%d %d %#I64x %I64d %I64d %I64d\n", buf->st_mode, buf->st_nlink,
(int)(buf->st_size >> 32),(int)buf->st_size, buf->st_size, buf->st_atime, buf->st_mtime, buf->st_ctime);
(int)buf->st_atime,(int)buf->st_mtime,(int)buf->st_ctime);
return 0; return 0;
} }
@ -3212,9 +3210,8 @@ int CDECL _wstat64(const wchar_t* path, struct _stat64 * buf)
buf->st_atime = dw; buf->st_atime = dw;
RtlTimeToSecondsSince1970((LARGE_INTEGER *)&hfi.ftLastWriteTime, &dw); RtlTimeToSecondsSince1970((LARGE_INTEGER *)&hfi.ftLastWriteTime, &dw);
buf->st_mtime = buf->st_ctime = dw; buf->st_mtime = buf->st_ctime = dw;
TRACE("%d %d 0x%08x%08x %d %d %d\n", buf->st_mode,buf->st_nlink, TRACE("%d %d %#I64x %I64d %I64d %I64d\n", buf->st_mode, buf->st_nlink,
(int)(buf->st_size >> 32),(int)buf->st_size, buf->st_size, buf->st_atime, buf->st_mtime, buf->st_ctime);
(int)buf->st_atime,(int)buf->st_mtime,(int)buf->st_ctime);
return 0; return 0;
} }
@ -5272,7 +5269,7 @@ int CDECL _stdio_common_vfprintf(unsigned __int64 options, FILE *file, const cha
_locale_t locale, va_list valist) _locale_t locale, va_list valist)
{ {
if (options & ~UCRTBASE_PRINTF_MASK) if (options & ~UCRTBASE_PRINTF_MASK)
FIXME("options %s not handled\n", wine_dbgstr_longlong(options)); FIXME("options %#I64x not handled\n", options);
return vfprintf_helper(options & UCRTBASE_PRINTF_MASK, file, format, locale, valist); return vfprintf_helper(options & UCRTBASE_PRINTF_MASK, file, format, locale, valist);
} }
@ -5284,7 +5281,7 @@ int CDECL __stdio_common_vfprintf_p(unsigned __int64 options, FILE *file, const
_locale_t locale, va_list valist) _locale_t locale, va_list valist)
{ {
if (options & ~UCRTBASE_PRINTF_MASK) if (options & ~UCRTBASE_PRINTF_MASK)
FIXME("options %s not handled\n", wine_dbgstr_longlong(options)); FIXME("options %#I64x not handled\n", options);
return vfprintf_helper((options & UCRTBASE_PRINTF_MASK) | MSVCRT_PRINTF_POSITIONAL_PARAMS return vfprintf_helper((options & UCRTBASE_PRINTF_MASK) | MSVCRT_PRINTF_POSITIONAL_PARAMS
| MSVCRT_PRINTF_INVOKE_INVALID_PARAM_HANDLER, file, format, locale, valist); | MSVCRT_PRINTF_INVOKE_INVALID_PARAM_HANDLER, file, format, locale, valist);
@ -5298,7 +5295,7 @@ int CDECL __stdio_common_vfprintf_s(unsigned __int64 options, FILE *file, const
_locale_t locale, va_list valist) _locale_t locale, va_list valist)
{ {
if (options & ~UCRTBASE_PRINTF_MASK) if (options & ~UCRTBASE_PRINTF_MASK)
FIXME("options %s not handled\n", wine_dbgstr_longlong(options)); FIXME("options %#I64x not handled\n", options);
return vfprintf_helper((options & UCRTBASE_PRINTF_MASK) | MSVCRT_PRINTF_INVOKE_INVALID_PARAM_HANDLER, return vfprintf_helper((options & UCRTBASE_PRINTF_MASK) | MSVCRT_PRINTF_INVOKE_INVALID_PARAM_HANDLER,
file, format, locale, valist); file, format, locale, valist);
@ -5311,7 +5308,7 @@ int CDECL __stdio_common_vfwprintf(unsigned __int64 options, FILE *file, const w
_locale_t locale, va_list valist) _locale_t locale, va_list valist)
{ {
if (options & ~UCRTBASE_PRINTF_MASK) if (options & ~UCRTBASE_PRINTF_MASK)
FIXME("options %s not handled\n", wine_dbgstr_longlong(options)); FIXME("options %#I64x not handled\n", options);
return vfwprintf_helper(options & UCRTBASE_PRINTF_MASK, file, format, locale, valist); return vfwprintf_helper(options & UCRTBASE_PRINTF_MASK, file, format, locale, valist);
} }
@ -5323,7 +5320,7 @@ int CDECL __stdio_common_vfwprintf_p(unsigned __int64 options, FILE *file, const
_locale_t locale, va_list valist) _locale_t locale, va_list valist)
{ {
if (options & ~UCRTBASE_PRINTF_MASK) if (options & ~UCRTBASE_PRINTF_MASK)
FIXME("options %s not handled\n", wine_dbgstr_longlong(options)); FIXME("options %#I64x not handled\n", options);
return vfwprintf_helper((options & UCRTBASE_PRINTF_MASK) | MSVCRT_PRINTF_POSITIONAL_PARAMS return vfwprintf_helper((options & UCRTBASE_PRINTF_MASK) | MSVCRT_PRINTF_POSITIONAL_PARAMS
| MSVCRT_PRINTF_INVOKE_INVALID_PARAM_HANDLER, file, format, locale, valist); | MSVCRT_PRINTF_INVOKE_INVALID_PARAM_HANDLER, file, format, locale, valist);
@ -5337,7 +5334,7 @@ int CDECL __stdio_common_vfwprintf_s(unsigned __int64 options, FILE *file, const
_locale_t locale, va_list valist) _locale_t locale, va_list valist)
{ {
if (options & ~UCRTBASE_PRINTF_MASK) if (options & ~UCRTBASE_PRINTF_MASK)
FIXME("options %s not handled\n", wine_dbgstr_longlong(options)); FIXME("options %#I64x not handled\n", options);
return vfwprintf_helper((options & UCRTBASE_PRINTF_MASK) | MSVCRT_PRINTF_INVOKE_INVALID_PARAM_HANDLER, return vfwprintf_helper((options & UCRTBASE_PRINTF_MASK) | MSVCRT_PRINTF_INVOKE_INVALID_PARAM_HANDLER,
file, format, locale, valist); file, format, locale, valist);

View File

@ -674,7 +674,7 @@ int CDECL __stdio_common_vsscanf(unsigned __int64 options,
* scanf. LEGACY_MSVCRT_COMPATIBILITY affects parsing of nan/inf, * scanf. LEGACY_MSVCRT_COMPATIBILITY affects parsing of nan/inf,
* but parsing of those isn't implemented at all yet. */ * but parsing of those isn't implemented at all yet. */
if (options & ~UCRTBASE_SCANF_MASK) if (options & ~UCRTBASE_SCANF_MASK)
FIXME("options %s not handled\n", wine_dbgstr_longlong(options)); FIXME("options %#I64x not handled\n", options);
if (options & _CRT_INTERNAL_SCANF_SECURECRT) if (options & _CRT_INTERNAL_SCANF_SECURECRT)
return vsnscanf_s_l(input, length, format, locale, valist); return vsnscanf_s_l(input, length, format, locale, valist);
else else
@ -694,7 +694,7 @@ int CDECL __stdio_common_vswscanf(unsigned __int64 options,
* scanf. LEGACY_MSVCRT_COMPATIBILITY affects parsing of nan/inf, * scanf. LEGACY_MSVCRT_COMPATIBILITY affects parsing of nan/inf,
* but parsing of those isn't implemented at all yet. */ * but parsing of those isn't implemented at all yet. */
if (options & ~UCRTBASE_SCANF_MASK) if (options & ~UCRTBASE_SCANF_MASK)
FIXME("options %s not handled\n", wine_dbgstr_longlong(options)); FIXME("options %#I64x not handled\n", options);
if (options & _CRT_INTERNAL_SCANF_SECURECRT) if (options & _CRT_INTERNAL_SCANF_SECURECRT)
return vsnwscanf_s_l(input, length, format, locale, valist); return vsnwscanf_s_l(input, length, format, locale, valist);
else else
@ -711,7 +711,7 @@ int CDECL __stdio_common_vfscanf(unsigned __int64 options,
va_list valist) va_list valist)
{ {
if (options & ~_CRT_INTERNAL_SCANF_SECURECRT) if (options & ~_CRT_INTERNAL_SCANF_SECURECRT)
FIXME("options %s not handled\n", wine_dbgstr_longlong(options)); FIXME("options %#I64x not handled\n", options);
if (options & _CRT_INTERNAL_SCANF_SECURECRT) if (options & _CRT_INTERNAL_SCANF_SECURECRT)
return vfscanf_s_l(file, format, locale, valist); return vfscanf_s_l(file, format, locale, valist);
else else
@ -728,7 +728,7 @@ int CDECL __stdio_common_vfwscanf(unsigned __int64 options,
va_list valist) va_list valist)
{ {
if (options & ~_CRT_INTERNAL_SCANF_SECURECRT) if (options & ~_CRT_INTERNAL_SCANF_SECURECRT)
FIXME("options %s not handled\n", wine_dbgstr_longlong(options)); FIXME("options %#I64x not handled\n", options);
if (options & _CRT_INTERNAL_SCANF_SECURECRT) if (options & _CRT_INTERNAL_SCANF_SECURECRT)
return vfwscanf_s_l(file, format, locale, valist); return vfwscanf_s_l(file, format, locale, valist);
else else

View File

@ -377,8 +377,8 @@ int fpnum_double(struct fpnum *fp, double *d)
return 0; return 0;
} }
TRACE("%c %s *2^%d (round %d)\n", fp->sign == -1 ? '-' : '+', TRACE("%c %#I64x *2^%d (round %d)\n", fp->sign == -1 ? '-' : '+',
wine_dbgstr_longlong(fp->m), fp->exp, fp->mod); fp->m, fp->exp, fp->mod);
if (!fp->m) if (!fp->m)
{ {
*d = fp->sign * 0.0; *d = fp->sign * 0.0;
@ -467,7 +467,7 @@ int fpnum_double(struct fpnum *fp, double *d)
bits |= (ULONGLONG)fp->exp << (MANT_BITS - 1); bits |= (ULONGLONG)fp->exp << (MANT_BITS - 1);
bits |= fp->m & (((ULONGLONG)1 << (MANT_BITS - 1)) - 1); bits |= fp->m & (((ULONGLONG)1 << (MANT_BITS - 1)) - 1);
TRACE("returning %s\n", wine_dbgstr_longlong(bits)); TRACE("returning %#I64x\n", bits);
*d = *(double*)&bits; *d = *(double*)&bits;
return 0; return 0;
} }
@ -496,8 +496,8 @@ int fpnum_ldouble(struct fpnum *fp, MSVCRT__LDOUBLE *d)
return 0; return 0;
} }
TRACE("%c %s *2^%d (round %d)\n", fp->sign == -1 ? '-' : '+', TRACE("%c %#I64x *2^%d (round %d)\n", fp->sign == -1 ? '-' : '+',
wine_dbgstr_longlong(fp->m), fp->exp, fp->mod); fp->m, fp->exp, fp->mod);
if (!fp->m) if (!fp->m)
{ {
d->x80[0] = 0; d->x80[0] = 0;

View File

@ -919,7 +919,7 @@ int CDECL __stdio_common_vsprintf( unsigned __int64 options, char *str, size_t l
int ret; int ret;
if (options & ~UCRTBASE_PRINTF_MASK) if (options & ~UCRTBASE_PRINTF_MASK)
FIXME("options %s not handled\n", wine_dbgstr_longlong(options)); FIXME("options %#I64x not handled\n", options);
ret = pf_printf_a(puts_clbk_str_c99_a, ret = pf_printf_a(puts_clbk_str_c99_a,
&ctx, format, (_locale_t)locale, options & UCRTBASE_PRINTF_MASK, arg_clbk_valist, NULL, &valist); &ctx, format, (_locale_t)locale, options & UCRTBASE_PRINTF_MASK, arg_clbk_valist, NULL, &valist);
puts_clbk_str_a(&ctx, 1, &nullbyte); puts_clbk_str_a(&ctx, 1, &nullbyte);
@ -1110,7 +1110,7 @@ int CDECL __stdio_common_vsnprintf_s( unsigned __int64 options,
const char *format, _locale_t locale, va_list valist ) const char *format, _locale_t locale, va_list valist )
{ {
if (options & ~UCRTBASE_PRINTF_MASK) if (options & ~UCRTBASE_PRINTF_MASK)
FIXME("options %s not handled\n", wine_dbgstr_longlong(options)); FIXME("options %#I64x not handled\n", options);
return vsnprintf_s_l_opt(str, sizeOfBuffer, count, format, options & UCRTBASE_PRINTF_MASK, locale, valist); return vsnprintf_s_l_opt(str, sizeOfBuffer, count, format, options & UCRTBASE_PRINTF_MASK, locale, valist);
} }
@ -1122,7 +1122,7 @@ int CDECL __stdio_common_vsnwprintf_s( unsigned __int64 options,
const wchar_t *format, _locale_t locale, va_list valist ) const wchar_t *format, _locale_t locale, va_list valist )
{ {
if (options & ~UCRTBASE_PRINTF_MASK) if (options & ~UCRTBASE_PRINTF_MASK)
FIXME("options %s not handled\n", wine_dbgstr_longlong(options)); FIXME("options %#I64x not handled\n", options);
return vsnwprintf_s_l_opt(str, sizeOfBuffer, count, format, options & UCRTBASE_PRINTF_MASK, locale, valist); return vsnwprintf_s_l_opt(str, sizeOfBuffer, count, format, options & UCRTBASE_PRINTF_MASK, locale, valist);
} }
@ -1144,7 +1144,7 @@ int CDECL __stdio_common_vsprintf_s( unsigned __int64 options,
_locale_t locale, va_list valist ) _locale_t locale, va_list valist )
{ {
if (options & ~UCRTBASE_PRINTF_MASK) if (options & ~UCRTBASE_PRINTF_MASK)
FIXME("options %s not handled\n", wine_dbgstr_longlong(options)); FIXME("options %#I64x not handled\n", options);
return vsnprintf_s_l_opt(str, INT_MAX, count, format, options & UCRTBASE_PRINTF_MASK, locale, valist); return vsnprintf_s_l_opt(str, INT_MAX, count, format, options & UCRTBASE_PRINTF_MASK, locale, valist);
} }
@ -1419,7 +1419,7 @@ int CDECL __stdio_common_vswprintf_p( unsigned __int64 options,
_locale_t locale, va_list valist ) _locale_t locale, va_list valist )
{ {
if (options & ~UCRTBASE_PRINTF_MASK) if (options & ~UCRTBASE_PRINTF_MASK)
FIXME("options %s not handled\n", wine_dbgstr_longlong(options)); FIXME("options %#I64x not handled\n", options);
return vswprintf_p_l_opt(str, count, format, options & UCRTBASE_PRINTF_MASK, locale, valist); return vswprintf_p_l_opt(str, count, format, options & UCRTBASE_PRINTF_MASK, locale, valist);
} }
#endif #endif
@ -1532,7 +1532,7 @@ int CDECL __stdio_common_vswprintf( unsigned __int64 options,
int ret; int ret;
if (options & ~UCRTBASE_PRINTF_MASK) if (options & ~UCRTBASE_PRINTF_MASK)
FIXME("options %s not handled\n", wine_dbgstr_longlong(options)); FIXME("options %#I64x not handled\n", options);
ret = pf_printf_w(puts_clbk_str_c99_w, ret = pf_printf_w(puts_clbk_str_c99_w,
&ctx, format, locale, options & UCRTBASE_PRINTF_MASK, arg_clbk_valist, NULL, &valist); &ctx, format, locale, options & UCRTBASE_PRINTF_MASK, arg_clbk_valist, NULL, &valist);
puts_clbk_str_w(&ctx, 1, L""); puts_clbk_str_w(&ctx, 1, L"");
@ -1795,7 +1795,7 @@ int CDECL __stdio_common_vsprintf_p(unsigned __int64 options, char *buffer, size
const char *format, _locale_t locale, va_list args) const char *format, _locale_t locale, va_list args)
{ {
if (options & ~UCRTBASE_PRINTF_MASK) if (options & ~UCRTBASE_PRINTF_MASK)
FIXME("options %s not handled\n", wine_dbgstr_longlong(options)); FIXME("options %#I64x not handled\n", options);
return vsprintf_p_l_opt(buffer, length, format, options & UCRTBASE_PRINTF_MASK, locale, args); return vsprintf_p_l_opt(buffer, length, format, options & UCRTBASE_PRINTF_MASK, locale, args);
} }
#endif #endif