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
bd15bef9
Commit
bd15bef9
authored
Aug 13, 2002
by
Pierre Beyssac
Committed by
Alexandre Julliard
Aug 13, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed ptrace argument order for FreeBSD, NetBSD and Solaris.
parent
77c23997
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
context_i386.c
server/context_i386.c
+10
-10
No files found.
server/context_i386.c
View file @
bd15bef9
...
@@ -224,7 +224,7 @@ static void get_thread_context( struct thread *thread, unsigned int flags, CONTE
...
@@ -224,7 +224,7 @@ static void get_thread_context( struct thread *thread, unsigned int flags, CONTE
if
(
flags
&
CONTEXT_FULL
)
if
(
flags
&
CONTEXT_FULL
)
{
{
struct
regs
regs
;
struct
regs
regs
;
if
(
ptrace
(
PTRACE_GETREGS
,
pid
,
0
,
(
int
)
&
regs
)
==
-
1
)
goto
error
;
if
(
ptrace
(
PTRACE_GETREGS
,
pid
,
(
int
)
&
regs
,
0
)
==
-
1
)
goto
error
;
if
(
flags
&
CONTEXT_INTEGER
)
if
(
flags
&
CONTEXT_INTEGER
)
{
{
context
->
Eax
=
regs
.
r_eax
;
context
->
Eax
=
regs
.
r_eax
;
...
@@ -259,7 +259,7 @@ static void get_thread_context( struct thread *thread, unsigned int flags, CONTE
...
@@ -259,7 +259,7 @@ static void get_thread_context( struct thread *thread, unsigned int flags, CONTE
{
{
/* we can use context->FloatSave directly as it is using the */
/* we can use context->FloatSave directly as it is using the */
/* correct structure (the same as fsave/frstor) */
/* correct structure (the same as fsave/frstor) */
if
(
ptrace
(
PTRACE_GETFPREGS
,
pid
,
0
,
(
int
)
&
context
->
FloatSave
)
==
-
1
)
goto
error
;
if
(
ptrace
(
PTRACE_GETFPREGS
,
pid
,
(
int
)
&
context
->
FloatSave
,
0
)
==
-
1
)
goto
error
;
context
->
FloatSave
.
Cr0NpxState
=
0
;
/* FIXME */
context
->
FloatSave
.
Cr0NpxState
=
0
;
/* FIXME */
}
}
return
;
return
;
...
@@ -278,7 +278,7 @@ static void set_thread_context( struct thread *thread, unsigned int flags, const
...
@@ -278,7 +278,7 @@ static void set_thread_context( struct thread *thread, unsigned int flags, const
if
(((
flags
|
CONTEXT_i386
)
&
CONTEXT_FULL
)
!=
CONTEXT_FULL
)
if
(((
flags
|
CONTEXT_i386
)
&
CONTEXT_FULL
)
!=
CONTEXT_FULL
)
{
{
/* need to preserve some registers */
/* need to preserve some registers */
if
(
ptrace
(
PTRACE_GETREGS
,
pid
,
0
,
(
int
)
&
regs
)
==
-
1
)
goto
error
;
if
(
ptrace
(
PTRACE_GETREGS
,
pid
,
(
int
)
&
regs
,
0
)
==
-
1
)
goto
error
;
}
}
if
(
flags
&
CONTEXT_INTEGER
)
if
(
flags
&
CONTEXT_INTEGER
)
{
{
...
@@ -305,7 +305,7 @@ static void set_thread_context( struct thread *thread, unsigned int flags, const
...
@@ -305,7 +305,7 @@ static void set_thread_context( struct thread *thread, unsigned int flags, const
regs
.
r_fs
=
context
->
SegFs
;
regs
.
r_fs
=
context
->
SegFs
;
regs
.
r_gs
=
context
->
SegGs
;
regs
.
r_gs
=
context
->
SegGs
;
}
}
if
(
ptrace
(
PTRACE_SETREGS
,
pid
,
0
,
(
int
)
&
regs
)
==
-
1
)
goto
error
;
if
(
ptrace
(
PTRACE_SETREGS
,
pid
,
(
int
)
&
regs
,
0
)
==
-
1
)
goto
error
;
}
}
if
(
flags
&
CONTEXT_DEBUG_REGISTERS
)
if
(
flags
&
CONTEXT_DEBUG_REGISTERS
)
{
{
...
@@ -315,7 +315,7 @@ static void set_thread_context( struct thread *thread, unsigned int flags, const
...
@@ -315,7 +315,7 @@ static void set_thread_context( struct thread *thread, unsigned int flags, const
{
{
/* we can use context->FloatSave directly as it is using the */
/* we can use context->FloatSave directly as it is using the */
/* correct structure (the same as fsave/frstor) */
/* correct structure (the same as fsave/frstor) */
if
(
ptrace
(
PTRACE_SETFPREGS
,
pid
,
0
,
(
int
)
&
context
->
FloatSave
)
==
-
1
)
goto
error
;
if
(
ptrace
(
PTRACE_SETFPREGS
,
pid
,
(
int
)
&
context
->
FloatSave
,
0
)
==
-
1
)
goto
error
;
}
}
return
;
return
;
error:
error:
...
@@ -332,7 +332,7 @@ static void get_thread_context( struct thread *thread, unsigned int flags, CONTE
...
@@ -332,7 +332,7 @@ static void get_thread_context( struct thread *thread, unsigned int flags, CONTE
if
(
flags
&
CONTEXT_FULL
)
if
(
flags
&
CONTEXT_FULL
)
{
{
struct
reg
regs
;
struct
reg
regs
;
if
(
ptrace
(
PTRACE_GETREGS
,
pid
,
0
,
(
int
)
&
regs
)
==
-
1
)
goto
error
;
if
(
ptrace
(
PTRACE_GETREGS
,
pid
,
(
caddr_t
)
&
regs
,
0
)
==
-
1
)
goto
error
;
if
(
flags
&
CONTEXT_INTEGER
)
if
(
flags
&
CONTEXT_INTEGER
)
{
{
context
->
Eax
=
regs
.
r_eax
;
context
->
Eax
=
regs
.
r_eax
;
...
@@ -367,7 +367,7 @@ static void get_thread_context( struct thread *thread, unsigned int flags, CONTE
...
@@ -367,7 +367,7 @@ static void get_thread_context( struct thread *thread, unsigned int flags, CONTE
{
{
/* we can use context->FloatSave directly as it is using the */
/* we can use context->FloatSave directly as it is using the */
/* correct structure (the same as fsave/frstor) */
/* correct structure (the same as fsave/frstor) */
if
(
ptrace
(
PTRACE_GETFPREGS
,
pid
,
0
,
(
int
)
&
context
->
FloatSave
)
==
-
1
)
goto
error
;
if
(
ptrace
(
PTRACE_GETFPREGS
,
pid
,
(
caddr_t
)
&
context
->
FloatSave
,
0
)
==
-
1
)
goto
error
;
context
->
FloatSave
.
Cr0NpxState
=
0
;
/* FIXME */
context
->
FloatSave
.
Cr0NpxState
=
0
;
/* FIXME */
}
}
return
;
return
;
...
@@ -386,7 +386,7 @@ static void set_thread_context( struct thread *thread, unsigned int flags, const
...
@@ -386,7 +386,7 @@ static void set_thread_context( struct thread *thread, unsigned int flags, const
if
(((
flags
|
CONTEXT_i386
)
&
CONTEXT_FULL
)
!=
CONTEXT_FULL
)
if
(((
flags
|
CONTEXT_i386
)
&
CONTEXT_FULL
)
!=
CONTEXT_FULL
)
{
{
/* need to preserve some registers */
/* need to preserve some registers */
if
(
ptrace
(
PTRACE_GETREGS
,
pid
,
0
,
(
int
)
&
regs
)
==
-
1
)
goto
error
;
if
(
ptrace
(
PTRACE_GETREGS
,
pid
,
(
caddr_t
)
&
regs
,
0
)
==
-
1
)
goto
error
;
}
}
if
(
flags
&
CONTEXT_INTEGER
)
if
(
flags
&
CONTEXT_INTEGER
)
{
{
...
@@ -413,7 +413,7 @@ static void set_thread_context( struct thread *thread, unsigned int flags, const
...
@@ -413,7 +413,7 @@ static void set_thread_context( struct thread *thread, unsigned int flags, const
regs
.
r_fs
=
context
->
SegFs
;
regs
.
r_fs
=
context
->
SegFs
;
regs
.
r_gs
=
context
->
SegGs
;
regs
.
r_gs
=
context
->
SegGs
;
}
}
if
(
ptrace
(
PTRACE_SETREGS
,
pid
,
0
,
(
int
)
&
regs
)
==
-
1
)
goto
error
;
if
(
ptrace
(
PTRACE_SETREGS
,
pid
,
(
caddr_t
)
&
regs
,
0
)
==
-
1
)
goto
error
;
}
}
if
(
flags
&
CONTEXT_DEBUG_REGISTERS
)
if
(
flags
&
CONTEXT_DEBUG_REGISTERS
)
{
{
...
@@ -423,7 +423,7 @@ static void set_thread_context( struct thread *thread, unsigned int flags, const
...
@@ -423,7 +423,7 @@ static void set_thread_context( struct thread *thread, unsigned int flags, const
{
{
/* we can use context->FloatSave directly as it is using the */
/* we can use context->FloatSave directly as it is using the */
/* correct structure (the same as fsave/frstor) */
/* correct structure (the same as fsave/frstor) */
if
(
ptrace
(
PTRACE_SETFPREGS
,
pid
,
0
,
(
int
)
&
context
->
FloatSave
)
==
-
1
)
goto
error
;
if
(
ptrace
(
PTRACE_SETFPREGS
,
pid
,
(
caddr_t
)
&
context
->
FloatSave
,
0
)
==
-
1
)
goto
error
;
}
}
return
;
return
;
error:
error:
...
...
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