Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
c302b287
Commit
c302b287
authored
Nov 03, 2022
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Fix trace formats for 64-bit values on ARM64.
parent
abf03748
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
33 deletions
+33
-33
signal_arm64.c
dlls/ntdll/signal_arm64.c
+33
-33
No files found.
dlls/ntdll/signal_arm64.c
View file @
c302b287
...
...
@@ -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 %l
x
\n
"
,
i
,
TRACE
(
" %u: %
I64x-%I64x handler %I64x target %I64
x
\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%l
x context=%p, dispatch=%p)
\n
"
,
TRACE
(
"calling handler %p (rec=%p, frame=
%I64
x 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%l
x context=%p, dispatch=%p)
\n
"
,
TRACE
(
"calling handler %p (rec=%p, frame=
%I64
x 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 %
l
x (%p-%p)
\n
"
,
dispatch
.
EstablisherFrame
,
ERR
(
"invalid frame %
I64
x (%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 %
l
x handler %p
\n
"
,
TRACE
(
"found wine frame %p rsp %
I64
x 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=%
l
x tid=%04x
\n
"
,
TRACE
(
"code=%x flags=%x addr=%p pc=%
016I64
x tid=%04x
\n
"
,
rec
->
ExceptionCode
,
rec
->
ExceptionFlags
,
rec
->
ExceptionAddress
,
context
->
Pc
,
GetCurrentThreadId
()
);
for
(
c
=
0
;
c
<
rec
->
NumberParameters
;
c
++
)
TRACE
(
" info[%d]=%016
l
x
\n
"
,
c
,
rec
->
ExceptionInformation
[
c
]
);
TRACE
(
" info[%d]=%016
I64
x
\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=%016
lx x1=%016lx x2=%016lx x3=%016l
x
\n
"
,
TRACE
(
" x0=%016
I64x x1=%016I64x x2=%016I64x x3=%016I64
x
\n
"
,
context
->
u
.
s
.
X0
,
context
->
u
.
s
.
X1
,
context
->
u
.
s
.
X2
,
context
->
u
.
s
.
X3
);
TRACE
(
" x4=%016
lx x5=%016lx x6=%016lx x7=%016l
x
\n
"
,
TRACE
(
" x4=%016
I64x x5=%016I64x x6=%016I64x x7=%016I64
x
\n
"
,
context
->
u
.
s
.
X4
,
context
->
u
.
s
.
X5
,
context
->
u
.
s
.
X6
,
context
->
u
.
s
.
X7
);
TRACE
(
" x8=%016
lx x9=%016lx x10=%016lx x11=%016l
x
\n
"
,
TRACE
(
" x8=%016
I64x x9=%016I64x x10=%016I64x x11=%016I64
x
\n
"
,
context
->
u
.
s
.
X8
,
context
->
u
.
s
.
X9
,
context
->
u
.
s
.
X10
,
context
->
u
.
s
.
X11
);
TRACE
(
" x12=%016
lx x13=%016lx x14=%016lx x15=%016l
x
\n
"
,
TRACE
(
" x12=%016
I64x x13=%016I64x x14=%016I64x x15=%016I64
x
\n
"
,
context
->
u
.
s
.
X12
,
context
->
u
.
s
.
X13
,
context
->
u
.
s
.
X14
,
context
->
u
.
s
.
X15
);
TRACE
(
" x16=%016
lx x17=%016lx x18=%016lx x19=%016l
x
\n
"
,
TRACE
(
" x16=%016
I64x x17=%016I64x x18=%016I64x x19=%016I64
x
\n
"
,
context
->
u
.
s
.
X16
,
context
->
u
.
s
.
X17
,
context
->
u
.
s
.
X18
,
context
->
u
.
s
.
X19
);
TRACE
(
" x20=%016
lx x21=%016lx x22=%016lx x23=%016l
x
\n
"
,
TRACE
(
" x20=%016
I64x x21=%016I64x x22=%016I64x x23=%016I64
x
\n
"
,
context
->
u
.
s
.
X20
,
context
->
u
.
s
.
X21
,
context
->
u
.
s
.
X22
,
context
->
u
.
s
.
X23
);
TRACE
(
" x24=%016
lx x25=%016lx x26=%016lx x27=%016l
x
\n
"
,
TRACE
(
" x24=%016
I64x x25=%016I64x x26=%016I64x x27=%016I64
x
\n
"
,
context
->
u
.
s
.
X24
,
context
->
u
.
s
.
X25
,
context
->
u
.
s
.
X26
,
context
->
u
.
s
.
X27
);
TRACE
(
" x28=%016
lx fp=%016lx lr=%016lx sp=%016l
x
\n
"
,
TRACE
(
" x28=%016
I64x fp=%016I64x lr=%016I64x sp=%016I64
x
\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-%l
x: len=%#x flag=%x regF=%u regI=%u H=%u CR=%u frame=%x
\n
"
,
TRACE
(
"function %
I64x-%I64
x: 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-%l
x: len=%#x ver=%u X=%u E=%u epilogs=%u codes=%u
\n
"
,
TRACE
(
"function %
I64x-%I64
x: 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 %l
x
\n
"
,
type
,
pc
,
context
->
Sp
,
base
+
func
->
BeginAddress
);
TRACE
(
"type %x pc %
I64x sp %I64x func %I64
x
\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=%l
x handler=%p
\n
"
,
context
->
u
.
s
.
Lr
,
context
->
Sp
,
handler
);
TRACE
(
"ret: lr=%
I64x sp=%I64
x 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 %l
x
\n
"
,
context
->
Pc
,
context
->
Sp
);
TRACE
(
"returning to %
I64x stack %I64
x
\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=%016
l
x
\n
"
,
TRACE
(
"code=%x flags=%x end_frame=%p target_ip=%p pc=%016
I64
x
\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]=%016
l
x
\n
"
,
i
,
rec
->
ExceptionInformation
[
i
]
);
TRACE
(
" x0=%016
lx x1=%016lx x2=%016lx x3=%016l
x
\n
"
,
TRACE
(
" info[%d]=%016
I64
x
\n
"
,
i
,
rec
->
ExceptionInformation
[
i
]
);
TRACE
(
" x0=%016
I64x x1=%016I64x x2=%016I64x x3=%016I64
x
\n
"
,
context
->
u
.
s
.
X0
,
context
->
u
.
s
.
X1
,
context
->
u
.
s
.
X2
,
context
->
u
.
s
.
X3
);
TRACE
(
" x4=%016
lx x5=%016lx x6=%016lx x7=%016l
x
\n
"
,
TRACE
(
" x4=%016
I64x x5=%016I64x x6=%016I64x x7=%016I64
x
\n
"
,
context
->
u
.
s
.
X4
,
context
->
u
.
s
.
X5
,
context
->
u
.
s
.
X6
,
context
->
u
.
s
.
X7
);
TRACE
(
" x8=%016
lx x9=%016lx x10=%016lx x11=%016l
x
\n
"
,
TRACE
(
" x8=%016
I64x x9=%016I64x x10=%016I64x x11=%016I64
x
\n
"
,
context
->
u
.
s
.
X8
,
context
->
u
.
s
.
X9
,
context
->
u
.
s
.
X10
,
context
->
u
.
s
.
X11
);
TRACE
(
" x12=%016
lx x13=%016lx x14=%016lx x15=%016l
x
\n
"
,
TRACE
(
" x12=%016
I64x x13=%016I64x x14=%016I64x x15=%016I64
x
\n
"
,
context
->
u
.
s
.
X12
,
context
->
u
.
s
.
X13
,
context
->
u
.
s
.
X14
,
context
->
u
.
s
.
X15
);
TRACE
(
" x16=%016
lx x17=%016lx x18=%016lx x19=%016l
x
\n
"
,
TRACE
(
" x16=%016
I64x x17=%016I64x x18=%016I64x x19=%016I64
x
\n
"
,
context
->
u
.
s
.
X16
,
context
->
u
.
s
.
X17
,
context
->
u
.
s
.
X18
,
context
->
u
.
s
.
X19
);
TRACE
(
" x20=%016
lx x21=%016lx x22=%016lx x23=%016l
x
\n
"
,
TRACE
(
" x20=%016
I64x x21=%016I64x x22=%016I64x x23=%016I64
x
\n
"
,
context
->
u
.
s
.
X20
,
context
->
u
.
s
.
X21
,
context
->
u
.
s
.
X22
,
context
->
u
.
s
.
X23
);
TRACE
(
" x24=%016
lx x25=%016lx x26=%016lx x27=%016l
x
\n
"
,
TRACE
(
" x24=%016
I64x x25=%016I64x x26=%016I64x x27=%016I64
x
\n
"
,
context
->
u
.
s
.
X24
,
context
->
u
.
s
.
X25
,
context
->
u
.
s
.
X26
,
context
->
u
.
s
.
X27
);
TRACE
(
" x28=%016
lx fp=%016lx lr=%016lx sp=%016l
x
\n
"
,
TRACE
(
" x28=%016
I64x fp=%016I64x lr=%016I64x sp=%016I64
x
\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 %
l
x (%p-%p)
\n
"
,
dispatch
.
EstablisherFrame
,
ERR
(
"invalid frame %
I64
x (%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 %
l
x/%p
\n
"
,
dispatch
.
EstablisherFrame
,
end_frame
);
ERR
(
"invalid end frame %
I64
x/%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 %
l
x
\n
"
,
dispatch
->
ImageBase
+
table
->
ScopeRecord
[
i
].
JumpTarget
);
TRACE
(
"unwinding to target %
I64
x
\n
"
,
dispatch
->
ImageBase
+
table
->
ScopeRecord
[
i
].
JumpTarget
);
RtlUnwindEx
(
frame
,
(
char
*
)
dispatch
->
ImageBase
+
table
->
ScopeRecord
[
i
].
JumpTarget
,
rec
,
0
,
dispatch
->
ContextRecord
,
dispatch
->
HistoryTable
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment