Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 188509
b: refs/heads/master
c: 600482c
h: refs/heads/master
i:
  188507: 3fbac3e
v: v3
  • Loading branch information
Mike Frysinger committed Mar 9, 2010
1 parent ae44e0f commit 8881b2d
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e8f263dfd32a784a816fe68956e564f8ede4a9fc
refs/heads/master: 600482c13d3d3612d71f39d8aaec47f63aafa801
2 changes: 2 additions & 0 deletions trunk/arch/blackfin/include/asm/thread_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ static inline struct thread_info *current_thread_info(void)
#define TIF_FREEZE 6 /* is freezing for suspend */
#define TIF_IRQ_SYNC 7 /* sync pipeline stage */
#define TIF_NOTIFY_RESUME 8 /* callback before returning to user */
#define TIF_SINGLESTEP 9

/* as above, but as bit values */
#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE)
Expand All @@ -113,6 +114,7 @@ static inline struct thread_info *current_thread_info(void)
#define _TIF_FREEZE (1<<TIF_FREEZE)
#define _TIF_IRQ_SYNC (1<<TIF_IRQ_SYNC)
#define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME)
#define _TIF_SINGLESTEP (1<<TIF_SINGLESTEP)

#define _TIF_WORK_MASK 0x0000FFFE /* work to do on interrupt/exception return */

Expand Down
11 changes: 9 additions & 2 deletions trunk/arch/blackfin/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,12 +220,16 @@ void user_enable_single_step(struct task_struct *child)
{
struct pt_regs *regs = task_pt_regs(child);
regs->syscfg |= SYSCFG_SSSTEP;

set_tsk_thread_flag(child, TIF_SINGLESTEP);
}

void user_disable_single_step(struct task_struct *child)
{
struct pt_regs *regs = task_pt_regs(child);
regs->syscfg &= ~SYSCFG_SSSTEP;

clear_tsk_thread_flag(child, TIF_SINGLESTEP);
}

long arch_ptrace(struct task_struct *child, long request, long addr, long data)
Expand Down Expand Up @@ -401,6 +405,9 @@ asmlinkage int syscall_trace_enter(struct pt_regs *regs)

asmlinkage void syscall_trace_leave(struct pt_regs *regs)
{
if (test_thread_flag(TIF_SYSCALL_TRACE))
tracehook_report_syscall_exit(regs, 0);
int step;

step = test_thread_flag(TIF_SINGLESTEP);
if (step || test_thread_flag(TIF_SYSCALL_TRACE))
tracehook_report_syscall_exit(regs, step);
}
3 changes: 2 additions & 1 deletion trunk/arch/blackfin/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,8 @@ asmlinkage void do_signal(struct pt_regs *regs)
if (test_thread_flag(TIF_RESTORE_SIGMASK))
clear_thread_flag(TIF_RESTORE_SIGMASK);

tracehook_signal_handler(signr, &info, &ka, regs, 1);
tracehook_signal_handler(signr, &info, &ka, regs,
test_thread_flag(TIF_SINGLESTEP));
}

return;
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/blackfin/mach-common/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -642,6 +642,8 @@ ENTRY(_system_call)
r7 = [p2+TI_FLAGS];
CC = BITTST(r7,TIF_SYSCALL_TRACE);
if CC JUMP _sys_trace;
CC = BITTST(r7,TIF_SINGLESTEP);
if CC JUMP _sys_trace;

/* Execute the appropriate system call */

Expand Down

0 comments on commit 8881b2d

Please sign in to comment.