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
e0780c25
Commit
e0780c25
authored
Mar 18, 2018
by
Martin Storsjo
Committed by
Alexandre Julliard
Mar 19, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Update the ARM64 CONTEXT struct to match Win SDK 10.0.16299.0.
Signed-off-by:
Martin Storsjo
<
martin@martin.st
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
04ec181c
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
27 deletions
+27
-27
cpu_arm64.c
dlls/dbghelp/cpu_arm64.c
+7
-7
signal_arm64.c
dlls/ntdll/signal_arm64.c
+10
-10
winnt.h
include/winnt.h
+3
-3
be_arm64.c
programs/winedbg/be_arm64.c
+5
-5
gdbproxy.c
programs/winedbg/gdbproxy.c
+2
-2
No files found.
dlls/dbghelp/cpu_arm64.c
View file @
e0780c25
...
...
@@ -41,7 +41,7 @@ static BOOL arm64_get_addr(HANDLE hThread, const CONTEXT* ctx,
#ifdef __aarch64__
case
cpu_addr_pc
:
addr
->
Offset
=
ctx
->
Pc
;
return
TRUE
;
case
cpu_addr_stack
:
addr
->
Offset
=
ctx
->
Sp
;
return
TRUE
;
case
cpu_addr_frame
:
addr
->
Offset
=
ctx
->
Fp
;
return
TRUE
;
case
cpu_addr_frame
:
addr
->
Offset
=
ctx
->
u
.
s
.
Fp
;
return
TRUE
;
#endif
default:
addr
->
Mode
=
-
1
;
return
FALSE
;
...
...
@@ -69,7 +69,7 @@ static BOOL fetch_next_frame(struct cpu_stack_walk* csw,
CONTEXT
*
context
,
DWORD_PTR
curr_pc
)
{
DWORD_PTR
xframe
;
DWORD_PTR
oldReturn
=
context
->
Lr
;
DWORD_PTR
oldReturn
=
context
->
u
.
s
.
Lr
;
if
(
dwarf2_virtual_unwind
(
csw
,
curr_pc
,
context
,
&
xframe
))
{
...
...
@@ -78,7 +78,7 @@ static BOOL fetch_next_frame(struct cpu_stack_walk* csw,
return
TRUE
;
}
if
(
context
->
Pc
==
context
->
Lr
)
return
FALSE
;
if
(
context
->
Pc
==
context
->
u
.
s
.
Lr
)
return
FALSE
;
context
->
Pc
=
oldReturn
;
return
TRUE
;
...
...
@@ -123,8 +123,8 @@ static BOOL arm64_stack_walk(struct cpu_stack_walk* csw, LPSTACKFRAME64 frame, C
/* set frame information */
frame
->
AddrStack
.
Offset
=
context
->
Sp
;
frame
->
AddrReturn
.
Offset
=
context
->
Lr
;
frame
->
AddrFrame
.
Offset
=
context
->
Fp
;
frame
->
AddrReturn
.
Offset
=
context
->
u
.
s
.
Lr
;
frame
->
AddrFrame
.
Offset
=
context
->
u
.
s
.
Fp
;
frame
->
AddrPC
.
Offset
=
context
->
Pc
;
frame
->
Far
=
TRUE
;
...
...
@@ -198,8 +198,8 @@ static void* arm64_fetch_context_reg(CONTEXT* ctx, unsigned regno, unsigned* siz
case
CV_ARM64_X0
+
27
:
case
CV_ARM64_X0
+
28
:
*
size
=
sizeof
(
ctx
->
u
.
X
[
0
]);
return
&
ctx
->
u
.
X
[
regno
-
CV_ARM64_X0
];
case
CV_ARM64_PSTATE
:
*
size
=
sizeof
(
ctx
->
Cpsr
);
return
&
ctx
->
Cpsr
;
case
CV_ARM64_FP
:
*
size
=
sizeof
(
ctx
->
Fp
);
return
&
ctx
->
Fp
;
case
CV_ARM64_LR
:
*
size
=
sizeof
(
ctx
->
Lr
);
return
&
ctx
->
Lr
;
case
CV_ARM64_FP
:
*
size
=
sizeof
(
ctx
->
u
.
s
.
Fp
);
return
&
ctx
->
u
.
s
.
Fp
;
case
CV_ARM64_LR
:
*
size
=
sizeof
(
ctx
->
u
.
s
.
Lr
);
return
&
ctx
->
u
.
s
.
Lr
;
case
CV_ARM64_SP
:
*
size
=
sizeof
(
ctx
->
Sp
);
return
&
ctx
->
Sp
;
case
CV_ARM64_PC
:
*
size
=
sizeof
(
ctx
->
Pc
);
return
&
ctx
->
Pc
;
}
...
...
dlls/ntdll/signal_arm64.c
View file @
e0780c25
...
...
@@ -123,8 +123,8 @@ static void save_context( CONTEXT *context, const ucontext_t *sigcontext )
DWORD
i
;
context
->
ContextFlags
=
CONTEXT_FULL
;
context
->
Fp
=
FP_sig
(
sigcontext
);
/* Frame pointer */
context
->
Lr
=
LR_sig
(
sigcontext
);
/* Link register */
context
->
u
.
s
.
Fp
=
FP_sig
(
sigcontext
);
/* Frame pointer */
context
->
u
.
s
.
Lr
=
LR_sig
(
sigcontext
);
/* Link register */
context
->
Sp
=
SP_sig
(
sigcontext
);
/* Stack pointer */
context
->
Pc
=
PC_sig
(
sigcontext
);
/* Program Counter */
context
->
Cpsr
=
PSTATE_sig
(
sigcontext
);
/* Current State Register */
...
...
@@ -141,8 +141,8 @@ static void restore_context( const CONTEXT *context, ucontext_t *sigcontext )
{
DWORD
i
;
FP_sig
(
sigcontext
)
=
context
->
Fp
;
/* Frame pointer */
LR_sig
(
sigcontext
)
=
context
->
Lr
;
/* Link register */
FP_sig
(
sigcontext
)
=
context
->
u
.
s
.
Fp
;
/* Frame pointer */
LR_sig
(
sigcontext
)
=
context
->
u
.
s
.
Lr
;
/* Link register */
SP_sig
(
sigcontext
)
=
context
->
Sp
;
/* Stack pointer */
PC_sig
(
sigcontext
)
=
context
->
Pc
;
/* Program Counter */
PSTATE_sig
(
sigcontext
)
=
context
->
Cpsr
;
/* Current State Register */
...
...
@@ -241,8 +241,8 @@ static void copy_context( CONTEXT *to, const CONTEXT *from, DWORD flags )
flags
&=
~
CONTEXT_ARM64
;
/* get rid of CPU id */
if
(
flags
&
CONTEXT_CONTROL
)
{
to
->
Fp
=
from
->
Fp
;
to
->
Lr
=
from
->
Lr
;
to
->
u
.
s
.
Fp
=
from
->
u
.
s
.
Fp
;
to
->
u
.
s
.
Lr
=
from
->
u
.
s
.
Lr
;
to
->
Sp
=
from
->
Sp
;
to
->
Pc
=
from
->
Pc
;
to
->
Cpsr
=
from
->
Cpsr
;
...
...
@@ -281,8 +281,8 @@ NTSTATUS context_to_server( context_t *to, const CONTEXT *from )
if
(
flags
&
CONTEXT_CONTROL
)
{
to
->
flags
|=
SERVER_CTX_CONTROL
;
to
->
integer
.
arm64_regs
.
x
[
29
]
=
from
->
Fp
;
to
->
integer
.
arm64_regs
.
x
[
30
]
=
from
->
Lr
;
to
->
integer
.
arm64_regs
.
x
[
29
]
=
from
->
u
.
s
.
Fp
;
to
->
integer
.
arm64_regs
.
x
[
30
]
=
from
->
u
.
s
.
Lr
;
to
->
ctl
.
arm64_regs
.
sp
=
from
->
Sp
;
to
->
ctl
.
arm64_regs
.
pc
=
from
->
Pc
;
to
->
ctl
.
arm64_regs
.
pstate
=
from
->
Cpsr
;
...
...
@@ -326,8 +326,8 @@ NTSTATUS context_from_server( CONTEXT *to, const context_t *from )
if
(
from
->
flags
&
SERVER_CTX_CONTROL
)
{
to
->
ContextFlags
|=
CONTEXT_CONTROL
;
to
->
Fp
=
from
->
integer
.
arm64_regs
.
x
[
29
];
to
->
Lr
=
from
->
integer
.
arm64_regs
.
x
[
30
];
to
->
u
.
s
.
Fp
=
from
->
integer
.
arm64_regs
.
x
[
29
];
to
->
u
.
s
.
Lr
=
from
->
integer
.
arm64_regs
.
x
[
30
];
to
->
Sp
=
from
->
ctl
.
arm64_regs
.
sp
;
to
->
Pc
=
from
->
ctl
.
arm64_regs
.
pc
;
to
->
Cpsr
=
from
->
ctl
.
arm64_regs
.
pstate
;
...
...
include/winnt.h
View file @
e0780c25
...
...
@@ -1850,12 +1850,12 @@ typedef struct _CONTEXT
DWORD64
X26
;
/* 0d8 */
DWORD64
X27
;
/* 0e0 */
DWORD64
X28
;
/* 0e8 */
DWORD64
Fp
;
/* 0f0 */
DWORD64
Lr
;
/* 0f8 */
}
DUMMYSTRUCTNAME
;
DWORD64
X
[
29
];
/* 008 */
DWORD64
X
[
31
];
/* 008 */
}
DUMMYUNIONNAME
;
/* CONTEXT_CONTROL */
DWORD64
Fp
;
/* 0f0 */
DWORD64
Lr
;
/* 0f8 */
DWORD64
Sp
;
/* 100 */
DWORD64
Pc
;
/* 108 */
/* CONTEXT_FLOATING_POINT */
...
...
programs/winedbg/be_arm64.c
View file @
e0780c25
...
...
@@ -32,7 +32,7 @@ static BOOL be_arm64_get_addr(HANDLE hThread, const CONTEXT* ctx,
case
be_cpu_addr_stack
:
return
be_cpu_build_addr
(
hThread
,
ctx
,
addr
,
0
,
ctx
->
Sp
);
case
be_cpu_addr_frame
:
return
be_cpu_build_addr
(
hThread
,
ctx
,
addr
,
0
,
ctx
->
Fp
);
return
be_cpu_build_addr
(
hThread
,
ctx
,
addr
,
0
,
ctx
->
u
.
s
.
Fp
);
break
;
}
return
FALSE
;
...
...
@@ -81,7 +81,7 @@ static void be_arm64_print_context(HANDLE hThread, const CONTEXT* ctx, int all_r
buf
[
i
]
=
'-'
;
dbg_printf
(
" Pc:%016lx Sp:%016lx Lr:%016lx Cpsr:%08x(%s)
\n
"
,
ctx
->
Pc
,
ctx
->
Sp
,
ctx
->
Lr
,
ctx
->
Cpsr
,
buf
);
ctx
->
Pc
,
ctx
->
Sp
,
ctx
->
u
.
s
.
Lr
,
ctx
->
Cpsr
,
buf
);
dbg_printf
(
" x0: %016lx x1: %016lx x2: %016lx x3: %016lx x4: %016lx
\n
"
,
ctx
->
u
.
s
.
X0
,
ctx
->
u
.
s
.
X1
,
ctx
->
u
.
s
.
X2
,
ctx
->
u
.
s
.
X3
,
ctx
->
u
.
s
.
X4
);
dbg_printf
(
" x5: %016lx x6: %016lx x7: %016lx x8: %016lx x9: %016lx
\n
"
,
...
...
@@ -93,7 +93,7 @@ static void be_arm64_print_context(HANDLE hThread, const CONTEXT* ctx, int all_r
dbg_printf
(
" x20:%016lx x21:%016lx x22:%016lx x23:%016lx x24:%016lx
\n
"
,
ctx
->
u
.
s
.
X20
,
ctx
->
u
.
s
.
X21
,
ctx
->
u
.
s
.
X22
,
ctx
->
u
.
s
.
X23
,
ctx
->
u
.
s
.
X24
);
dbg_printf
(
" x25:%016lx x26:%016lx x27:%016lx x28:%016lx Fp:%016lx
\n
"
,
ctx
->
u
.
s
.
X25
,
ctx
->
u
.
s
.
X26
,
ctx
->
u
.
s
.
X27
,
ctx
->
u
.
s
.
X28
,
ctx
->
Fp
);
ctx
->
u
.
s
.
X25
,
ctx
->
u
.
s
.
X26
,
ctx
->
u
.
s
.
X27
,
ctx
->
u
.
s
.
X28
,
ctx
->
u
.
s
.
Fp
);
if
(
all_regs
)
dbg_printf
(
"Floating point ARM64 dump not implemented
\n
"
);
}
...
...
@@ -134,8 +134,8 @@ static struct dbg_internal_var be_arm64_ctx[] =
{
CV_ARM64_X0
+
26
,
"x26"
,
(
DWORD_PTR
*
)
FIELD_OFFSET
(
CONTEXT
,
u
.
s
.
X26
),
dbg_itype_unsigned_long_int
},
{
CV_ARM64_X0
+
27
,
"x27"
,
(
DWORD_PTR
*
)
FIELD_OFFSET
(
CONTEXT
,
u
.
s
.
X27
),
dbg_itype_unsigned_long_int
},
{
CV_ARM64_X0
+
28
,
"x28"
,
(
DWORD_PTR
*
)
FIELD_OFFSET
(
CONTEXT
,
u
.
s
.
X28
),
dbg_itype_unsigned_long_int
},
{
CV_ARM64_FP
,
"fp"
,
(
DWORD_PTR
*
)
FIELD_OFFSET
(
CONTEXT
,
Fp
),
dbg_itype_unsigned_long_int
},
{
CV_ARM64_LR
,
"lr"
,
(
DWORD_PTR
*
)
FIELD_OFFSET
(
CONTEXT
,
Lr
),
dbg_itype_unsigned_long_int
},
{
CV_ARM64_FP
,
"fp"
,
(
DWORD_PTR
*
)
FIELD_OFFSET
(
CONTEXT
,
u
.
s
.
Fp
),
dbg_itype_unsigned_long_int
},
{
CV_ARM64_LR
,
"lr"
,
(
DWORD_PTR
*
)
FIELD_OFFSET
(
CONTEXT
,
u
.
s
.
Lr
),
dbg_itype_unsigned_long_int
},
{
CV_ARM64_SP
,
"sp"
,
(
DWORD_PTR
*
)
FIELD_OFFSET
(
CONTEXT
,
Sp
),
dbg_itype_unsigned_long_int
},
{
CV_ARM64_PC
,
"pc"
,
(
DWORD_PTR
*
)
FIELD_OFFSET
(
CONTEXT
,
Pc
),
dbg_itype_unsigned_long_int
},
{
0
,
NULL
,
0
,
dbg_itype_none
}
...
...
programs/winedbg/gdbproxy.c
View file @
e0780c25
...
...
@@ -495,8 +495,8 @@ static struct cpu_register cpu_register_map[] = {
REG
(
u
.
s
.
X26
,
8
,
CONTEXT_INTEGER
),
REG
(
u
.
s
.
X27
,
8
,
CONTEXT_INTEGER
),
REG
(
u
.
s
.
X28
,
8
,
CONTEXT_INTEGER
),
REG
(
Fp
,
8
,
CONTEXT_INTEGER
),
REG
(
Lr
,
8
,
CONTEXT_INTEGER
),
REG
(
u
.
s
.
Fp
,
8
,
CONTEXT_INTEGER
),
REG
(
u
.
s
.
Lr
,
8
,
CONTEXT_INTEGER
),
REG
(
Sp
,
8
,
CONTEXT_CONTROL
),
REG
(
Pc
,
8
,
CONTEXT_CONTROL
),
};
...
...
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