Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-fonts
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
Aleksandr Isakov
wine-fonts
Commits
7614180e
Commit
7614180e
authored
Jul 11, 2001
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Small fixes to the debugger support.
parent
e630aa0b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
7 deletions
+21
-7
context_i386.c
server/context_i386.c
+4
-5
debugger.c
server/debugger.c
+1
-2
process.c
server/process.c
+15
-0
process.h
server/process.h
+1
-0
No files found.
server/context_i386.c
View file @
7614180e
...
...
@@ -150,11 +150,10 @@ static void set_thread_context( struct thread *thread, unsigned int flags, CONTE
if
(
flags
&
CONTEXT_FULL
)
{
struct
kernel_user_regs_struct
regs
;
if
(((
flags
|
CONTEXT_i386
)
&
CONTEXT_FULL
)
!=
CONTEXT_FULL
)
{
/* need to preserve some registers */
if
(
ptrace
(
PTRACE_GETREGS
,
pid
,
0
,
&
regs
)
==
-
1
)
goto
error
;
}
/* need to preserve some registers (at a minimum orig_eax must always be preserved) */
if
(
ptrace
(
PTRACE_GETREGS
,
pid
,
0
,
&
regs
)
==
-
1
)
goto
error
;
if
(
flags
&
CONTEXT_INTEGER
)
{
regs
.
eax
=
context
->
Eax
;
...
...
server/debugger.c
View file @
7614180e
...
...
@@ -411,13 +411,12 @@ static int debugger_attach( struct process *process, struct thread *debugger )
for
(
thread
=
debugger
;
thread
;
thread
=
thread
->
process
->
debugger
)
if
(
thread
->
process
==
process
)
goto
error
;
suspend_process
(
process
);
suspend_process
_for_ptrace
(
process
);
/* we must have been able to attach all threads */
for
(
thread
=
process
->
thread_list
;
thread
;
thread
=
thread
->
proc_next
)
if
(
!
thread
->
attached
)
{
fprintf
(
stderr
,
"%p not attached
\n
"
,
thread
);
resume_process
(
process
);
goto
error
;
}
...
...
server/process.c
View file @
7614180e
...
...
@@ -491,6 +491,21 @@ void suspend_process( struct process *process )
}
}
/* suspend all the threads of a process to allow using ptrace on it*/
void
suspend_process_for_ptrace
(
struct
process
*
process
)
{
if
(
!
process
->
suspend
++
)
{
struct
thread
*
thread
=
process
->
thread_list
;
for
(;
thread
;
thread
=
thread
->
proc_next
)
{
if
(
thread
->
suspend
)
continue
;
if
(
suspend_for_ptrace
(
thread
))
thread
->
suspend
--
;
/* since the process is suspended, not the thread */
}
}
}
/* resume all the threads of a process */
void
resume_process
(
struct
process
*
process
)
{
...
...
server/process.h
View file @
7614180e
...
...
@@ -81,6 +81,7 @@ extern void add_process_thread( struct process *process,
extern
void
remove_process_thread
(
struct
process
*
process
,
struct
thread
*
thread
);
extern
void
suspend_process
(
struct
process
*
process
);
extern
void
suspend_process_for_ptrace
(
struct
process
*
process
);
extern
void
resume_process
(
struct
process
*
process
);
extern
void
kill_process
(
struct
process
*
process
,
struct
thread
*
skip
,
int
exit_code
);
extern
void
kill_debugged_processes
(
struct
thread
*
debugger
,
int
exit_code
);
...
...
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