Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexey Alyaev
wine
Commits
1f012364
Commit
1f012364
authored
24 years ago
by
Gerald Pfeifer
Committed by
Alexandre Julliard
24 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add appropriate casts to caddr_t for the third parameter of ptrace().
parent
d94b6319
No related branches found
Branches containing commit
Tags
wine-20001222
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
server/ptrace.c
+8
-6
8 additions, 6 deletions
server/ptrace.c
with
8 additions
and
6 deletions
server/ptrace.c
+
8
−
6
View file @
1f012364
...
...
@@ -51,10 +51,10 @@ static int handle_child_status( struct thread *thread, int pid, int status )
{
case
SIGSTOP
:
/* continue at once if not suspended */
if
(
!
thread
||
!
(
thread
->
process
->
suspend
+
thread
->
suspend
))
ptrace
(
PTRACE_CONT
,
pid
,
1
,
sig
);
ptrace
(
PTRACE_CONT
,
pid
,
(
caddr_t
)
1
,
sig
);
break
;
default:
/* ignore other signals for now */
ptrace
(
PTRACE_CONT
,
pid
,
1
,
sig
);
ptrace
(
PTRACE_CONT
,
pid
,
(
caddr_t
)
1
,
sig
);
break
;
}
return
sig
;
...
...
@@ -126,7 +126,7 @@ void detach_thread( struct thread *thread, int sig )
if
(
!
(
thread
->
suspend
+
thread
->
process
->
suspend
))
stop_thread
(
thread
);
if
(
sig
)
kill
(
thread
->
unix_pid
,
sig
);
if
(
debug_level
)
fprintf
(
stderr
,
"%08x: *detached*
\n
"
,
(
unsigned
int
)
thread
);
ptrace
(
PTRACE_DETACH
,
thread
->
unix_pid
,
1
,
sig
);
ptrace
(
PTRACE_DETACH
,
thread
->
unix_pid
,
(
caddr_t
)
1
,
sig
);
thread
->
attached
=
0
;
}
else
...
...
@@ -154,7 +154,7 @@ void continue_thread( struct thread *thread )
{
if
(
!
thread
->
unix_pid
)
return
;
if
(
!
thread
->
attached
)
kill
(
thread
->
unix_pid
,
SIGCONT
);
else
ptrace
(
PTRACE_CONT
,
thread
->
unix_pid
,
1
,
SIGSTOP
);
else
ptrace
(
PTRACE_CONT
,
thread
->
unix_pid
,
(
caddr_t
)
1
,
SIGSTOP
);
}
/* suspend a thread to allow using ptrace on it */
...
...
@@ -179,7 +179,8 @@ int suspend_for_ptrace( struct thread *thread )
/* read an int from a thread address space */
int
read_thread_int
(
struct
thread
*
thread
,
const
int
*
addr
,
int
*
data
)
{
if
(((
*
data
=
ptrace
(
PTRACE_PEEKDATA
,
thread
->
unix_pid
,
addr
,
0
))
==
-
1
)
&&
errno
)
*
data
=
ptrace
(
PTRACE_PEEKDATA
,
thread
->
unix_pid
,
(
caddr_t
)
addr
,
0
);
if
(
*
data
==
-
1
&&
errno
)
{
file_set_error
();
return
-
1
;
...
...
@@ -196,6 +197,7 @@ int write_thread_int( struct thread *thread, int *addr, int data, unsigned int m
if
(
read_thread_int
(
thread
,
addr
,
&
res
)
==
-
1
)
return
-
1
;
data
=
(
data
&
mask
)
|
(
res
&
~
mask
);
}
if
((
res
=
ptrace
(
PTRACE_POKEDATA
,
thread
->
unix_pid
,
addr
,
data
))
==
-
1
)
file_set_error
();
if
((
res
=
ptrace
(
PTRACE_POKEDATA
,
thread
->
unix_pid
,
(
caddr_t
)
addr
,
data
))
==
-
1
)
file_set_error
();
return
res
;
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment