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
4ba0f628
Commit
4ba0f628
authored
Dec 05, 2017
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Add floating point and debug registers to the ARM context.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
21c12ddc
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
60 additions
and
4 deletions
+60
-4
signal_arm.c
dlls/ntdll/signal_arm.c
+37
-2
server_protocol.h
include/wine/server_protocol.h
+3
-1
protocol.def
server/protocol.def
+2
-0
thread.c
server/thread.c
+1
-1
trace.c
server/trace.c
+17
-0
No files found.
dlls/ntdll/signal_arm.c
View file @
4ba0f628
...
...
@@ -347,6 +347,11 @@ static void copy_context( CONTEXT *to, const CONTEXT *from, DWORD flags )
to
->
R11
=
from
->
R11
;
to
->
R12
=
from
->
R12
;
}
if
(
flags
&
CONTEXT_FLOATING_POINT
)
{
to
->
Fpscr
=
from
->
Fpscr
;
memcpy
(
to
->
u
.
D
,
from
->
u
.
D
,
sizeof
(
to
->
u
.
D
)
);
}
}
...
...
@@ -357,7 +362,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_ARM
;
/* get rid of CPU id */
DWORD
i
,
flags
=
from
->
ContextFlags
&
~
CONTEXT_ARM
;
/* get rid of CPU id */
memset
(
to
,
0
,
sizeof
(
*
to
)
);
to
->
cpu
=
CPU_ARM
;
...
...
@@ -387,6 +392,20 @@ NTSTATUS context_to_server( context_t *to, const CONTEXT *from )
to
->
integer
.
arm_regs
.
r
[
11
]
=
from
->
R11
;
to
->
integer
.
arm_regs
.
r
[
12
]
=
from
->
R12
;
}
if
(
flags
&
CONTEXT_FLOATING_POINT
)
{
to
->
flags
|=
SERVER_CTX_FLOATING_POINT
;
for
(
i
=
0
;
i
<
32
;
i
++
)
to
->
fp
.
arm_regs
.
d
[
i
]
=
from
->
u
.
D
[
i
];
to
->
fp
.
arm_regs
.
fpscr
=
from
->
Fpscr
;
}
if
(
flags
&
CONTEXT_DEBUG_REGISTERS
)
{
to
->
flags
|=
SERVER_CTX_DEBUG_REGISTERS
;
for
(
i
=
0
;
i
<
ARM_MAX_BREAKPOINTS
;
i
++
)
to
->
debug
.
arm_regs
.
bvr
[
i
]
=
from
->
Bvr
[
i
];
for
(
i
=
0
;
i
<
ARM_MAX_BREAKPOINTS
;
i
++
)
to
->
debug
.
arm_regs
.
bcr
[
i
]
=
from
->
Bcr
[
i
];
for
(
i
=
0
;
i
<
ARM_MAX_WATCHPOINTS
;
i
++
)
to
->
debug
.
arm_regs
.
wvr
[
i
]
=
from
->
Wvr
[
i
];
for
(
i
=
0
;
i
<
ARM_MAX_WATCHPOINTS
;
i
++
)
to
->
debug
.
arm_regs
.
wcr
[
i
]
=
from
->
Wcr
[
i
];
}
return
STATUS_SUCCESS
;
}
...
...
@@ -398,6 +417,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_ARM
)
return
STATUS_INVALID_PARAMETER
;
to
->
ContextFlags
=
CONTEXT_ARM
;
...
...
@@ -425,7 +446,21 @@ NTSTATUS context_from_server( CONTEXT *to, const context_t *from )
to
->
R10
=
from
->
integer
.
arm_regs
.
r
[
10
];
to
->
R11
=
from
->
integer
.
arm_regs
.
r
[
11
];
to
->
R12
=
from
->
integer
.
arm_regs
.
r
[
12
];
}
}
if
(
from
->
flags
&
SERVER_CTX_FLOATING_POINT
)
{
to
->
ContextFlags
|=
CONTEXT_FLOATING_POINT
;
for
(
i
=
0
;
i
<
32
;
i
++
)
to
->
u
.
D
[
i
]
=
from
->
fp
.
arm_regs
.
d
[
i
];
to
->
Fpscr
=
from
->
fp
.
arm_regs
.
fpscr
;
}
if
(
from
->
flags
&
SERVER_CTX_DEBUG_REGISTERS
)
{
to
->
ContextFlags
|=
CONTEXT_DEBUG_REGISTERS
;
for
(
i
=
0
;
i
<
ARM_MAX_BREAKPOINTS
;
i
++
)
to
->
Bvr
[
i
]
=
from
->
debug
.
arm_regs
.
bvr
[
i
];
for
(
i
=
0
;
i
<
ARM_MAX_BREAKPOINTS
;
i
++
)
to
->
Bcr
[
i
]
=
from
->
debug
.
arm_regs
.
bcr
[
i
];
for
(
i
=
0
;
i
<
ARM_MAX_WATCHPOINTS
;
i
++
)
to
->
Wvr
[
i
]
=
from
->
debug
.
arm_regs
.
wvr
[
i
];
for
(
i
=
0
;
i
<
ARM_MAX_WATCHPOINTS
;
i
++
)
to
->
Wcr
[
i
]
=
from
->
debug
.
arm_regs
.
wcr
[
i
];
}
return
STATUS_SUCCESS
;
}
...
...
include/wine/server_protocol.h
View file @
4ba0f628
...
...
@@ -155,12 +155,14 @@ typedef struct
unsigned
char
regs
[
80
];
}
i386_regs
;
struct
{
struct
{
unsigned
__int64
low
,
high
;
}
fpregs
[
32
];
}
x86_64_regs
;
struct
{
double
fpr
[
32
],
fpscr
;
}
powerpc_regs
;
struct
{
unsigned
__int64
d
[
32
];
unsigned
int
fpscr
;
}
arm_regs
;
}
fp
;
union
{
struct
{
unsigned
int
dr0
,
dr1
,
dr2
,
dr3
,
dr6
,
dr7
;
}
i386_regs
;
struct
{
unsigned
__int64
dr0
,
dr1
,
dr2
,
dr3
,
dr6
,
dr7
;
}
x86_64_regs
;
struct
{
unsigned
int
dr
[
8
];
}
powerpc_regs
;
struct
{
unsigned
int
bvr
[
8
],
bcr
[
8
],
wvr
[
1
],
wcr
[
1
];
}
arm_regs
;
}
debug
;
union
{
...
...
@@ -6475,6 +6477,6 @@ union generic_reply
struct
terminate_job_reply
terminate_job_reply
;
};
#define SERVER_PROTOCOL_VERSION 54
4
#define SERVER_PROTOCOL_VERSION 54
5
#endif
/* __WINE_WINE_SERVER_PROTOCOL_H */
server/protocol.def
View file @
4ba0f628
...
...
@@ -171,12 +171,14 @@ typedef struct
unsigned char regs[80]; } i386_regs;
struct { struct { unsigned __int64 low, high; } fpregs[32]; } x86_64_regs;
struct { double fpr[32], fpscr; } powerpc_regs;
struct { unsigned __int64 d[32]; unsigned int fpscr; } arm_regs;
} fp; /* selected by SERVER_CTX_FLOATING_POINT */
union
{
struct { unsigned int dr0, dr1, dr2, dr3, dr6, dr7; } i386_regs;
struct { unsigned __int64 dr0, dr1, dr2, dr3, dr6, dr7; } x86_64_regs;
struct { unsigned int dr[8]; } powerpc_regs;
struct { unsigned int bvr[8], bcr[8], wvr[1], wcr[1]; } arm_regs;
} debug; /* selected by SERVER_CTX_DEBUG_REGISTERS */
union
{
...
...
server/thread.c
View file @
4ba0f628
...
...
@@ -1147,7 +1147,7 @@ static unsigned int get_context_system_regs( enum cpu_type cpu )
case
CPU_x86
:
return
SERVER_CTX_DEBUG_REGISTERS
;
case
CPU_x86_64
:
return
SERVER_CTX_DEBUG_REGISTERS
;
case
CPU_POWERPC
:
return
0
;
case
CPU_ARM
:
return
0
;
case
CPU_ARM
:
return
SERVER_CTX_DEBUG_REGISTERS
;
case
CPU_ARM64
:
return
0
;
}
return
0
;
...
...
server/trace.c
View file @
4ba0f628
...
...
@@ -664,6 +664,23 @@ static void dump_varargs_context( const char *prefix, data_size_t size )
ctx
.
ctl
.
arm_regs
.
pc
,
ctx
.
ctl
.
arm_regs
.
cpsr
);
if
(
ctx
.
flags
&
SERVER_CTX_INTEGER
)
for
(
i
=
0
;
i
<
13
;
i
++
)
fprintf
(
stderr
,
",r%u=%08x"
,
i
,
ctx
.
integer
.
arm_regs
.
r
[
i
]
);
if
(
ctx
.
flags
&
SERVER_CTX_DEBUG_REGISTERS
)
{
for
(
i
=
0
;
i
<
8
;
i
++
)
fprintf
(
stderr
,
",bcr%u=%08x,bvr%u=%08x"
,
i
,
ctx
.
debug
.
arm_regs
.
bcr
[
i
],
i
,
ctx
.
debug
.
arm_regs
.
bvr
[
i
]
);
fprintf
(
stderr
,
",wcr0=%08x,wvr0=%08x"
,
ctx
.
debug
.
arm_regs
.
wcr
[
0
],
ctx
.
debug
.
arm_regs
.
wvr
[
0
]
);
}
if
(
ctx
.
flags
&
SERVER_CTX_FLOATING_POINT
)
{
for
(
i
=
0
;
i
<
32
;
i
++
)
{
fprintf
(
stderr
,
",d%u="
,
i
);
dump_uint64
(
""
,
&
ctx
.
fp
.
arm_regs
.
d
[
i
]
);
}
fprintf
(
stderr
,
",fpscr=%08x"
,
ctx
.
fp
.
arm_regs
.
fpscr
);
}
break
;
case
CPU_ARM64
:
if
(
ctx
.
flags
&
SERVER_CTX_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