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
Releases
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
Johnny Cai
wine
Commits
7614180e
Commit
7614180e
authored
23 years ago
by
Alexandre Julliard
Browse files
Options
Downloads
Patches
Plain Diff
Small fixes to the debugger support.
parent
e630aa0b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
server/context_i386.c
+4
-5
4 additions, 5 deletions
server/context_i386.c
server/debugger.c
+1
-2
1 addition, 2 deletions
server/debugger.c
server/process.c
+15
-0
15 additions, 0 deletions
server/process.c
server/process.h
+1
-0
1 addition, 0 deletions
server/process.h
with
21 additions
and
7 deletions
server/context_i386.c
+
4
−
5
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
;
...
...
This diff is collapsed.
Click to expand it.
server/debugger.c
+
1
−
2
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
;
}
...
...
This diff is collapsed.
Click to expand it.
server/process.c
+
15
−
0
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
)
{
...
...
This diff is collapsed.
Click to expand it.
server/process.h
+
1
−
0
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
);
...
...
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