From 343b391f207773b5dc82b35eb055fd74a7f4ee02 Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Sat, 11 Feb 2012 14:49:25 +0000 Subject: [PATCH] The PTRACESTOP() macro is used only once. Inline the only use and remove the macro. MFC after: 1 week --- sys/kern/subr_syscall.c | 6 +++++- sys/sys/ptrace.h | 6 ------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/sys/kern/subr_syscall.c b/sys/kern/subr_syscall.c index 75328f6a637..9c4dd4888f5 100644 --- a/sys/kern/subr_syscall.c +++ b/sys/kern/subr_syscall.c @@ -85,7 +85,11 @@ syscallenter(struct thread *td, struct syscall_args *sa) if (error == 0) { STOPEVENT(p, S_SCE, sa->narg); - PTRACESTOP_SC(p, td, S_PT_SCE); + if (p->p_flag & P_TRACED && p->p_stops & S_PT_SCE) { + PROC_LOCK(p); + ptracestop((td), SIGTRAP); + PROC_UNLOCK(p); + } if (td->td_dbgflags & TDB_USERWR) { /* * Reread syscall number and arguments if diff --git a/sys/sys/ptrace.h b/sys/sys/ptrace.h index 8a02495e6ec..e770a0612ea 100644 --- a/sys/sys/ptrace.h +++ b/sys/sys/ptrace.h @@ -131,12 +131,6 @@ struct ptrace_vm_entry { #ifdef _KERNEL -#define PTRACESTOP_SC(p, td, flag) \ - if ((p)->p_flag & P_TRACED && (p)->p_stops & (flag)) { \ - PROC_LOCK(p); \ - ptracestop((td), SIGTRAP); \ - PROC_UNLOCK(p); \ - } /* * The flags below are used for ptrace(2) tracing and have no relation * to procfs. They are stored in struct proc's p_stops member.