allow coexistance of N build and AC build.
[tomato.git] / release / src-rt-6.x / linux / linux-2.6 / arch / arm / kernel / ptrace.h
blobdef3b6184a7962756c11ec849d68d962b2f98567
1 /*
2 * linux/arch/arm/kernel/ptrace.h
4 * Copyright (C) 2000-2003 Russell King
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10 #include <linux/ptrace.h>
12 extern void ptrace_cancel_bpt(struct task_struct *);
13 extern void ptrace_set_bpt(struct task_struct *);
14 extern void ptrace_break(struct task_struct *, struct pt_regs *);
17 * make sure single-step breakpoint is gone.
19 static inline void single_step_disable(struct task_struct *task)
21 task->ptrace &= ~PT_SINGLESTEP;
22 ptrace_cancel_bpt(task);
25 static inline void single_step_enable(struct task_struct *task)
27 task->ptrace |= PT_SINGLESTEP;
31 * Send SIGTRAP if we're single-stepping
33 static inline void single_step_trap(struct task_struct *task)
35 if (task->ptrace & PT_SINGLESTEP) {
36 ptrace_cancel_bpt(task);
37 send_sig(SIGTRAP, task, 1);
41 static inline void single_step_clear(struct task_struct *task)
43 if (task->ptrace & PT_SINGLESTEP)
44 ptrace_cancel_bpt(task);
47 static inline void single_step_set(struct task_struct *task)
49 if (task->ptrace & PT_SINGLESTEP)
50 ptrace_set_bpt(task);