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
21c12ddc
Commit
21c12ddc
authored
Dec 05, 2017
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Fix CONTEXT definition for ARM64.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
eb337adc
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
193 additions
and
182 deletions
+193
-182
cpu_arm64.c
dlls/dbghelp/cpu_arm64.c
+36
-35
signal_arm64.c
dlls/ntdll/signal_arm64.c
+15
-34
winnt.h
include/winnt.h
+70
-43
be_arm64.c
programs/winedbg/be_arm64.c
+41
-41
debugger.h
programs/winedbg/debugger.h
+2
-0
gdbproxy.c
programs/winedbg/gdbproxy.c
+29
-29
No files found.
dlls/dbghelp/cpu_arm64.c
View file @
21c12ddc
...
...
@@ -21,6 +21,8 @@
#include <assert.h>
#define NONAMELESSUNION
#define NONAMELESSSTRUCT
#include "ntstatus.h"
#define WIN32_NO_STATUS
#include "dbghelp_private.h"
...
...
@@ -166,41 +168,40 @@ static void* arm64_fetch_context_reg(CONTEXT* ctx, unsigned regno, unsigned* siz
#ifdef __aarch64__
switch
(
regno
)
{
case
CV_ARM64_PSTATE
:
*
size
=
sizeof
(
ctx
->
Cpsr
);
return
&
ctx
->
Cpsr
;
case
CV_ARM64_X0
+
0
:
*
size
=
sizeof
(
ctx
->
X0
);
return
&
ctx
->
X0
;
case
CV_ARM64_X0
+
1
:
*
size
=
sizeof
(
ctx
->
X1
);
return
&
ctx
->
X1
;
case
CV_ARM64_X0
+
2
:
*
size
=
sizeof
(
ctx
->
X2
);
return
&
ctx
->
X2
;
case
CV_ARM64_X0
+
3
:
*
size
=
sizeof
(
ctx
->
X3
);
return
&
ctx
->
X3
;
case
CV_ARM64_X0
+
4
:
*
size
=
sizeof
(
ctx
->
X4
);
return
&
ctx
->
X4
;
case
CV_ARM64_X0
+
5
:
*
size
=
sizeof
(
ctx
->
X5
);
return
&
ctx
->
X5
;
case
CV_ARM64_X0
+
6
:
*
size
=
sizeof
(
ctx
->
X6
);
return
&
ctx
->
X6
;
case
CV_ARM64_X0
+
7
:
*
size
=
sizeof
(
ctx
->
X7
);
return
&
ctx
->
X7
;
case
CV_ARM64_X0
+
8
:
*
size
=
sizeof
(
ctx
->
X8
);
return
&
ctx
->
X8
;
case
CV_ARM64_X0
+
9
:
*
size
=
sizeof
(
ctx
->
X9
);
return
&
ctx
->
X9
;
case
CV_ARM64_X0
+
10
:
*
size
=
sizeof
(
ctx
->
X10
);
return
&
ctx
->
X10
;
case
CV_ARM64_X0
+
11
:
*
size
=
sizeof
(
ctx
->
X11
);
return
&
ctx
->
X11
;
case
CV_ARM64_X0
+
12
:
*
size
=
sizeof
(
ctx
->
X12
);
return
&
ctx
->
X12
;
case
CV_ARM64_X0
+
13
:
*
size
=
sizeof
(
ctx
->
X13
);
return
&
ctx
->
X13
;
case
CV_ARM64_X0
+
14
:
*
size
=
sizeof
(
ctx
->
X14
);
return
&
ctx
->
X14
;
case
CV_ARM64_X0
+
15
:
*
size
=
sizeof
(
ctx
->
X15
);
return
&
ctx
->
X15
;
case
CV_ARM64_X0
+
16
:
*
size
=
sizeof
(
ctx
->
X16
);
return
&
ctx
->
X16
;
case
CV_ARM64_X0
+
17
:
*
size
=
sizeof
(
ctx
->
X17
);
return
&
ctx
->
X17
;
case
CV_ARM64_X0
+
18
:
*
size
=
sizeof
(
ctx
->
X18
);
return
&
ctx
->
X18
;
case
CV_ARM64_X0
+
19
:
*
size
=
sizeof
(
ctx
->
X19
);
return
&
ctx
->
X19
;
case
CV_ARM64_X0
+
20
:
*
size
=
sizeof
(
ctx
->
X20
);
return
&
ctx
->
X20
;
case
CV_ARM64_X0
+
21
:
*
size
=
sizeof
(
ctx
->
X21
);
return
&
ctx
->
X21
;
case
CV_ARM64_X0
+
22
:
*
size
=
sizeof
(
ctx
->
X22
);
return
&
ctx
->
X22
;
case
CV_ARM64_X0
+
23
:
*
size
=
sizeof
(
ctx
->
X23
);
return
&
ctx
->
X23
;
case
CV_ARM64_X0
+
24
:
*
size
=
sizeof
(
ctx
->
X24
);
return
&
ctx
->
X24
;
case
CV_ARM64_X0
+
25
:
*
size
=
sizeof
(
ctx
->
X25
);
return
&
ctx
->
X25
;
case
CV_ARM64_X0
+
26
:
*
size
=
sizeof
(
ctx
->
X26
);
return
&
ctx
->
X26
;
case
CV_ARM64_X0
+
27
:
*
size
=
sizeof
(
ctx
->
X27
);
return
&
ctx
->
X27
;
case
CV_ARM64_X0
+
28
:
*
size
=
sizeof
(
ctx
->
X28
);
return
&
ctx
->
X28
;
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_SP
:
*
size
=
sizeof
(
ctx
->
Sp
);
return
&
ctx
->
Sp
;
case
CV_ARM64_PC
:
*
size
=
sizeof
(
ctx
->
Pc
);
return
&
ctx
->
Pc
;
case
CV_ARM64_X0
+
0
:
case
CV_ARM64_X0
+
1
:
case
CV_ARM64_X0
+
2
:
case
CV_ARM64_X0
+
3
:
case
CV_ARM64_X0
+
4
:
case
CV_ARM64_X0
+
5
:
case
CV_ARM64_X0
+
6
:
case
CV_ARM64_X0
+
7
:
case
CV_ARM64_X0
+
8
:
case
CV_ARM64_X0
+
9
:
case
CV_ARM64_X0
+
10
:
case
CV_ARM64_X0
+
11
:
case
CV_ARM64_X0
+
12
:
case
CV_ARM64_X0
+
13
:
case
CV_ARM64_X0
+
14
:
case
CV_ARM64_X0
+
15
:
case
CV_ARM64_X0
+
16
:
case
CV_ARM64_X0
+
17
:
case
CV_ARM64_X0
+
18
:
case
CV_ARM64_X0
+
19
:
case
CV_ARM64_X0
+
20
:
case
CV_ARM64_X0
+
21
:
case
CV_ARM64_X0
+
22
:
case
CV_ARM64_X0
+
23
:
case
CV_ARM64_X0
+
24
:
case
CV_ARM64_X0
+
25
:
case
CV_ARM64_X0
+
26
:
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_SP
:
*
size
=
sizeof
(
ctx
->
Sp
);
return
&
ctx
->
Sp
;
case
CV_ARM64_PC
:
*
size
=
sizeof
(
ctx
->
Pc
);
return
&
ctx
->
Pc
;
}
#endif
FIXME
(
"Unknown register %x
\n
"
,
regno
);
...
...
dlls/ntdll/signal_arm64.c
View file @
21c12ddc
...
...
@@ -48,6 +48,8 @@
# include <sys/ucontext.h>
#endif
#define NONAMELESSUNION
#define NONAMELESSSTRUCT
#include "ntstatus.h"
#define WIN32_NO_STATUS
#include "windef.h"
...
...
@@ -118,12 +120,7 @@ static inline BOOL is_valid_frame( void *frame )
*/
static
void
save_context
(
CONTEXT
*
context
,
const
ucontext_t
*
sigcontext
)
{
#define C(n) context->X##n = REGn_sig(n,sigcontext)
/* Save normal registers */
C
(
0
);
C
(
1
);
C
(
2
);
C
(
3
);
C
(
4
);
C
(
5
);
C
(
6
);
C
(
7
);
C
(
8
);
C
(
9
);
C
(
10
);
C
(
11
);
C
(
12
);
C
(
13
);
C
(
14
);
C
(
15
);
C
(
16
);
C
(
17
);
C
(
18
);
C
(
19
);
C
(
20
);
C
(
21
);
C
(
22
);
C
(
23
);
C
(
24
);
C
(
25
);
C
(
26
);
C
(
27
);
C
(
28
);
#undef C
DWORD
i
;
context
->
ContextFlags
=
CONTEXT_FULL
;
context
->
Fp
=
FP_sig
(
sigcontext
);
/* Frame pointer */
...
...
@@ -131,6 +128,7 @@ static void save_context( CONTEXT *context, const ucontext_t *sigcontext )
context
->
Sp
=
SP_sig
(
sigcontext
);
/* Stack pointer */
context
->
Pc
=
PC_sig
(
sigcontext
);
/* Program Counter */
context
->
Cpsr
=
PSTATE_sig
(
sigcontext
);
/* Current State Register */
for
(
i
=
0
;
i
<=
28
;
i
++
)
context
->
u
.
X
[
i
]
=
REGn_sig
(
i
,
sigcontext
);
}
...
...
@@ -141,18 +139,14 @@ static void save_context( CONTEXT *context, const ucontext_t *sigcontext )
*/
static
void
restore_context
(
const
CONTEXT
*
context
,
ucontext_t
*
sigcontext
)
{
#define C(n) REGn_sig(n,sigcontext) = context->X##n
/* Restore normal registers */
C
(
0
);
C
(
1
);
C
(
2
);
C
(
3
);
C
(
4
);
C
(
5
);
C
(
6
);
C
(
7
);
C
(
8
);
C
(
9
);
C
(
10
);
C
(
11
);
C
(
12
);
C
(
13
);
C
(
14
);
C
(
15
);
C
(
16
);
C
(
17
);
C
(
18
);
C
(
19
);
C
(
20
);
C
(
21
);
C
(
22
);
C
(
23
);
C
(
24
);
C
(
25
);
C
(
26
);
C
(
27
);
C
(
28
);
#undef C
DWORD
i
;
FP_sig
(
sigcontext
)
=
context
->
Fp
;
/* Frame pointer */
LR_sig
(
sigcontext
)
=
context
->
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 */
for
(
i
=
0
;
i
<=
28
;
i
++
)
REGn_sig
(
i
,
sigcontext
)
=
context
->
u
.
X
[
i
];
}
...
...
@@ -255,12 +249,7 @@ static void copy_context( CONTEXT *to, const CONTEXT *from, DWORD flags )
}
if
(
flags
&
CONTEXT_INTEGER
)
{
#define C(n) to->X##n = from->X##n
/* Restore normal registers */
C
(
0
);
C
(
1
);
C
(
2
);
C
(
3
);
C
(
4
);
C
(
5
);
C
(
6
);
C
(
7
);
C
(
8
);
C
(
9
);
C
(
10
);
C
(
11
);
C
(
12
);
C
(
13
);
C
(
14
);
C
(
15
);
C
(
16
);
C
(
17
);
C
(
18
);
C
(
19
);
C
(
20
);
C
(
21
);
C
(
22
);
C
(
23
);
C
(
24
);
C
(
25
);
C
(
26
);
C
(
27
);
C
(
28
);
#undef C
memcpy
(
to
->
u
.
X
,
from
->
u
.
X
,
sizeof
(
to
->
u
.
X
)
);
}
}
...
...
@@ -271,7 +260,7 @@ static void copy_context( CONTEXT *to, const CONTEXT *from, DWORD flags )
*/
NTSTATUS
context_to_server
(
context_t
*
to
,
const
CONTEXT
*
from
)
{
DWORD
flags
=
from
->
ContextFlags
&
~
CONTEXT_ARM64
;
/* get rid of CPU id */
DWORD
i
,
flags
=
from
->
ContextFlags
&
~
CONTEXT_ARM64
;
/* get rid of CPU id */
memset
(
to
,
0
,
sizeof
(
*
to
)
);
to
->
cpu
=
CPU_ARM64
;
...
...
@@ -288,12 +277,7 @@ NTSTATUS context_to_server( context_t *to, const CONTEXT *from )
if
(
flags
&
CONTEXT_INTEGER
)
{
to
->
flags
|=
SERVER_CTX_INTEGER
;
#define C(n) to->integer.arm64_regs.x[n] = from->X##n
/* Restore normal registers */
C
(
0
);
C
(
1
);
C
(
2
);
C
(
3
);
C
(
4
);
C
(
5
);
C
(
6
);
C
(
7
);
C
(
8
);
C
(
9
);
C
(
10
);
C
(
11
);
C
(
12
);
C
(
13
);
C
(
14
);
C
(
15
);
C
(
16
);
C
(
17
);
C
(
18
);
C
(
19
);
C
(
20
);
C
(
21
);
C
(
22
);
C
(
23
);
C
(
24
);
C
(
25
);
C
(
26
);
C
(
27
);
C
(
28
);
#undef C
for
(
i
=
0
;
i
<=
28
;
i
++
)
to
->
integer
.
arm64_regs
.
x
[
i
]
=
from
->
u
.
X
[
i
];
}
return
STATUS_SUCCESS
;
}
...
...
@@ -306,6 +290,8 @@ NTSTATUS context_to_server( context_t *to, const CONTEXT *from )
*/
NTSTATUS
context_from_server
(
CONTEXT
*
to
,
const
context_t
*
from
)
{
DWORD
i
;
if
(
from
->
cpu
!=
CPU_ARM64
)
return
STATUS_INVALID_PARAMETER
;
to
->
ContextFlags
=
CONTEXT_ARM64
;
...
...
@@ -321,12 +307,7 @@ NTSTATUS context_from_server( CONTEXT *to, const context_t *from )
if
(
from
->
flags
&
SERVER_CTX_INTEGER
)
{
to
->
ContextFlags
|=
CONTEXT_INTEGER
;
#define C(n) to->X##n = from->integer.arm64_regs.x[n]
/* Restore normal registers */
C
(
0
);
C
(
1
);
C
(
2
);
C
(
3
);
C
(
4
);
C
(
5
);
C
(
6
);
C
(
7
);
C
(
8
);
C
(
9
);
C
(
10
);
C
(
11
);
C
(
12
);
C
(
13
);
C
(
14
);
C
(
15
);
C
(
16
);
C
(
17
);
C
(
18
);
C
(
19
);
C
(
20
);
C
(
21
);
C
(
22
);
C
(
23
);
C
(
24
);
C
(
25
);
C
(
26
);
C
(
27
);
C
(
28
);
#undef C
for
(
i
=
0
;
i
<=
28
;
i
++
)
to
->
u
.
X
[
i
]
=
from
->
integer
.
arm64_regs
.
x
[
i
];
}
return
STATUS_SUCCESS
;
}
...
...
@@ -971,14 +952,14 @@ static void thread_startup( void *param )
/* build the initial context */
context
.
ContextFlags
=
CONTEXT_FULL
;
context
.
X0
=
(
DWORD_PTR
)
info
->
entry
;
context
.
X1
=
(
DWORD_PTR
)
info
->
arg
;
context
.
u
.
s
.
X0
=
(
DWORD_PTR
)
info
->
entry
;
context
.
u
.
s
.
X1
=
(
DWORD_PTR
)
info
->
arg
;
context
.
Sp
=
(
DWORD_PTR
)
NtCurrentTeb
()
->
Tib
.
StackBase
;
context
.
Pc
=
(
DWORD_PTR
)
info
->
start
;
attach_dlls
(
&
context
,
info
->
suspend
);
((
thread_start_func
)
context
.
Pc
)(
(
LPTHREAD_START_ROUTINE
)
context
.
X0
,
(
void
*
)
context
.
X1
);
((
thread_start_func
)
context
.
Pc
)(
(
LPTHREAD_START_ROUTINE
)
context
.
u
.
s
.
X0
,
(
void
*
)
context
.
u
.
s
.
X1
);
}
/***********************************************************************
...
...
include/winnt.h
View file @
21c12ddc
...
...
@@ -1762,6 +1762,9 @@ PRUNTIME_FUNCTION WINAPI RtlLookupFunctionEntry(ULONG_PTR,DWORD*,UNWIND_HISTORY_
#define EXCEPTION_WRITE_FAULT 1
#define EXCEPTION_EXECUTE_FAULT 8
#define ARM64_MAX_BREAKPOINTS 8
#define ARM64_MAX_WATCHPOINTS 2
typedef
struct
_RUNTIME_FUNCTION
{
DWORD
BeginAddress
;
...
...
@@ -1801,50 +1804,74 @@ typedef struct _UNWIND_HISTORY_TABLE
UNWIND_HISTORY_TABLE_ENTRY
Entry
[
UNWIND_HISTORY_TABLE_SIZE
];
}
UNWIND_HISTORY_TABLE
,
*
PUNWIND_HISTORY_TABLE
;
typedef
struct
_CONTEXT
{
ULONG
ContextFlags
;
ULONG
Cpsr
;
/* This section is specified/returned if the ContextFlags word contains
the flag CONTEXT_INTEGER. */
ULONGLONG
X0
;
ULONGLONG
X1
;
ULONGLONG
X2
;
ULONGLONG
X3
;
ULONGLONG
X4
;
ULONGLONG
X5
;
ULONGLONG
X6
;
ULONGLONG
X7
;
ULONGLONG
X8
;
ULONGLONG
X9
;
ULONGLONG
X10
;
ULONGLONG
X11
;
ULONGLONG
X12
;
ULONGLONG
X13
;
ULONGLONG
X14
;
ULONGLONG
X15
;
ULONGLONG
X16
;
ULONGLONG
X17
;
ULONGLONG
X18
;
ULONGLONG
X19
;
ULONGLONG
X20
;
ULONGLONG
X21
;
ULONGLONG
X22
;
ULONGLONG
X23
;
ULONGLONG
X24
;
ULONGLONG
X25
;
ULONGLONG
X26
;
ULONGLONG
X27
;
ULONGLONG
X28
;
/* These are selected by CONTEXT_CONTROL */
ULONGLONG
Fp
;
ULONGLONG
Lr
;
ULONGLONG
Sp
;
ULONGLONG
Pc
;
typedef
union
_NEON128
{
struct
{
ULONGLONG
Low
;
LONGLONG
High
;
}
DUMMYSTRUCTNAME
;
double
D
[
2
];
float
S
[
4
];
WORD
H
[
8
];
BYTE
B
[
16
];
}
NEON128
,
*
PNEON128
;
/* These are selected by CONTEXT_FLOATING_POINT */
/* FIXME */
typedef
struct
_CONTEXT
{
ULONG
ContextFlags
;
/* 000 */
/* CONTEXT_INTEGER */
ULONG
Cpsr
;
/* 004 */
union
{
struct
{
DWORD64
X0
;
/* 008 */
DWORD64
X1
;
/* 010 */
DWORD64
X2
;
/* 018 */
DWORD64
X3
;
/* 020 */
DWORD64
X4
;
/* 028 */
DWORD64
X5
;
/* 030 */
DWORD64
X6
;
/* 038 */
DWORD64
X7
;
/* 040 */
DWORD64
X8
;
/* 048 */
DWORD64
X9
;
/* 050 */
DWORD64
X10
;
/* 058 */
DWORD64
X11
;
/* 060 */
DWORD64
X12
;
/* 068 */
DWORD64
X13
;
/* 070 */
DWORD64
X14
;
/* 078 */
DWORD64
X15
;
/* 080 */
DWORD64
X16
;
/* 088 */
DWORD64
X17
;
/* 090 */
DWORD64
X18
;
/* 098 */
DWORD64
X19
;
/* 0a0 */
DWORD64
X20
;
/* 0a8 */
DWORD64
X21
;
/* 0b0 */
DWORD64
X22
;
/* 0b8 */
DWORD64
X23
;
/* 0c0 */
DWORD64
X24
;
/* 0c8 */
DWORD64
X25
;
/* 0d0 */
DWORD64
X26
;
/* 0d8 */
DWORD64
X27
;
/* 0e0 */
DWORD64
X28
;
/* 0e8 */
}
DUMMYSTRUCTNAME
;
DWORD64
X
[
29
];
/* 008 */
}
DUMMYUNIONNAME
;
/* CONTEXT_CONTROL */
DWORD64
Fp
;
/* 0f0 */
DWORD64
Lr
;
/* 0f8 */
DWORD64
Sp
;
/* 100 */
DWORD64
Pc
;
/* 108 */
/* CONTEXT_FLOATING_POINT */
NEON128
V
[
32
];
/* 110 */
DWORD
Fpcr
;
/* 310 */
DWORD
Fpsr
;
/* 314 */
/* CONTEXT_DEBUG_REGISTERS */
DWORD
Bcr
[
ARM64_MAX_BREAKPOINTS
];
/* 318 */
DWORD64
Bvr
[
ARM64_MAX_BREAKPOINTS
];
/* 338 */
DWORD
Wcr
[
ARM64_MAX_WATCHPOINTS
];
/* 378 */
DWORD64
Wvr
[
ARM64_MAX_WATCHPOINTS
];
/* 380 */
}
CONTEXT
;
#endif
/* __aarch64__ */
...
...
programs/winedbg/be_arm64.c
View file @
21c12ddc
...
...
@@ -83,17 +83,17 @@ static void be_arm64_print_context(HANDLE hThread, const CONTEXT* ctx, int all_r
dbg_printf
(
" Pc:%016lx Sp:%016lx Lr:%016lx Cpsr:%08x(%s)
\n
"
,
ctx
->
Pc
,
ctx
->
Sp
,
ctx
->
Lr
,
ctx
->
Cpsr
,
buf
);
dbg_printf
(
" x0: %016lx x1: %016lx x2: %016lx x3: %016lx x4: %016lx
\n
"
,
ctx
->
X0
,
ctx
->
X1
,
ctx
->
X2
,
ctx
->
X3
,
ctx
->
X4
);
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
"
,
ctx
->
X5
,
ctx
->
X6
,
ctx
->
X7
,
ctx
->
X8
,
ctx
->
X9
);
ctx
->
u
.
s
.
X5
,
ctx
->
u
.
s
.
X6
,
ctx
->
u
.
s
.
X7
,
ctx
->
u
.
s
.
X8
,
ctx
->
u
.
s
.
X9
);
dbg_printf
(
" x10:%016lx x11:%016lx x12:%016lx x13:%016lx x14:%016lx
\n
"
,
ctx
->
X10
,
ctx
->
X11
,
ctx
->
X12
,
ctx
->
X13
,
ctx
->
X14
);
ctx
->
u
.
s
.
X10
,
ctx
->
u
.
s
.
X11
,
ctx
->
u
.
s
.
X12
,
ctx
->
u
.
s
.
X13
,
ctx
->
u
.
s
.
X14
);
dbg_printf
(
" x15:%016lx ip0:%016lx ip1:%016lx x18:%016lx x19:%016lx
\n
"
,
ctx
->
X15
,
ctx
->
X16
,
ctx
->
X17
,
ctx
->
X18
,
ctx
->
X19
);
ctx
->
u
.
s
.
X15
,
ctx
->
u
.
s
.
X16
,
ctx
->
u
.
s
.
X17
,
ctx
->
u
.
s
.
X18
,
ctx
->
u
.
s
.
X19
);
dbg_printf
(
" x20:%016lx x21:%016lx x22:%016lx x23:%016lx x24:%016lx
\n
"
,
ctx
->
X20
,
ctx
->
X21
,
ctx
->
X22
,
ctx
->
X23
,
ctx
->
X24
);
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
->
X25
,
ctx
->
X26
,
ctx
->
X27
,
ctx
->
X28
,
ctx
->
Fp
);
ctx
->
u
.
s
.
X25
,
ctx
->
u
.
s
.
X26
,
ctx
->
u
.
s
.
X27
,
ctx
->
u
.
s
.
X28
,
ctx
->
Fp
);
if
(
all_regs
)
dbg_printf
(
"Floating point ARM64 dump not implemented
\n
"
);
}
...
...
@@ -104,41 +104,41 @@ static void be_arm64_print_segment_info(HANDLE hThread, const CONTEXT* ctx)
static
struct
dbg_internal_var
be_arm64_ctx
[]
=
{
{
CV_ARM64_PSTATE
,
"cpsr"
,
(
DWORD_PTR
*
)
FIELD_OFFSET
(
CONTEXT
,
Cpsr
),
dbg_itype_unsigned_int
},
{
CV_ARM64_X0
+
0
,
"x0"
,
(
DWORD_PTR
*
)
FIELD_OFFSET
(
CONTEXT
,
X0
),
dbg_itype_unsigned_long_int
},
{
CV_ARM64_X0
+
1
,
"x1"
,
(
DWORD_PTR
*
)
FIELD_OFFSET
(
CONTEXT
,
X1
),
dbg_itype_unsigned_long_int
},
{
CV_ARM64_X0
+
2
,
"x2"
,
(
DWORD_PTR
*
)
FIELD_OFFSET
(
CONTEXT
,
X2
),
dbg_itype_unsigned_long_int
},
{
CV_ARM64_X0
+
3
,
"x3"
,
(
DWORD_PTR
*
)
FIELD_OFFSET
(
CONTEXT
,
X3
),
dbg_itype_unsigned_long_int
},
{
CV_ARM64_X0
+
4
,
"x4"
,
(
DWORD_PTR
*
)
FIELD_OFFSET
(
CONTEXT
,
X4
),
dbg_itype_unsigned_long_int
},
{
CV_ARM64_X0
+
5
,
"x5"
,
(
DWORD_PTR
*
)
FIELD_OFFSET
(
CONTEXT
,
X5
),
dbg_itype_unsigned_long_int
},
{
CV_ARM64_X0
+
6
,
"x6"
,
(
DWORD_PTR
*
)
FIELD_OFFSET
(
CONTEXT
,
X6
),
dbg_itype_unsigned_long_int
},
{
CV_ARM64_X0
+
7
,
"x7"
,
(
DWORD_PTR
*
)
FIELD_OFFSET
(
CONTEXT
,
X7
),
dbg_itype_unsigned_long_int
},
{
CV_ARM64_X0
+
8
,
"x8"
,
(
DWORD_PTR
*
)
FIELD_OFFSET
(
CONTEXT
,
X8
),
dbg_itype_unsigned_long_int
},
{
CV_ARM64_X0
+
9
,
"x9"
,
(
DWORD_PTR
*
)
FIELD_OFFSET
(
CONTEXT
,
X9
),
dbg_itype_unsigned_long_int
},
{
CV_ARM64_X0
+
10
,
"x10"
,
(
DWORD_PTR
*
)
FIELD_OFFSET
(
CONTEXT
,
X10
),
dbg_itype_unsigned_long_int
},
{
CV_ARM64_X0
+
11
,
"x11"
,
(
DWORD_PTR
*
)
FIELD_OFFSET
(
CONTEXT
,
X11
),
dbg_itype_unsigned_long_int
},
{
CV_ARM64_X0
+
12
,
"x12"
,
(
DWORD_PTR
*
)
FIELD_OFFSET
(
CONTEXT
,
X12
),
dbg_itype_unsigned_long_int
},
{
CV_ARM64_X0
+
13
,
"x13"
,
(
DWORD_PTR
*
)
FIELD_OFFSET
(
CONTEXT
,
X13
),
dbg_itype_unsigned_long_int
},
{
CV_ARM64_X0
+
14
,
"x14"
,
(
DWORD_PTR
*
)
FIELD_OFFSET
(
CONTEXT
,
X14
),
dbg_itype_unsigned_long_int
},
{
CV_ARM64_X0
+
15
,
"x15"
,
(
DWORD_PTR
*
)
FIELD_OFFSET
(
CONTEXT
,
X15
),
dbg_itype_unsigned_long_int
},
{
CV_ARM64_X0
+
16
,
"x16"
,
(
DWORD_PTR
*
)
FIELD_OFFSET
(
CONTEXT
,
X16
),
dbg_itype_unsigned_long_int
},
{
CV_ARM64_X0
+
17
,
"x17"
,
(
DWORD_PTR
*
)
FIELD_OFFSET
(
CONTEXT
,
X17
),
dbg_itype_unsigned_long_int
},
{
CV_ARM64_X0
+
18
,
"x18"
,
(
DWORD_PTR
*
)
FIELD_OFFSET
(
CONTEXT
,
X18
),
dbg_itype_unsigned_long_int
},
{
CV_ARM64_X0
+
19
,
"x19"
,
(
DWORD_PTR
*
)
FIELD_OFFSET
(
CONTEXT
,
X19
),
dbg_itype_unsigned_long_int
},
{
CV_ARM64_X0
+
20
,
"x20"
,
(
DWORD_PTR
*
)
FIELD_OFFSET
(
CONTEXT
,
X20
),
dbg_itype_unsigned_long_int
},
{
CV_ARM64_X0
+
21
,
"x21"
,
(
DWORD_PTR
*
)
FIELD_OFFSET
(
CONTEXT
,
X21
),
dbg_itype_unsigned_long_int
},
{
CV_ARM64_X0
+
22
,
"x22"
,
(
DWORD_PTR
*
)
FIELD_OFFSET
(
CONTEXT
,
X22
),
dbg_itype_unsigned_long_int
},
{
CV_ARM64_X0
+
23
,
"x23"
,
(
DWORD_PTR
*
)
FIELD_OFFSET
(
CONTEXT
,
X23
),
dbg_itype_unsigned_long_int
},
{
CV_ARM64_X0
+
24
,
"x24"
,
(
DWORD_PTR
*
)
FIELD_OFFSET
(
CONTEXT
,
X24
),
dbg_itype_unsigned_long_int
},
{
CV_ARM64_X0
+
25
,
"x25"
,
(
DWORD_PTR
*
)
FIELD_OFFSET
(
CONTEXT
,
X25
),
dbg_itype_unsigned_long_int
},
{
CV_ARM64_X0
+
26
,
"x26"
,
(
DWORD_PTR
*
)
FIELD_OFFSET
(
CONTEXT
,
X26
),
dbg_itype_unsigned_long_int
},
{
CV_ARM64_X0
+
27
,
"x27"
,
(
DWORD_PTR
*
)
FIELD_OFFSET
(
CONTEXT
,
X27
),
dbg_itype_unsigned_long_int
},
{
CV_ARM64_X0
+
28
,
"x28"
,
(
DWORD_PTR
*
)
FIELD_OFFSET
(
CONTEXT
,
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_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
}
{
CV_ARM64_PSTATE
,
"cpsr"
,
(
DWORD_PTR
*
)
FIELD_OFFSET
(
CONTEXT
,
Cpsr
),
dbg_itype_unsigned_int
},
{
CV_ARM64_X0
+
0
,
"x0"
,
(
DWORD_PTR
*
)
FIELD_OFFSET
(
CONTEXT
,
u
.
s
.
X0
),
dbg_itype_unsigned_long_int
},
{
CV_ARM64_X0
+
1
,
"x1"
,
(
DWORD_PTR
*
)
FIELD_OFFSET
(
CONTEXT
,
u
.
s
.
X1
),
dbg_itype_unsigned_long_int
},
{
CV_ARM64_X0
+
2
,
"x2"
,
(
DWORD_PTR
*
)
FIELD_OFFSET
(
CONTEXT
,
u
.
s
.
X2
),
dbg_itype_unsigned_long_int
},
{
CV_ARM64_X0
+
3
,
"x3"
,
(
DWORD_PTR
*
)
FIELD_OFFSET
(
CONTEXT
,
u
.
s
.
X3
),
dbg_itype_unsigned_long_int
},
{
CV_ARM64_X0
+
4
,
"x4"
,
(
DWORD_PTR
*
)
FIELD_OFFSET
(
CONTEXT
,
u
.
s
.
X4
),
dbg_itype_unsigned_long_int
},
{
CV_ARM64_X0
+
5
,
"x5"
,
(
DWORD_PTR
*
)
FIELD_OFFSET
(
CONTEXT
,
u
.
s
.
X5
),
dbg_itype_unsigned_long_int
},
{
CV_ARM64_X0
+
6
,
"x6"
,
(
DWORD_PTR
*
)
FIELD_OFFSET
(
CONTEXT
,
u
.
s
.
X6
),
dbg_itype_unsigned_long_int
},
{
CV_ARM64_X0
+
7
,
"x7"
,
(
DWORD_PTR
*
)
FIELD_OFFSET
(
CONTEXT
,
u
.
s
.
X7
),
dbg_itype_unsigned_long_int
},
{
CV_ARM64_X0
+
8
,
"x8"
,
(
DWORD_PTR
*
)
FIELD_OFFSET
(
CONTEXT
,
u
.
s
.
X8
),
dbg_itype_unsigned_long_int
},
{
CV_ARM64_X0
+
9
,
"x9"
,
(
DWORD_PTR
*
)
FIELD_OFFSET
(
CONTEXT
,
u
.
s
.
X9
),
dbg_itype_unsigned_long_int
},
{
CV_ARM64_X0
+
10
,
"x10"
,
(
DWORD_PTR
*
)
FIELD_OFFSET
(
CONTEXT
,
u
.
s
.
X10
),
dbg_itype_unsigned_long_int
},
{
CV_ARM64_X0
+
11
,
"x11"
,
(
DWORD_PTR
*
)
FIELD_OFFSET
(
CONTEXT
,
u
.
s
.
X11
),
dbg_itype_unsigned_long_int
},
{
CV_ARM64_X0
+
12
,
"x12"
,
(
DWORD_PTR
*
)
FIELD_OFFSET
(
CONTEXT
,
u
.
s
.
X12
),
dbg_itype_unsigned_long_int
},
{
CV_ARM64_X0
+
13
,
"x13"
,
(
DWORD_PTR
*
)
FIELD_OFFSET
(
CONTEXT
,
u
.
s
.
X13
),
dbg_itype_unsigned_long_int
},
{
CV_ARM64_X0
+
14
,
"x14"
,
(
DWORD_PTR
*
)
FIELD_OFFSET
(
CONTEXT
,
u
.
s
.
X14
),
dbg_itype_unsigned_long_int
},
{
CV_ARM64_X0
+
15
,
"x15"
,
(
DWORD_PTR
*
)
FIELD_OFFSET
(
CONTEXT
,
u
.
s
.
X15
),
dbg_itype_unsigned_long_int
},
{
CV_ARM64_X0
+
16
,
"x16"
,
(
DWORD_PTR
*
)
FIELD_OFFSET
(
CONTEXT
,
u
.
s
.
X16
),
dbg_itype_unsigned_long_int
},
{
CV_ARM64_X0
+
17
,
"x17"
,
(
DWORD_PTR
*
)
FIELD_OFFSET
(
CONTEXT
,
u
.
s
.
X17
),
dbg_itype_unsigned_long_int
},
{
CV_ARM64_X0
+
18
,
"x18"
,
(
DWORD_PTR
*
)
FIELD_OFFSET
(
CONTEXT
,
u
.
s
.
X18
),
dbg_itype_unsigned_long_int
},
{
CV_ARM64_X0
+
19
,
"x19"
,
(
DWORD_PTR
*
)
FIELD_OFFSET
(
CONTEXT
,
u
.
s
.
X19
),
dbg_itype_unsigned_long_int
},
{
CV_ARM64_X0
+
20
,
"x20"
,
(
DWORD_PTR
*
)
FIELD_OFFSET
(
CONTEXT
,
u
.
s
.
X20
),
dbg_itype_unsigned_long_int
},
{
CV_ARM64_X0
+
21
,
"x21"
,
(
DWORD_PTR
*
)
FIELD_OFFSET
(
CONTEXT
,
u
.
s
.
X21
),
dbg_itype_unsigned_long_int
},
{
CV_ARM64_X0
+
22
,
"x22"
,
(
DWORD_PTR
*
)
FIELD_OFFSET
(
CONTEXT
,
u
.
s
.
X22
),
dbg_itype_unsigned_long_int
},
{
CV_ARM64_X0
+
23
,
"x23"
,
(
DWORD_PTR
*
)
FIELD_OFFSET
(
CONTEXT
,
u
.
s
.
X23
),
dbg_itype_unsigned_long_int
},
{
CV_ARM64_X0
+
24
,
"x24"
,
(
DWORD_PTR
*
)
FIELD_OFFSET
(
CONTEXT
,
u
.
s
.
X24
),
dbg_itype_unsigned_long_int
},
{
CV_ARM64_X0
+
25
,
"x25"
,
(
DWORD_PTR
*
)
FIELD_OFFSET
(
CONTEXT
,
u
.
s
.
X25
),
dbg_itype_unsigned_long_int
},
{
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_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
}
};
static
BOOL
be_arm64_is_step_over_insn
(
const
void
*
insn
)
...
...
programs/winedbg/debugger.h
View file @
21c12ddc
...
...
@@ -24,6 +24,8 @@
#include <assert.h>
#include <stdarg.h>
#define NONAMELESSUNION
#define NONAMELESSSTRUCT
#include "ntstatus.h"
#define WIN32_NO_STATUS
#define WIN32_LEAN_AND_MEAN
...
...
programs/winedbg/gdbproxy.c
View file @
21c12ddc
...
...
@@ -400,35 +400,35 @@ static struct cpu_register cpu_register_map[] = {
static
const
char
target_xml
[]
=
""
;
static
struct
cpu_register
cpu_register_map
[]
=
{
REG
(
Cpsr
,
4
,
CONTEXT_CONTROL
),
REG
(
X0
,
8
,
CONTEXT_INTEGER
),
REG
(
X1
,
8
,
CONTEXT_INTEGER
),
REG
(
X2
,
8
,
CONTEXT_INTEGER
),
REG
(
X3
,
8
,
CONTEXT_INTEGER
),
REG
(
X4
,
8
,
CONTEXT_INTEGER
),
REG
(
X5
,
8
,
CONTEXT_INTEGER
),
REG
(
X6
,
8
,
CONTEXT_INTEGER
),
REG
(
X7
,
8
,
CONTEXT_INTEGER
),
REG
(
X8
,
8
,
CONTEXT_INTEGER
),
REG
(
X9
,
8
,
CONTEXT_INTEGER
),
REG
(
X10
,
8
,
CONTEXT_INTEGER
),
REG
(
X11
,
8
,
CONTEXT_INTEGER
),
REG
(
X12
,
8
,
CONTEXT_INTEGER
),
REG
(
X13
,
8
,
CONTEXT_INTEGER
),
REG
(
X14
,
8
,
CONTEXT_INTEGER
),
REG
(
X15
,
8
,
CONTEXT_INTEGER
),
REG
(
X16
,
8
,
CONTEXT_INTEGER
),
REG
(
X17
,
8
,
CONTEXT_INTEGER
),
REG
(
X18
,
8
,
CONTEXT_INTEGER
),
REG
(
X19
,
8
,
CONTEXT_INTEGER
),
REG
(
X20
,
8
,
CONTEXT_INTEGER
),
REG
(
X21
,
8
,
CONTEXT_INTEGER
),
REG
(
X22
,
8
,
CONTEXT_INTEGER
),
REG
(
X23
,
8
,
CONTEXT_INTEGER
),
REG
(
X24
,
8
,
CONTEXT_INTEGER
),
REG
(
X25
,
8
,
CONTEXT_INTEGER
),
REG
(
X26
,
8
,
CONTEXT_INTEGER
),
REG
(
X27
,
8
,
CONTEXT_INTEGER
),
REG
(
X28
,
8
,
CONTEXT_INTEGER
),
REG
(
u
.
s
.
X0
,
8
,
CONTEXT_INTEGER
),
REG
(
u
.
s
.
X1
,
8
,
CONTEXT_INTEGER
),
REG
(
u
.
s
.
X2
,
8
,
CONTEXT_INTEGER
),
REG
(
u
.
s
.
X3
,
8
,
CONTEXT_INTEGER
),
REG
(
u
.
s
.
X4
,
8
,
CONTEXT_INTEGER
),
REG
(
u
.
s
.
X5
,
8
,
CONTEXT_INTEGER
),
REG
(
u
.
s
.
X6
,
8
,
CONTEXT_INTEGER
),
REG
(
u
.
s
.
X7
,
8
,
CONTEXT_INTEGER
),
REG
(
u
.
s
.
X8
,
8
,
CONTEXT_INTEGER
),
REG
(
u
.
s
.
X9
,
8
,
CONTEXT_INTEGER
),
REG
(
u
.
s
.
X10
,
8
,
CONTEXT_INTEGER
),
REG
(
u
.
s
.
X11
,
8
,
CONTEXT_INTEGER
),
REG
(
u
.
s
.
X12
,
8
,
CONTEXT_INTEGER
),
REG
(
u
.
s
.
X13
,
8
,
CONTEXT_INTEGER
),
REG
(
u
.
s
.
X14
,
8
,
CONTEXT_INTEGER
),
REG
(
u
.
s
.
X15
,
8
,
CONTEXT_INTEGER
),
REG
(
u
.
s
.
X16
,
8
,
CONTEXT_INTEGER
),
REG
(
u
.
s
.
X17
,
8
,
CONTEXT_INTEGER
),
REG
(
u
.
s
.
X18
,
8
,
CONTEXT_INTEGER
),
REG
(
u
.
s
.
X19
,
8
,
CONTEXT_INTEGER
),
REG
(
u
.
s
.
X20
,
8
,
CONTEXT_INTEGER
),
REG
(
u
.
s
.
X21
,
8
,
CONTEXT_INTEGER
),
REG
(
u
.
s
.
X22
,
8
,
CONTEXT_INTEGER
),
REG
(
u
.
s
.
X23
,
8
,
CONTEXT_INTEGER
),
REG
(
u
.
s
.
X24
,
8
,
CONTEXT_INTEGER
),
REG
(
u
.
s
.
X25
,
8
,
CONTEXT_INTEGER
),
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
(
Sp
,
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