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
4c5c90e2
Commit
4c5c90e2
authored
Nov 08, 2002
by
Pierre Beyssac
Committed by
Alexandre Julliard
Nov 08, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid FreeBSD compatibility issues with dbreg structure.
parent
d8d2805c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
context_i386.c
server/context_i386.c
+23
-0
No files found.
server/context_i386.c
View file @
4c5c90e2
...
...
@@ -373,6 +373,15 @@ static void get_thread_context( struct thread *thread, unsigned int flags, CONTE
struct
dbreg
dbregs
;
if
(
ptrace
(
PTRACE_GETDBREGS
,
pid
,
(
caddr_t
)
&
dbregs
,
0
)
==
-
1
)
goto
error
;
#ifdef DBREG_DRX
/* needed for FreeBSD, the structure fields have changed under 5.x */
context
->
Dr0
=
DBREG_DRX
((
&
dbregs
),
0
);
context
->
Dr1
=
DBREG_DRX
((
&
dbregs
),
1
);
context
->
Dr2
=
DBREG_DRX
((
&
dbregs
),
2
);
context
->
Dr3
=
DBREG_DRX
((
&
dbregs
),
3
);
context
->
Dr6
=
DBREG_DRX
((
&
dbregs
),
6
);
context
->
Dr7
=
DBREG_DRX
((
&
dbregs
),
7
);
#else
context
->
Dr0
=
dbregs
.
dr0
;
context
->
Dr1
=
dbregs
.
dr1
;
context
->
Dr2
=
dbregs
.
dr2
;
...
...
@@ -380,6 +389,8 @@ static void get_thread_context( struct thread *thread, unsigned int flags, CONTE
context
->
Dr6
=
dbregs
.
dr6
;
context
->
Dr7
=
dbregs
.
dr7
;
#endif
#endif
}
if
(
flags
&
CONTEXT_FLOATING_POINT
)
{
...
...
@@ -437,6 +448,17 @@ static void set_thread_context( struct thread *thread, unsigned int flags, const
{
#ifdef PTRACE_SETDBREGS
struct
dbreg
dbregs
;
#ifdef DBREG_DRX
/* needed for FreeBSD, the structure fields have changed under 5.x */
DBREG_DRX
((
&
dbregs
),
0
)
=
context
->
Dr0
;
DBREG_DRX
((
&
dbregs
),
1
)
=
context
->
Dr1
;
DBREG_DRX
((
&
dbregs
),
2
)
=
context
->
Dr2
;
DBREG_DRX
((
&
dbregs
),
3
)
=
context
->
Dr3
;
DBREG_DRX
((
&
dbregs
),
4
)
=
0
;
DBREG_DRX
((
&
dbregs
),
5
)
=
0
;
DBREG_DRX
((
&
dbregs
),
6
)
=
context
->
Dr6
;
DBREG_DRX
((
&
dbregs
),
7
)
=
context
->
Dr7
;
#else
dbregs
.
dr0
=
context
->
Dr0
;
dbregs
.
dr1
=
context
->
Dr1
;
dbregs
.
dr2
=
context
->
Dr2
;
...
...
@@ -445,6 +467,7 @@ static void set_thread_context( struct thread *thread, unsigned int flags, const
dbregs
.
dr5
=
0
;
dbregs
.
dr6
=
context
->
Dr6
;
dbregs
.
dr7
=
context
->
Dr7
;
#endif
if
(
ptrace
(
PTRACE_SETDBREGS
,
pid
,
(
caddr_t
)
&
dbregs
,
0
)
==
-
1
)
goto
error
;
#endif
...
...
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