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
59022e58
Commit
59022e58
authored
Oct 28, 2003
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Restored emulation of protected instructions in 32-bit code when
running with a Win9x version.
parent
36746279
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
0 deletions
+28
-0
instr.c
dlls/kernel/instr.c
+2
-0
wowthunk.c
dlls/kernel/wowthunk.c
+26
-0
No files found.
dlls/kernel/instr.c
View file @
59022e58
...
...
@@ -688,6 +688,7 @@ DWORD INSTR_EmulateInstruction( EXCEPTION_RECORD *rec, CONTEXT86 *context )
break
;
/* Unable to emulate it */
case
0xcd
:
/* int <XX> */
if
(
IS_SELECTOR_SYSTEM
(
context
->
SegCs
))
break
;
/* don't emulate it in 32-bit code */
if
(
!
Dosvm
.
EmulateInterruptPM
&&
!
DPMI_LoadDosSystem
())
{
ERR
(
"could not initialize interrupt handling
\n
"
);
...
...
@@ -701,6 +702,7 @@ DWORD INSTR_EmulateInstruction( EXCEPTION_RECORD *rec, CONTEXT86 *context )
break
;
/* Unable to emulate it */
case
0xcf
:
/* iret */
if
(
IS_SELECTOR_SYSTEM
(
context
->
SegCs
))
break
;
/* don't emulate it in 32-bit code */
if
(
long_op
)
{
DWORD
*
stack
=
get_stack
(
context
);
...
...
dlls/kernel/wowthunk.c
View file @
59022e58
...
...
@@ -91,6 +91,7 @@ extern BYTE Call16_End;
extern
void
RELAY16_InitDebugLists
(
void
);
static
LONG
CALLBACK
vectored_handler
(
EXCEPTION_POINTERS
*
ptrs
);
static
SEGPTR
call16_ret_addr
;
/* segptr to CallTo16_Ret routine */
/***********************************************************************
...
...
@@ -114,6 +115,9 @@ BOOL WOWTHUNK_Init(void)
MAKESEGPTR
(
codesel
,
(
char
*
)
CALL32_CBClientEx_Ret
-
(
char
*
)
Call16_Ret_Start
);
if
(
TRACE_ON
(
relay
)
||
TRACE_ON
(
snoop
))
RELAY16_InitDebugLists
();
/* setup emulation of protected instructions from 32-bit code (only for Win9x versions) */
if
(
GetVersion
()
&
0x80000000
)
RtlAddVectoredExceptionHandler
(
TRUE
,
vectored_handler
);
return
TRUE
;
}
...
...
@@ -233,6 +237,28 @@ static DWORD vm86_handler( EXCEPTION_RECORD *record, EXCEPTION_REGISTRATION_RECO
}
/***********************************************************************
* vectored_handler
*
* Vectored exception handler used to emulate protected instructions
* from 32-bit code.
*/
static
LONG
CALLBACK
vectored_handler
(
EXCEPTION_POINTERS
*
ptrs
)
{
EXCEPTION_RECORD
*
record
=
ptrs
->
ExceptionRecord
;
CONTEXT
*
context
=
ptrs
->
ContextRecord
;
if
(
IS_SELECTOR_SYSTEM
(
context
->
SegCs
)
&&
(
record
->
ExceptionCode
==
EXCEPTION_ACCESS_VIOLATION
||
record
->
ExceptionCode
==
EXCEPTION_PRIV_INSTRUCTION
))
{
if
(
INSTR_EmulateInstruction
(
record
,
context
)
==
ExceptionContinueExecution
)
return
EXCEPTION_CONTINUE_EXECUTION
;
}
return
EXCEPTION_CONTINUE_SEARCH
;
}
#else
/* __i386__ */
BOOL
WOWTHUNK_Init
(
void
)
...
...
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