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
a993df86
Commit
a993df86
authored
Mar 24, 2003
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make sure changes to the debug registers while inside a SIGTRAP
exception are taken into account (based on a patch by Alex Pasadyn).
parent
d6841ee9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
7 deletions
+20
-7
signal_i386.c
dlls/ntdll/signal_i386.c
+20
-7
No files found.
dlls/ntdll/signal_i386.c
View file @
a993df86
...
...
@@ -836,6 +836,7 @@ static void do_segv( CONTEXT *context, int trap_code, void *cr2, int err_code )
static
void
do_trap
(
CONTEXT
*
context
,
int
trap_code
)
{
EXCEPTION_RECORD
rec
;
DWORD
dr0
,
dr1
,
dr2
,
dr3
,
dr6
,
dr7
;
rec
.
ExceptionFlags
=
EXCEPTION_CONTINUABLE
;
rec
.
ExceptionRecord
=
NULL
;
...
...
@@ -845,18 +846,15 @@ static void do_trap( CONTEXT *context, int trap_code )
switch
(
trap_code
)
{
case
T_TRCTRAP
:
/* Single-step exception */
rec
.
ExceptionCode
=
EXCEPTION_SINGLE_STEP
;
if
(
context
->
EFlags
&
0x100
)
{
rec
.
ExceptionCode
=
EXCEPTION_SINGLE_STEP
;
context
->
EFlags
&=
~
0x100
;
/* clear single-step flag */
}
else
else
/* hardware breakpoint, fetch the debug registers */
{
/* likely we get this because of a kill(SIGTRAP) on ourself,
* so send a bp exception instead of a single step exception
*/
TRACE
(
"Spurious single step trap => breakpoint simulation
\n
"
);
rec
.
ExceptionCode
=
EXCEPTION_BREAKPOINT
;
context
->
ContextFlags
=
CONTEXT_DEBUG_REGISTERS
;
GetThreadContext
(
GetCurrentThread
(),
context
);
}
break
;
case
T_BPTFLT
:
/* Breakpoint exception */
...
...
@@ -866,7 +864,22 @@ static void do_trap( CONTEXT *context, int trap_code )
rec
.
ExceptionCode
=
EXCEPTION_BREAKPOINT
;
break
;
}
dr0
=
context
->
Dr0
;
dr1
=
context
->
Dr1
;
dr2
=
context
->
Dr2
;
dr3
=
context
->
Dr3
;
dr6
=
context
->
Dr6
;
dr7
=
context
->
Dr7
;
EXC_RtlRaiseException
(
&
rec
,
context
);
if
(
dr0
!=
context
->
Dr0
||
dr1
!=
context
->
Dr1
||
dr2
!=
context
->
Dr2
||
dr3
!=
context
->
Dr3
||
dr6
!=
context
->
Dr6
||
dr7
!=
context
->
Dr7
)
{
/* the debug registers have changed, set the new values */
context
->
ContextFlags
=
CONTEXT_DEBUG_REGISTERS
;
SetThreadContext
(
GetCurrentThread
(),
context
);
}
}
...
...
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