Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 172680
b: refs/heads/master
c: f60a557
h: refs/heads/master
v: v3
  • Loading branch information
Greg Ungerer authored and Geert Uytterhoeven committed Dec 6, 2009
1 parent 0cf5e59 commit 26db9f3
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 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: f195e2bff3000b8bc251ee6f685e0f027eec6f25
refs/heads/master: f60a5572679ef8508b62bd82063b05ffbe838716
2 changes: 1 addition & 1 deletion trunk/arch/m68k/include/asm/ptrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,11 @@ extern void show_regs(struct pt_regs *);
*/
struct task_struct;

#ifdef CONFIG_MMU
#define arch_has_single_step() (1)
extern void user_enable_single_step(struct task_struct *);
extern void user_disable_single_step(struct task_struct *);

#ifdef CONFIG_MMU
#define arch_has_block_step() (1)
extern void user_enable_block_step(struct task_struct *);
#endif
Expand Down
18 changes: 15 additions & 3 deletions trunk/arch/m68knommu/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,17 +86,29 @@ static inline int put_reg(struct task_struct *task, int regno,
return 0;
}

void user_enable_single_step(struct task_struct *task)
{
unsigned long srflags;
srflags = get_reg(task, PT_SR) | (TRACE_BITS << 16);
put_reg(task, PT_SR, srflags);
}

void user_disable_single_step(struct task_struct *task)
{
unsigned long srflags;
srflags = get_reg(task, PT_SR) & ~(TRACE_BITS << 16);
put_reg(task, PT_SR, srflags);
}

/*
* Called by kernel/ptrace.c when detaching..
*
* Make sure the single step bit is not set.
*/
void ptrace_disable(struct task_struct *child)
{
unsigned long tmp;
/* make sure the single step bit is not set. */
tmp = get_reg(child, PT_SR) & ~(TRACE_BITS << 16);
put_reg(child, PT_SR, tmp);
user_disable_single_step(child);
}

long arch_ptrace(struct task_struct *child, long request, long addr, long data)
Expand Down

0 comments on commit 26db9f3

Please sign in to comment.