Commit c302b287 authored by Alexandre Julliard's avatar Alexandre Julliard

ntdll: Fix trace formats for 64-bit values on ARM64.

parent abf03748
......@@ -83,7 +83,7 @@ static void dump_scope_table( ULONG64 base, const SCOPE_TABLE *table )
TRACE( "scope table at %p\n", table );
for (i = 0; i < table->Count; i++)
TRACE( " %u: %lx-%lx handler %lx target %lx\n", i,
TRACE( " %u: %I64x-%I64x handler %I64x target %I64x\n", i,
base + table->ScopeRecord[i].BeginAddress,
base + table->ScopeRecord[i].EndAddress,
base + table->ScopeRecord[i].HandlerAddress,
......@@ -276,7 +276,7 @@ static DWORD call_unwind_handler( EXCEPTION_RECORD *rec, DISPATCHER_CONTEXT *dis
frame.dispatch = dispatch;
__wine_push_frame( &frame.frame );
TRACE( "calling handler %p (rec=%p, frame=0x%lx context=%p, dispatch=%p)\n",
TRACE( "calling handler %p (rec=%p, frame=%I64x context=%p, dispatch=%p)\n",
dispatch->LanguageHandler, rec, dispatch->EstablisherFrame, dispatch->ContextRecord, dispatch );
res = dispatch->LanguageHandler( rec, (void *)dispatch->EstablisherFrame, dispatch->ContextRecord, dispatch );
TRACE( "handler %p returned %x\n", dispatch->LanguageHandler, res );
......@@ -350,7 +350,7 @@ static DWORD call_handler( EXCEPTION_RECORD *rec, CONTEXT *context, DISPATCHER_C
frame.Handler = nested_exception_handler;
__wine_push_frame( &frame );
TRACE( "calling handler %p (rec=%p, frame=0x%lx context=%p, dispatch=%p)\n",
TRACE( "calling handler %p (rec=%p, frame=%I64x context=%p, dispatch=%p)\n",
dispatch->LanguageHandler, rec, dispatch->EstablisherFrame, dispatch->ContextRecord, dispatch );
res = dispatch->LanguageHandler( rec, (void *)dispatch->EstablisherFrame, context, dispatch );
TRACE( "handler at %p returned %u\n", dispatch->LanguageHandler, res );
......@@ -410,7 +410,7 @@ static NTSTATUS call_function_handlers( EXCEPTION_RECORD *rec, CONTEXT *orig_con
if (!is_valid_frame( dispatch.EstablisherFrame ))
{
ERR( "invalid frame %lx (%p-%p)\n", dispatch.EstablisherFrame,
ERR( "invalid frame %I64x (%p-%p)\n", dispatch.EstablisherFrame,
NtCurrentTeb()->Tib.StackLimit, NtCurrentTeb()->Tib.StackBase );
rec->ExceptionFlags |= EH_STACK_INVALID;
break;
......@@ -445,7 +445,7 @@ static NTSTATUS call_function_handlers( EXCEPTION_RECORD *rec, CONTEXT *orig_con
/* hack: call wine handlers registered in the tib list */
else while ((ULONG64)teb_frame < context.Sp)
{
TRACE( "found wine frame %p rsp %lx handler %p\n",
TRACE( "found wine frame %p rsp %I64x handler %p\n",
teb_frame, context.Sp, teb_frame->Handler );
dispatch.EstablisherFrame = (ULONG64)teb_frame;
switch (call_teb_handler( rec, orig_context, &dispatch, teb_frame ))
......@@ -490,11 +490,11 @@ NTSTATUS WINAPI KiUserExceptionDispatcher( EXCEPTION_RECORD *rec, CONTEXT *conte
NTSTATUS status;
DWORD c;
TRACE( "code=%x flags=%x addr=%p pc=%lx tid=%04x\n",
TRACE( "code=%x flags=%x addr=%p pc=%016I64x tid=%04x\n",
rec->ExceptionCode, rec->ExceptionFlags, rec->ExceptionAddress,
context->Pc, GetCurrentThreadId() );
for (c = 0; c < rec->NumberParameters; c++)
TRACE( " info[%d]=%016lx\n", c, rec->ExceptionInformation[c] );
TRACE( " info[%d]=%016I64x\n", c, rec->ExceptionInformation[c] );
if (rec->ExceptionCode == EXCEPTION_WINE_STUB)
{
......@@ -530,21 +530,21 @@ NTSTATUS WINAPI KiUserExceptionDispatcher( EXCEPTION_RECORD *rec, CONTEXT *conte
else
WARN( "%s exception (code=%x) raised\n", debugstr_exception_code(rec->ExceptionCode), rec->ExceptionCode );
TRACE(" x0=%016lx x1=%016lx x2=%016lx x3=%016lx\n",
TRACE(" x0=%016I64x x1=%016I64x x2=%016I64x x3=%016I64x\n",
context->u.s.X0, context->u.s.X1, context->u.s.X2, context->u.s.X3 );
TRACE(" x4=%016lx x5=%016lx x6=%016lx x7=%016lx\n",
TRACE(" x4=%016I64x x5=%016I64x x6=%016I64x x7=%016I64x\n",
context->u.s.X4, context->u.s.X5, context->u.s.X6, context->u.s.X7 );
TRACE(" x8=%016lx x9=%016lx x10=%016lx x11=%016lx\n",
TRACE(" x8=%016I64x x9=%016I64x x10=%016I64x x11=%016I64x\n",
context->u.s.X8, context->u.s.X9, context->u.s.X10, context->u.s.X11 );
TRACE(" x12=%016lx x13=%016lx x14=%016lx x15=%016lx\n",
TRACE(" x12=%016I64x x13=%016I64x x14=%016I64x x15=%016I64x\n",
context->u.s.X12, context->u.s.X13, context->u.s.X14, context->u.s.X15 );
TRACE(" x16=%016lx x17=%016lx x18=%016lx x19=%016lx\n",
TRACE(" x16=%016I64x x17=%016I64x x18=%016I64x x19=%016I64x\n",
context->u.s.X16, context->u.s.X17, context->u.s.X18, context->u.s.X19 );
TRACE(" x20=%016lx x21=%016lx x22=%016lx x23=%016lx\n",
TRACE(" x20=%016I64x x21=%016I64x x22=%016I64x x23=%016I64x\n",
context->u.s.X20, context->u.s.X21, context->u.s.X22, context->u.s.X23 );
TRACE(" x24=%016lx x25=%016lx x26=%016lx x27=%016lx\n",
TRACE(" x24=%016I64x x25=%016I64x x26=%016I64x x27=%016I64x\n",
context->u.s.X24, context->u.s.X25, context->u.s.X26, context->u.s.X27 );
TRACE(" x28=%016lx fp=%016lx lr=%016lx sp=%016lx\n",
TRACE(" x28=%016I64x fp=%016I64x lr=%016I64x sp=%016I64x\n",
context->u.s.X28, context->u.s.Fp, context->u.s.Lr, context->Sp );
}
......@@ -788,7 +788,7 @@ static void *unwind_packed_data( ULONG_PTR base, ULONG_PTR pc, RUNTIME_FUNCTION
unsigned int int_size = func->u.s.RegI * 8, fp_size = func->u.s.RegF * 8, regsave, local_size;
unsigned int int_regs, fp_regs, saved_regs, local_size_regs;
TRACE( "function %lx-%lx: len=%#x flag=%x regF=%u regI=%u H=%u CR=%u frame=%x\n",
TRACE( "function %I64x-%I64x: len=%#x flag=%x regF=%u regI=%u H=%u CR=%u frame=%x\n",
base + func->BeginAddress, base + func->BeginAddress + func->u.s.FunctionLength * 4,
func->u.s.FunctionLength, func->u.s.Flag, func->u.s.RegF, func->u.s.RegI,
func->u.s.H, func->u.s.CR, func->u.s.FrameSize );
......@@ -958,7 +958,7 @@ static void *unwind_full_data( ULONG_PTR base, ULONG_PTR pc, RUNTIME_FUNCTION *f
offset = ((pc - base) - func->BeginAddress) / 4;
end = (BYTE *)data + codes * 4;
TRACE( "function %lx-%lx: len=%#x ver=%u X=%u E=%u epilogs=%u codes=%u\n",
TRACE( "function %I64x-%I64x: len=%#x ver=%u X=%u E=%u epilogs=%u codes=%u\n",
base + func->BeginAddress, base + func->BeginAddress + info->function_length * 4,
info->function_length, info->version, info->x, info->e, epilogs, codes * 4 );
......@@ -1025,7 +1025,7 @@ PVOID WINAPI RtlVirtualUnwind( ULONG type, ULONG_PTR base, ULONG_PTR pc,
{
void *handler;
TRACE( "type %x pc %lx sp %lx func %lx\n", type, pc, context->Sp, base + func->BeginAddress );
TRACE( "type %x pc %I64x sp %I64x func %I64x\n", type, pc, context->Sp, base + func->BeginAddress );
*handler_data = NULL;
......@@ -1035,7 +1035,7 @@ PVOID WINAPI RtlVirtualUnwind( ULONG type, ULONG_PTR base, ULONG_PTR pc,
else
handler = unwind_full_data( base, pc, func, context, handler_data, ctx_ptr );
TRACE( "ret: lr=%lx sp=%lx handler=%p\n", context->u.s.Lr, context->Sp, handler );
TRACE( "ret: lr=%I64x sp=%I64x handler=%p\n", context->u.s.Lr, context->Sp, handler );
if (!context->Pc)
context->Pc = context->u.s.Lr;
context->ContextFlags |= CONTEXT_UNWOUND_TO_CALL;
......@@ -1167,7 +1167,7 @@ void CDECL RtlRestoreContext( CONTEXT *context, EXCEPTION_RECORD *rec )
teb_frame = __wine_pop_frame( teb_frame );
}
TRACE( "returning to %lx stack %lx\n", context->Pc, context->Sp );
TRACE( "returning to %I64x stack %I64x\n", context->Pc, context->Sp );
NtContinue( context, FALSE );
}
......@@ -1200,25 +1200,25 @@ void WINAPI RtlUnwindEx( PVOID end_frame, PVOID target_ip, EXCEPTION_RECORD *rec
rec->ExceptionFlags |= EH_UNWINDING | (end_frame ? 0 : EH_EXIT_UNWIND);
TRACE( "code=%x flags=%x end_frame=%p target_ip=%p pc=%016lx\n",
TRACE( "code=%x flags=%x end_frame=%p target_ip=%p pc=%016I64x\n",
rec->ExceptionCode, rec->ExceptionFlags, end_frame, target_ip, context->Pc );
for (i = 0; i < min( EXCEPTION_MAXIMUM_PARAMETERS, rec->NumberParameters ); i++)
TRACE( " info[%d]=%016lx\n", i, rec->ExceptionInformation[i] );
TRACE(" x0=%016lx x1=%016lx x2=%016lx x3=%016lx\n",
TRACE( " info[%d]=%016I64x\n", i, rec->ExceptionInformation[i] );
TRACE(" x0=%016I64x x1=%016I64x x2=%016I64x x3=%016I64x\n",
context->u.s.X0, context->u.s.X1, context->u.s.X2, context->u.s.X3 );
TRACE(" x4=%016lx x5=%016lx x6=%016lx x7=%016lx\n",
TRACE(" x4=%016I64x x5=%016I64x x6=%016I64x x7=%016I64x\n",
context->u.s.X4, context->u.s.X5, context->u.s.X6, context->u.s.X7 );
TRACE(" x8=%016lx x9=%016lx x10=%016lx x11=%016lx\n",
TRACE(" x8=%016I64x x9=%016I64x x10=%016I64x x11=%016I64x\n",
context->u.s.X8, context->u.s.X9, context->u.s.X10, context->u.s.X11 );
TRACE(" x12=%016lx x13=%016lx x14=%016lx x15=%016lx\n",
TRACE(" x12=%016I64x x13=%016I64x x14=%016I64x x15=%016I64x\n",
context->u.s.X12, context->u.s.X13, context->u.s.X14, context->u.s.X15 );
TRACE(" x16=%016lx x17=%016lx x18=%016lx x19=%016lx\n",
TRACE(" x16=%016I64x x17=%016I64x x18=%016I64x x19=%016I64x\n",
context->u.s.X16, context->u.s.X17, context->u.s.X18, context->u.s.X19 );
TRACE(" x20=%016lx x21=%016lx x22=%016lx x23=%016lx\n",
TRACE(" x20=%016I64x x21=%016I64x x22=%016I64x x23=%016I64x\n",
context->u.s.X20, context->u.s.X21, context->u.s.X22, context->u.s.X23 );
TRACE(" x24=%016lx x25=%016lx x26=%016lx x27=%016lx\n",
TRACE(" x24=%016I64x x25=%016I64x x26=%016I64x x27=%016I64x\n",
context->u.s.X24, context->u.s.X25, context->u.s.X26, context->u.s.X27 );
TRACE(" x28=%016lx fp=%016lx lr=%016lx sp=%016lx\n",
TRACE(" x28=%016I64x fp=%016I64x lr=%016I64x sp=%016I64x\n",
context->u.s.X28, context->u.s.Fp, context->u.s.Lr, context->Sp );
dispatch.TargetPc = (ULONG64)target_ip;
......@@ -1236,7 +1236,7 @@ void WINAPI RtlUnwindEx( PVOID end_frame, PVOID target_ip, EXCEPTION_RECORD *rec
if (!is_valid_frame( dispatch.EstablisherFrame ))
{
ERR( "invalid frame %lx (%p-%p)\n", dispatch.EstablisherFrame,
ERR( "invalid frame %I64x (%p-%p)\n", dispatch.EstablisherFrame,
NtCurrentTeb()->Tib.StackLimit, NtCurrentTeb()->Tib.StackBase );
rec->ExceptionFlags |= EH_STACK_INVALID;
break;
......@@ -1246,7 +1246,7 @@ void WINAPI RtlUnwindEx( PVOID end_frame, PVOID target_ip, EXCEPTION_RECORD *rec
{
if (end_frame && (dispatch.EstablisherFrame > (ULONG64)end_frame))
{
ERR( "invalid end frame %lx/%p\n", dispatch.EstablisherFrame, end_frame );
ERR( "invalid end frame %I64x/%p\n", dispatch.EstablisherFrame, end_frame );
raise_status( STATUS_INVALID_UNWIND_TARGET, rec );
}
if (dispatch.EstablisherFrame == (ULONG64)end_frame) rec->ExceptionFlags |= EH_TARGET_UNWIND;
......@@ -1452,7 +1452,7 @@ EXCEPTION_DISPOSITION WINAPI __C_specific_handler( EXCEPTION_RECORD *rec,
return ExceptionContinueExecution;
}
}
TRACE( "unwinding to target %lx\n", dispatch->ImageBase + table->ScopeRecord[i].JumpTarget );
TRACE( "unwinding to target %I64x\n", dispatch->ImageBase + table->ScopeRecord[i].JumpTarget );
RtlUnwindEx( frame, (char *)dispatch->ImageBase + table->ScopeRecord[i].JumpTarget,
rec, 0, dispatch->ContextRecord, dispatch->HistoryTable );
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment