Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
9e59362a
Commit
9e59362a
authored
Jul 19, 2017
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Move the plaform-specific thread data to the SystemReserved2 TEB field.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b87c66dd
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
17 deletions
+23
-17
signal_i386.c
dlls/ntdll/signal_i386.c
+17
-11
signal_x86_64.c
dlls/ntdll/signal_x86_64.c
+2
-2
winternl.h
include/winternl.h
+2
-2
relay.c
tools/winebuild/relay.c
+2
-2
No files found.
dlls/ntdll/signal_i386.c
View file @
9e59362a
...
...
@@ -531,25 +531,31 @@ enum i386_trap_code
struct
x86_thread_data
{
DWORD
dr0
;
/* 1bc Debug registers */
DWORD
dr1
;
/* 1c0 */
DWORD
dr2
;
/* 1c4 */
DWORD
dr3
;
/* 1c8 */
DWORD
dr6
;
/* 1cc */
DWORD
dr7
;
/* 1d0 */
DWORD
fs
;
/* 1d4 TEB selector */
DWORD
gs
;
/* 1d8 libc selector; update winebuild if you move this! */
void
*
vm86_ptr
;
/* 1dc data for vm86 mode */
int
__pad
[
7
];
/* 1e0 space for ntdll_thread_data (FIXME) */
DWORD
dr0
;
/* 1dc debug registers */
DWORD
dr1
;
/* 1e0 */
DWORD
dr2
;
/* 1e4 */
DWORD
dr3
;
/* 1e8 */
DWORD
dr6
;
/* 1ec */
DWORD
dr7
;
/* 1f0 */
void
*
exit_frame
;
/* 1f4 exit frame pointer */
#ifdef __HAVE_VM86
void
*
vm86_ptr
;
/* 1f8 data for vm86 mode */
WINE_VM86_TEB_INFO
vm86
;
/* 1fc vm86 private data */
void
*
exit_frame
;
/* 204 exit frame pointer */
#endif
/* the ntdll_thread_data structure follows here */
};
C_ASSERT
(
offsetof
(
TEB
,
SpareBytes1
)
+
offsetof
(
struct
x86_thread_data
,
gs
)
==
0x1d8
);
C_ASSERT
(
offsetof
(
TEB
,
SystemReserved2
)
+
offsetof
(
struct
x86_thread_data
,
gs
)
==
0x1d8
);
#ifdef __HAVE_VM86
C_ASSERT
(
offsetof
(
TEB
,
SystemReserved2
)
+
offsetof
(
struct
x86_thread_data
,
vm86
)
==
offsetof
(
TEB
,
GdiTebBatch
)
+
offsetof
(
struct
ntdll_thread_data
,
__vm86
));
#endif
static
inline
struct
x86_thread_data
*
x86_thread_data
(
void
)
{
return
(
struct
x86_thread_data
*
)
NtCurrentTeb
()
->
S
pareBytes1
;
return
(
struct
x86_thread_data
*
)
NtCurrentTeb
()
->
S
ystemReserved2
;
}
/* Exception record for handling exceptions happening inside exception handlers */
...
...
dlls/ntdll/signal_x86_64.c
View file @
9e59362a
...
...
@@ -313,11 +313,11 @@ struct amd64_thread_data
void
*
exit_frame
;
/* exit frame pointer */
};
C_ASSERT
(
sizeof
(
struct
amd64_thread_data
)
<=
sizeof
(((
TEB
*
)
0
)
->
S
pareBytes1
)
);
C_ASSERT
(
sizeof
(
struct
amd64_thread_data
)
<=
sizeof
(((
TEB
*
)
0
)
->
S
ystemReserved2
)
);
static
inline
struct
amd64_thread_data
*
amd64_thread_data
(
void
)
{
return
(
struct
amd64_thread_data
*
)
NtCurrentTeb
()
->
S
pareBytes1
;
return
(
struct
amd64_thread_data
*
)
NtCurrentTeb
()
->
S
ystemReserved2
;
}
/***********************************************************************
...
...
include/winternl.h
View file @
9e59362a
...
...
@@ -328,8 +328,8 @@ typedef struct _TEB
PVOID
SystemReserved1
[
54
];
/* 0cc/0110 used for kernel32 private data in Wine */
LONG
ExceptionCode
;
/* 1a4/02c0 */
ACTIVATION_CONTEXT_STACK
ActivationContextStack
;
/* 1a8/02c8 */
BYTE
SpareBytes1
[
24
];
/* 1bc/02e8
used for ntdll private data in Wine
*/
PVOID
SystemReserved2
[
10
];
/* 1d4/0300 used for ntdll private data in Wine */
BYTE
SpareBytes1
[
24
];
/* 1bc/02e8 */
PVOID
SystemReserved2
[
10
];
/* 1d4/0300 used for ntdll p
latform-specific p
rivate data in Wine */
GDI_TEB_BATCH
GdiTebBatch
;
/* 1fc/0350 used for ntdll private data in Wine */
HANDLE
gdiRgn
;
/* 6dc/0838 */
HANDLE
gdiPen
;
/* 6e0/0840 */
...
...
tools/winebuild/relay.c
View file @
9e59362a
...
...
@@ -33,8 +33,8 @@
/* offset of the stack pointer relative to %fs:(0) */
#define STACKOFFSET 0xc0
/* FIELD_OFFSET(TEB,WOW32Reserved) */
/* fix this if the
ntdll_thread_regs
structure is changed */
#define GS_OFFSET 0x1d8
/* FIELD_OFFSET(TEB,S
pareBytes1) + FIELD_OFFSET(ntdll
_thread_data,gs) */
/* fix this if the
x86_thread_data
structure is changed */
#define GS_OFFSET 0x1d8
/* FIELD_OFFSET(TEB,S
ystemReserved2) + FIELD_OFFSET(struct x86
_thread_data,gs) */
#define DPMI_VIF_OFFSET (0x1fc + 0)
/* FIELD_OFFSET(TEB,GdiTebBatch) + FIELD_OFFSET(WINE_VM86_TEB_INFO,dpmi_vif) */
#define VM86_PENDING_OFFSET (0x1fc + 4)
/* FIELD_OFFSET(TEB,GdiTebBatch) + FIELD_OFFSET(WINE_VM86_TEB_INFO,vm86_pending) */
...
...
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