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
2fff3449
Commit
2fff3449
authored
Sep 04, 2019
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 04, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Handle interrupt exceptions in signal handler on x86_64.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b76df7fa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
15 deletions
+16
-15
signal_x86_64.c
dlls/ntdll/signal_x86_64.c
+16
-15
No files found.
dlls/ntdll/signal_x86_64.c
View file @
2fff3449
...
...
@@ -2664,16 +2664,6 @@ static void raise_segv_exception( EXCEPTION_RECORD *rec, CONTEXT *context )
set_cpu_context
(
context
);
}
break
;
case
EXCEPTION_BREAKPOINT
:
switch
(
rec
->
ExceptionInformation
[
0
])
{
case
1
:
/* BREAKPOINT_PRINT */
case
3
:
/* BREAKPOINT_LOAD_SYMBOLS */
case
4
:
/* BREAKPOINT_UNLOAD_SYMBOLS */
case
5
:
/* BREAKPOINT_COMMAND_STRING (>= Win2003) */
set_cpu_context
(
context
);
}
break
;
}
status
=
NtRaiseException
(
rec
,
context
,
TRUE
);
raise_status
(
status
,
rec
);
...
...
@@ -2919,23 +2909,34 @@ static inline DWORD is_privileged_instr( CONTEXT *context )
*
* Handle an interrupt.
*/
static
inline
BOOL
handle_interrupt
(
u
nsigned
int
interrup
t
,
EXCEPTION_RECORD
*
rec
,
CONTEXT
*
context
)
static
inline
BOOL
handle_interrupt
(
u
context_t
*
sigcontex
t
,
EXCEPTION_RECORD
*
rec
,
CONTEXT
*
context
)
{
switch
(
interrupt
)
switch
(
ERROR_sig
(
sigcontext
)
>>
3
)
{
case
0x2c
:
rec
->
ExceptionCode
=
STATUS_ASSERTION_FAILURE
;
return
TRUE
;
break
;
case
0x2d
:
switch
(
context
->
Rax
)
{
case
1
:
/* BREAKPOINT_PRINT */
case
3
:
/* BREAKPOINT_LOAD_SYMBOLS */
case
4
:
/* BREAKPOINT_UNLOAD_SYMBOLS */
case
5
:
/* BREAKPOINT_COMMAND_STRING (>= Win2003) */
RIP_sig
(
sigcontext
)
+=
3
;
return
TRUE
;
}
context
->
Rip
+=
3
;
rec
->
ExceptionCode
=
EXCEPTION_BREAKPOINT
;
rec
->
ExceptionAddress
=
(
void
*
)
context
->
Rip
;
rec
->
NumberParameters
=
1
;
rec
->
ExceptionInformation
[
0
]
=
context
->
Rax
;
return
TRUE
;
break
;
default:
return
FALSE
;
}
setup_raise_exception
(
sigcontext
,
rec
,
raise_generic_exception
);
return
TRUE
;
}
...
...
@@ -2992,7 +2993,7 @@ static void segv_handler( int signal, siginfo_t *siginfo, void *sigcontext )
CONTEXT
*
win_context
=
get_exception_context
(
rec
);
WORD
err
=
ERROR_sig
(
ucontext
);
if
(
!
err
&&
(
rec
->
ExceptionCode
=
is_privileged_instr
(
win_context
)))
break
;
if
((
err
&
7
)
==
2
&&
handle_interrupt
(
err
>>
3
,
rec
,
win_context
))
break
;
if
((
err
&
7
)
==
2
&&
handle_interrupt
(
ucontext
,
rec
,
win_context
))
return
;
rec
->
ExceptionCode
=
EXCEPTION_ACCESS_VIOLATION
;
rec
->
NumberParameters
=
2
;
rec
->
ExceptionInformation
[
0
]
=
0
;
...
...
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