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
d61419d3
Commit
d61419d3
authored
Apr 08, 2024
by
Paul Gofman
Committed by
Alexandre Julliard
Apr 26, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Store exception reporting flags for debug events.
parent
b6928d3a
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
12 additions
and
10 deletions
+12
-10
exception.c
dlls/ntdll/tests/exception.c
+3
-3
signal_arm.c
dlls/ntdll/unix/signal_arm.c
+1
-1
signal_arm64.c
dlls/ntdll/unix/signal_arm64.c
+1
-1
signal_i386.c
dlls/ntdll/unix/signal_i386.c
+1
-1
signal_x86_64.c
dlls/ntdll/unix/signal_x86_64.c
+1
-1
thread.c
dlls/ntdll/unix/thread.c
+4
-2
unix_private.h
dlls/ntdll/unix/unix_private.h
+1
-1
No files found.
dlls/ntdll/tests/exception.c
View file @
d61419d3
...
...
@@ -247,7 +247,7 @@ static void check_context_exception_request_( DWORD flags, BOOL hardware_excepti
if
(
!
(
flags
&
CONTEXT_EXCEPTION_REPORTING
))
return
;
expected_flags
|=
hardware_exception
?
CONTEXT_EXCEPTION_ACTIVE
:
CONTEXT_SERVICE_ACTIVE
;
todo_wine
ok_
(
__FILE__
,
line
)(
(
flags
&
exception_reporting_flags
)
==
expected_flags
,
"got %#lx, expected %#lx.
\n
"
,
ok_
(
__FILE__
,
line
)(
(
flags
&
exception_reporting_flags
)
==
expected_flags
,
"got %#lx, expected %#lx.
\n
"
,
flags
,
expected_flags
);
}
#endif
...
...
@@ -11247,7 +11247,7 @@ static void test_context_exception_request(void)
c
.
ContextFlags
=
CONTEXT_CONTROL
|
CONTEXT_EXCEPTION_REQUEST
;
ret
=
GetThreadContext
(
thread
,
&
c
);
ok
(
ret
,
"got error %lu.
\n
"
,
GetLastError
()
);
todo_wine
ok
(
c
.
ContextFlags
==
expected_flags
,
"got %#lx, expected %#lx.
\n
"
,
c
.
ContextFlags
,
expected_flags
);
ok
(
c
.
ContextFlags
==
expected_flags
,
"got %#lx, expected %#lx.
\n
"
,
c
.
ContextFlags
,
expected_flags
);
WriteRelease
(
&
p
.
sync
,
4
);
}
...
...
@@ -11281,7 +11281,7 @@ static void test_context_exception_request(void)
c
.
ContextFlags
=
CONTEXT_CONTROL
|
CONTEXT_EXCEPTION_REQUEST
;
ret
=
GetThreadContext
(
thread
,
&
c
);
ok
(
ret
,
"got error %lu.
\n
"
,
GetLastError
()
);
todo_wine
ok
(
c
.
ContextFlags
==
expected_flags
,
"got %#lx, expected %#lx.
\n
"
,
c
.
ContextFlags
,
expected_flags
);
ok
(
c
.
ContextFlags
==
expected_flags
,
"got %#lx, expected %#lx.
\n
"
,
c
.
ContextFlags
,
expected_flags
);
WriteRelease
(
&
p
.
sync
,
8
);
}
...
...
dlls/ntdll/unix/signal_arm.c
View file @
d61419d3
...
...
@@ -545,7 +545,7 @@ static void setup_raise_exception( ucontext_t *sigcontext, EXCEPTION_RECORD *rec
void
*
stack_ptr
=
(
void
*
)(
SP_sig
(
sigcontext
)
&
~
7
);
NTSTATUS
status
;
status
=
send_debug_event
(
rec
,
context
,
TRUE
);
status
=
send_debug_event
(
rec
,
context
,
TRUE
,
TRUE
);
if
(
status
==
DBG_CONTINUE
||
status
==
DBG_EXCEPTION_HANDLED
)
{
restore_context
(
context
,
sigcontext
);
...
...
dlls/ntdll/unix/signal_arm64.c
View file @
d61419d3
...
...
@@ -699,7 +699,7 @@ static void setup_raise_exception( ucontext_t *sigcontext, EXCEPTION_RECORD *rec
void
*
stack_ptr
=
(
void
*
)(
SP_sig
(
sigcontext
)
&
~
15
);
NTSTATUS
status
;
status
=
send_debug_event
(
rec
,
context
,
TRUE
);
status
=
send_debug_event
(
rec
,
context
,
TRUE
,
TRUE
);
if
(
status
==
DBG_CONTINUE
||
status
==
DBG_EXCEPTION_HANDLED
)
{
restore_context
(
context
,
sigcontext
);
...
...
dlls/ntdll/unix/signal_i386.c
View file @
d61419d3
...
...
@@ -1450,7 +1450,7 @@ static void setup_raise_exception( ucontext_t *sigcontext, void *stack_ptr,
struct
exc_stack_layout
*
stack
;
size_t
stack_size
;
unsigned
int
xstate_size
;
NTSTATUS
status
=
send_debug_event
(
rec
,
context
,
TRUE
);
NTSTATUS
status
=
send_debug_event
(
rec
,
context
,
TRUE
,
TRUE
);
if
(
status
==
DBG_CONTINUE
||
status
==
DBG_EXCEPTION_HANDLED
)
{
...
...
dlls/ntdll/unix/signal_x86_64.c
View file @
d61419d3
...
...
@@ -1426,7 +1426,7 @@ static void setup_raise_exception( ucontext_t *sigcontext, EXCEPTION_RECORD *rec
context
->
EFlags
&=
~
0x100
;
/* clear single-step flag */
}
status
=
send_debug_event
(
rec
,
context
,
TRUE
);
status
=
send_debug_event
(
rec
,
context
,
TRUE
,
TRUE
);
if
(
status
==
DBG_CONTINUE
||
status
==
DBG_EXCEPTION_HANDLED
)
{
restore_context
(
xcontext
,
sigcontext
);
...
...
dlls/ntdll/unix/thread.c
View file @
d61419d3
...
...
@@ -1506,7 +1506,7 @@ void wait_suspend( CONTEXT *context )
*
* Send an EXCEPTION_DEBUG_EVENT event to the debugger.
*/
NTSTATUS
send_debug_event
(
EXCEPTION_RECORD
*
rec
,
CONTEXT
*
context
,
BOOL
first_chance
)
NTSTATUS
send_debug_event
(
EXCEPTION_RECORD
*
rec
,
CONTEXT
*
context
,
BOOL
first_chance
,
BOOL
exception
)
{
unsigned
int
ret
;
DWORD
i
;
...
...
@@ -1543,6 +1543,8 @@ NTSTATUS send_debug_event( EXCEPTION_RECORD *rec, CONTEXT *context, BOOL first_c
select_op
.
wait
.
handles
[
0
]
=
handle
;
contexts_to_server
(
server_contexts
,
context
);
server_contexts
[
0
].
flags
|=
SERVER_CTX_EXEC_SPACE
;
server_contexts
[
0
].
exec_space
.
space
.
space
=
exception
?
EXEC_SPACE_EXCEPTION
:
EXEC_SPACE_SYSCALL
;
server_select
(
&
select_op
,
offsetof
(
select_op_t
,
wait
.
handles
[
1
]
),
SELECT_INTERRUPTIBLE
,
TIMEOUT_INFINITE
,
server_contexts
,
NULL
);
...
...
@@ -1565,7 +1567,7 @@ NTSTATUS send_debug_event( EXCEPTION_RECORD *rec, CONTEXT *context, BOOL first_c
*/
NTSTATUS
WINAPI
NtRaiseException
(
EXCEPTION_RECORD
*
rec
,
CONTEXT
*
context
,
BOOL
first_chance
)
{
NTSTATUS
status
=
send_debug_event
(
rec
,
context
,
first_chance
);
NTSTATUS
status
=
send_debug_event
(
rec
,
context
,
first_chance
,
!
(
is_win64
||
is_wow64
()
||
is_old_wow64
())
);
if
(
status
==
DBG_CONTINUE
||
status
==
DBG_EXCEPTION_HANDLED
)
return
NtContinue
(
context
,
FALSE
);
...
...
dlls/ntdll/unix/unix_private.h
View file @
d61419d3
...
...
@@ -244,7 +244,7 @@ extern void DECLSPEC_NORETURN abort_thread( int status );
extern
void
DECLSPEC_NORETURN
abort_process
(
int
status
);
extern
void
DECLSPEC_NORETURN
exit_process
(
int
status
);
extern
void
wait_suspend
(
CONTEXT
*
context
);
extern
NTSTATUS
send_debug_event
(
EXCEPTION_RECORD
*
rec
,
CONTEXT
*
context
,
BOOL
first_chance
);
extern
NTSTATUS
send_debug_event
(
EXCEPTION_RECORD
*
rec
,
CONTEXT
*
context
,
BOOL
first_chance
,
BOOL
exception
);
extern
NTSTATUS
set_thread_context
(
HANDLE
handle
,
const
void
*
context
,
BOOL
*
self
,
USHORT
machine
);
extern
NTSTATUS
get_thread_context
(
HANDLE
handle
,
void
*
context
,
BOOL
*
self
,
USHORT
machine
);
extern
unsigned
int
alloc_object_attributes
(
const
OBJECT_ATTRIBUTES
*
attr
,
struct
object_attributes
**
ret
,
...
...
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