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
cd1c7fc0
Commit
cd1c7fc0
authored
Dec 29, 2006
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Add hooks to support process tracing mechanisms other than ptrace.
parent
48b74b32
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
0 deletions
+28
-0
process.c
server/process.c
+3
-0
process.h
server/process.h
+5
-0
ptrace.c
server/ptrace.c
+17
-0
request.c
server/request.c
+3
-0
No files found.
server/process.c
View file @
cd1c7fc0
...
...
@@ -284,6 +284,7 @@ struct thread *create_process( int fd, struct thread *parent_thread, int inherit
process
->
winstation
=
0
;
process
->
desktop
=
0
;
process
->
token
=
token_create_admin
();
process
->
trace_data
=
0
;
list_init
(
&
process
->
thread_list
);
list_init
(
&
process
->
locks
);
list_init
(
&
process
->
classes
);
...
...
@@ -343,6 +344,7 @@ data_size_t init_process( struct thread *thread )
struct
process
*
process
=
thread
->
process
;
struct
startup_info
*
info
=
process
->
startup_info
;
init_process_tracing
(
process
);
if
(
!
info
)
return
0
;
return
info
->
data_size
;
}
...
...
@@ -599,6 +601,7 @@ static void process_killed( struct process *process )
destroy_process_classes
(
process
);
remove_process_locks
(
process
);
set_process_startup_state
(
process
,
STARTUP_ABORTED
);
finish_process_tracing
(
process
);
start_sigkill_timer
(
process
);
wake_up
(
&
process
->
obj
,
0
);
}
...
...
server/process.h
View file @
cd1c7fc0
...
...
@@ -80,6 +80,7 @@ struct process
struct
list
dlls
;
/* list of loaded dlls */
void
*
peb
;
/* PEB address in client address space */
void
*
ldt_copy
;
/* pointer to LDT copy in client addr space */
unsigned
int
trace_data
;
/* opaque data used by the process tracing mechanism */
};
struct
process_snapshot
...
...
@@ -128,6 +129,10 @@ extern void detach_debugged_processes( struct thread *debugger );
extern
struct
process_snapshot
*
process_snap
(
int
*
count
);
extern
struct
module_snapshot
*
module_snap
(
struct
process
*
process
,
int
*
count
);
extern
void
enum_processes
(
int
(
*
cb
)(
struct
process
*
,
void
*
),
void
*
user
);
extern
void
init_tracing_mechanism
(
void
);
extern
void
init_process_tracing
(
struct
process
*
process
);
extern
void
finish_process_tracing
(
struct
process
*
process
);
extern
int
read_process_memory
(
struct
process
*
process
,
const
void
*
ptr
,
data_size_t
size
,
char
*
dest
);
extern
int
write_process_memory
(
struct
process
*
process
,
void
*
ptr
,
data_size_t
size
,
const
char
*
src
);
...
...
server/ptrace.c
View file @
cd1c7fc0
...
...
@@ -223,6 +223,23 @@ static inline int tkill( int tgid, int pid, int sig )
return
-
1
;
}
/* initialize the process tracing mechanism */
void
init_tracing_mechanism
(
void
)
{
/* no initialization needed for ptrace */
}
/* initialize the per-process tracing mechanism */
void
init_process_tracing
(
struct
process
*
process
)
{
/* ptrace setup is done on-demand */
}
/* terminate the per-process tracing mechanism */
void
finish_process_tracing
(
struct
process
*
process
)
{
}
/* send a Unix signal to a specific thread */
int
send_thread_signal
(
struct
thread
*
thread
,
int
sig
)
{
...
...
server/request.c
View file @
cd1c7fc0
...
...
@@ -800,6 +800,9 @@ void open_master_socket(void)
/* init startup time */
gettimeofday
(
&
server_start_time
,
NULL
);
/* init the process tracing mechanism */
init_tracing_mechanism
();
}
/* master socket timer expiration handler */
...
...
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