Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
ada73838
Commit
ada73838
authored
Apr 27, 2001
by
Ove Kaaven
Committed by
Alexandre Julliard
Apr 27, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Preserve the TF (Trap Flag) when continuing from a ptraced suspend.
parent
15a3b743
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
5 deletions
+28
-5
context_i386.c
server/context_i386.c
+9
-0
context_sparc.c
server/context_sparc.c
+6
-0
ptrace.c
server/ptrace.c
+12
-5
thread.h
server/thread.h
+1
-0
No files found.
server/context_i386.c
View file @
ada73838
...
...
@@ -474,6 +474,15 @@ void *get_thread_ip( struct thread *thread )
return
(
void
*
)
context
.
Eip
;
}
/* determine if we should continue the thread in single-step mode */
int
get_thread_single_step
(
struct
thread
*
thread
)
{
CONTEXT
context
;
if
(
thread
->
context
)
return
0
;
/* don't single-step inside exception event */
get_thread_context
(
thread
,
CONTEXT_CONTROL
,
&
context
);
return
(
context
.
EFlags
&
0x100
)
!=
0
;
}
/* retrieve the current context of a thread */
DECL_HANDLER
(
get_thread_context
)
{
...
...
server/context_sparc.c
View file @
ada73838
...
...
@@ -157,6 +157,12 @@ void *get_thread_ip( struct thread *thread )
return
(
void
*
)
context
.
pc
;
}
/* determine if we should continue the thread in single-step mode */
int
get_thread_single_step
(
struct
thread
*
thread
)
{
return
0
;
/* FIXME */
}
/* retrieve the current context of a thread */
DECL_HANDLER
(
get_thread_context
)
{
...
...
server/ptrace.c
View file @
ada73838
...
...
@@ -26,6 +26,9 @@
#ifndef PTRACE_CONT
#define PTRACE_CONT PT_CONTINUE
#endif
#ifndef PTRACE_SINGLESTEP
#define PTRACE_SINGLESTEP PT_STEP
#endif
#ifndef PTRACE_ATTACH
#define PTRACE_ATTACH PT_ATTACH
#endif
...
...
@@ -49,6 +52,7 @@ static const int use_ptrace = 0;
#define PT_DETACH 2
#define PT_READ_D 3
#define PT_WRITE_D 4
#define PT_STEP 5
static
int
ptrace
(
int
req
,
...)
{
return
-
1
;
/*FAIL*/
}
#endif
...
...
@@ -64,11 +68,13 @@ static int handle_child_status( struct thread *thread, int pid, int status )
switch
(
sig
)
{
case
SIGSTOP
:
/* continue at once if not suspended */
if
(
!
thread
||
!
(
thread
->
process
->
suspend
+
thread
->
suspend
))
ptrace
(
PTRACE_CONT
,
pid
,
(
caddr_t
)
1
,
sig
);
break
;
if
(
thread
&&
(
thread
->
process
->
suspend
+
thread
->
suspend
))
break
;
/* fall through */
default:
/* ignore other signals for now */
ptrace
(
PTRACE_CONT
,
pid
,
(
caddr_t
)
1
,
sig
);
if
(
thread
&&
get_thread_single_step
(
thread
))
ptrace
(
PTRACE_SINGLESTEP
,
pid
,
(
caddr_t
)
1
,
sig
);
else
ptrace
(
PTRACE_CONT
,
pid
,
(
caddr_t
)
1
,
sig
);
break
;
}
return
sig
;
...
...
@@ -168,7 +174,8 @@ 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
,
(
caddr_t
)
1
,
SIGSTOP
);
else
ptrace
(
get_thread_single_step
(
thread
)
?
PTRACE_SINGLESTEP
:
PTRACE_CONT
,
thread
->
unix_pid
,
(
caddr_t
)
1
,
SIGSTOP
);
}
/* suspend a thread to allow using ptrace on it */
...
...
server/thread.h
View file @
ada73838
...
...
@@ -118,6 +118,7 @@ extern int suspend_for_ptrace( struct thread *thread );
extern
int
read_thread_int
(
struct
thread
*
thread
,
const
int
*
addr
,
int
*
data
);
extern
int
write_thread_int
(
struct
thread
*
thread
,
int
*
addr
,
int
data
,
unsigned
int
mask
);
extern
void
*
get_thread_ip
(
struct
thread
*
thread
);
extern
int
get_thread_single_step
(
struct
thread
*
thread
);
extern
unsigned
int
global_error
;
/* global error code for when no thread is current */
...
...
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