diff options
author | Roland McGrath <roland@redhat.com> | 2008-01-30 07:30:48 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-01-30 07:30:48 -0500 |
commit | 7f232343e0ea37ffc0a552cdbd4825482c949281 (patch) | |
tree | 8af4ce9586fa4288dbbd59ff2c79ccd62dc135db /arch/x86/kernel/ptrace_32.c | |
parent | 77c03dcd448aa4c7be45f4edb97381ef463e3911 (diff) |
x86: arch_has_single_step
This defines the new standard arch_has_single_step macro. It makes the
existing set_singlestep and clear_singlestep entry points global, and
renames them to the new standard names user_enable_single_step and
user_disable_single_step, respectively.
Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/kernel/ptrace_32.c')
-rw-r--r-- | arch/x86/kernel/ptrace_32.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/x86/kernel/ptrace_32.c b/arch/x86/kernel/ptrace_32.c index 4619bda470b6..1402a54ef61f 100644 --- a/arch/x86/kernel/ptrace_32.c +++ b/arch/x86/kernel/ptrace_32.c | |||
@@ -218,7 +218,7 @@ static inline int is_setting_trap_flag(struct task_struct *child, struct pt_regs | |||
218 | return 0; | 218 | return 0; |
219 | } | 219 | } |
220 | 220 | ||
221 | static void set_singlestep(struct task_struct *child) | 221 | void user_enable_single_step(struct task_struct *child) |
222 | { | 222 | { |
223 | struct pt_regs *regs = get_child_regs(child); | 223 | struct pt_regs *regs = get_child_regs(child); |
224 | 224 | ||
@@ -249,7 +249,7 @@ static void set_singlestep(struct task_struct *child) | |||
249 | child->ptrace |= PT_DTRACE; | 249 | child->ptrace |= PT_DTRACE; |
250 | } | 250 | } |
251 | 251 | ||
252 | static void clear_singlestep(struct task_struct *child) | 252 | void user_disable_single_step(struct task_struct *child) |
253 | { | 253 | { |
254 | /* Always clear TIF_SINGLESTEP... */ | 254 | /* Always clear TIF_SINGLESTEP... */ |
255 | clear_tsk_thread_flag(child, TIF_SINGLESTEP); | 255 | clear_tsk_thread_flag(child, TIF_SINGLESTEP); |
@@ -269,7 +269,7 @@ static void clear_singlestep(struct task_struct *child) | |||
269 | */ | 269 | */ |
270 | void ptrace_disable(struct task_struct *child) | 270 | void ptrace_disable(struct task_struct *child) |
271 | { | 271 | { |
272 | clear_singlestep(child); | 272 | user_disable_single_step(child); |
273 | clear_tsk_thread_flag(child, TIF_SYSCALL_EMU); | 273 | clear_tsk_thread_flag(child, TIF_SYSCALL_EMU); |
274 | } | 274 | } |
275 | 275 | ||
@@ -403,7 +403,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
403 | } | 403 | } |
404 | child->exit_code = data; | 404 | child->exit_code = data; |
405 | /* make sure the single step bit is not set. */ | 405 | /* make sure the single step bit is not set. */ |
406 | clear_singlestep(child); | 406 | user_disable_single_step(child); |
407 | wake_up_process(child); | 407 | wake_up_process(child); |
408 | ret = 0; | 408 | ret = 0; |
409 | break; | 409 | break; |
@@ -419,7 +419,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
419 | break; | 419 | break; |
420 | child->exit_code = SIGKILL; | 420 | child->exit_code = SIGKILL; |
421 | /* make sure the single step bit is not set. */ | 421 | /* make sure the single step bit is not set. */ |
422 | clear_singlestep(child); | 422 | user_disable_single_step(child); |
423 | wake_up_process(child); | 423 | wake_up_process(child); |
424 | break; | 424 | break; |
425 | 425 | ||
@@ -435,7 +435,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
435 | clear_tsk_thread_flag(child, TIF_SYSCALL_EMU); | 435 | clear_tsk_thread_flag(child, TIF_SYSCALL_EMU); |
436 | 436 | ||
437 | clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); | 437 | clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); |
438 | set_singlestep(child); | 438 | user_enable_single_step(child); |
439 | child->exit_code = data; | 439 | child->exit_code = data; |
440 | /* give it a chance to run. */ | 440 | /* give it a chance to run. */ |
441 | wake_up_process(child); | 441 | wake_up_process(child); |