Commit fc476464 authored by Jeff Dike's avatar Jeff Dike Committed by Linus Torvalds

[PATCH] uml: generic singlestep syscall

From: Bodo Stroesser - Make singlestep_syscall generic rather than being
restricted to tt mode.
Signed-off-by: default avatarJeff Dike <jdike@addtoit.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 865994e8
...@@ -154,7 +154,7 @@ static int kern_do_signal(struct pt_regs *regs, sigset_t *oldset) ...@@ -154,7 +154,7 @@ static int kern_do_signal(struct pt_regs *regs, sigset_t *oldset)
*/ */
if((current->ptrace & PT_DTRACE) && if((current->ptrace & PT_DTRACE) &&
is_syscall(PT_REGS_IP(&current->thread.regs))) is_syscall(PT_REGS_IP(&current->thread.regs)))
(void) CHOOSE_MODE(current->thread.mode.tt.singlestep_syscall = 1, 0); current->thread.singlestep_syscall = 1;
return(0); return(0);
} }
......
...@@ -527,7 +527,7 @@ int singlestepping_tt(void *t) ...@@ -527,7 +527,7 @@ int singlestepping_tt(void *t)
{ {
struct task_struct *task = t; struct task_struct *task = t;
if(task->thread.mode.tt.singlestep_syscall) if(task->thread.singlestep_syscall)
return(0); return(0);
return(task->ptrace & PT_DTRACE); return(task->ptrace & PT_DTRACE);
} }
......
...@@ -123,8 +123,8 @@ long execute_syscall_tt(void *r) ...@@ -123,8 +123,8 @@ long execute_syscall_tt(void *r)
set_fs(USER_DS); set_fs(USER_DS);
if(current->thread.mode.tt.singlestep_syscall){ if(current->thread.singlestep_syscall){
current->thread.mode.tt.singlestep_syscall = 0; current->thread.singlestep_syscall = 0;
current->ptrace &= ~PT_DTRACE; current->ptrace &= ~PT_DTRACE;
force_sig(SIGTRAP, current); force_sig(SIGTRAP, current);
} }
......
...@@ -25,6 +25,7 @@ struct thread_struct { ...@@ -25,6 +25,7 @@ struct thread_struct {
unsigned long cr2; unsigned long cr2;
int err; int err;
unsigned long trap_no; unsigned long trap_no;
int singlestep_syscall;
void *fault_addr; void *fault_addr;
void *fault_catcher; void *fault_catcher;
struct task_struct *prev_sched; struct task_struct *prev_sched;
...@@ -37,7 +38,6 @@ struct thread_struct { ...@@ -37,7 +38,6 @@ struct thread_struct {
int extern_pid; int extern_pid;
int tracing; int tracing;
int switch_pipe[2]; int switch_pipe[2];
int singlestep_syscall;
int vm_seq; int vm_seq;
} tt; } tt;
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment