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
1f012364
Commit
1f012364
authored
Oct 17, 2000
by
Gerald Pfeifer
Committed by
Alexandre Julliard
Oct 17, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add appropriate casts to caddr_t for the third parameter of ptrace().
parent
d94b6319
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
ptrace.c
server/ptrace.c
+8
-6
No files found.
server/ptrace.c
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
;
}
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