Changeset View
Changeset View
Standalone View
Standalone View
head/sys/kern/sys_process.c
Show First 20 Lines • Show All 91 Lines • ▼ Show 20 Lines | struct ptrace_lwpinfo32 { | ||||
lwpid_t pl_lwpid; /* LWP described. */ | lwpid_t pl_lwpid; /* LWP described. */ | ||||
int pl_event; /* Event that stopped the LWP. */ | int pl_event; /* Event that stopped the LWP. */ | ||||
int pl_flags; /* LWP flags. */ | int pl_flags; /* LWP flags. */ | ||||
sigset_t pl_sigmask; /* LWP signal mask */ | sigset_t pl_sigmask; /* LWP signal mask */ | ||||
sigset_t pl_siglist; /* LWP pending signal */ | sigset_t pl_siglist; /* LWP pending signal */ | ||||
struct siginfo32 pl_siginfo; /* siginfo for signal */ | struct siginfo32 pl_siginfo; /* siginfo for signal */ | ||||
char pl_tdname[MAXCOMLEN + 1]; /* LWP name. */ | char pl_tdname[MAXCOMLEN + 1]; /* LWP name. */ | ||||
int pl_child_pid; /* New child pid */ | int pl_child_pid; /* New child pid */ | ||||
u_int pl_syscall_code; | |||||
u_int pl_syscall_narg; | |||||
}; | }; | ||||
#endif | #endif | ||||
/* | /* | ||||
* Functions implemented using PROC_ACTION(): | * Functions implemented using PROC_ACTION(): | ||||
* | * | ||||
* proc_read_regs(proc, regs) | * proc_read_regs(proc, regs) | ||||
▲ Show 20 Lines • Show All 368 Lines • ▼ Show 20 Lines | ptrace_lwpinfo_to32(const struct ptrace_lwpinfo *pl, | ||||
pl32->pl_lwpid = pl->pl_lwpid; | pl32->pl_lwpid = pl->pl_lwpid; | ||||
pl32->pl_event = pl->pl_event; | pl32->pl_event = pl->pl_event; | ||||
pl32->pl_flags = pl->pl_flags; | pl32->pl_flags = pl->pl_flags; | ||||
pl32->pl_sigmask = pl->pl_sigmask; | pl32->pl_sigmask = pl->pl_sigmask; | ||||
pl32->pl_siglist = pl->pl_siglist; | pl32->pl_siglist = pl->pl_siglist; | ||||
siginfo_to_siginfo32(&pl->pl_siginfo, &pl32->pl_siginfo); | siginfo_to_siginfo32(&pl->pl_siginfo, &pl32->pl_siginfo); | ||||
strcpy(pl32->pl_tdname, pl->pl_tdname); | strcpy(pl32->pl_tdname, pl->pl_tdname); | ||||
pl32->pl_child_pid = pl->pl_child_pid; | pl32->pl_child_pid = pl->pl_child_pid; | ||||
pl32->pl_syscall_code = pl->pl_syscall_code; | |||||
pl32->pl_syscall_narg = pl->pl_syscall_narg; | |||||
} | } | ||||
#endif /* COMPAT_FREEBSD32 */ | #endif /* COMPAT_FREEBSD32 */ | ||||
/* | /* | ||||
* Process debugging system call. | * Process debugging system call. | ||||
*/ | */ | ||||
#ifndef _SYS_SYSPROTO_H_ | #ifndef _SYS_SYSPROTO_H_ | ||||
struct ptrace_args { | struct ptrace_args { | ||||
▲ Show 20 Lines • Show All 714 Lines • ▼ Show 20 Lines | if (td2->td_dbgflags & TDB_FORK) { | ||||
pl->pl_flags |= PL_FLAG_FORKED; | pl->pl_flags |= PL_FLAG_FORKED; | ||||
pl->pl_child_pid = td2->td_dbg_forked; | pl->pl_child_pid = td2->td_dbg_forked; | ||||
} | } | ||||
if (td2->td_dbgflags & TDB_CHILD) | if (td2->td_dbgflags & TDB_CHILD) | ||||
pl->pl_flags |= PL_FLAG_CHILD; | pl->pl_flags |= PL_FLAG_CHILD; | ||||
pl->pl_sigmask = td2->td_sigmask; | pl->pl_sigmask = td2->td_sigmask; | ||||
pl->pl_siglist = td2->td_siglist; | pl->pl_siglist = td2->td_siglist; | ||||
strcpy(pl->pl_tdname, td2->td_name); | strcpy(pl->pl_tdname, td2->td_name); | ||||
if ((td2->td_dbgflags & (TDB_SCE | TDB_SCX)) != 0) { | |||||
pl->pl_syscall_code = td2->td_dbg_sc_code; | |||||
pl->pl_syscall_narg = td2->td_dbg_sc_narg; | |||||
} else { | |||||
pl->pl_syscall_code = 0; | |||||
pl->pl_syscall_narg = 0; | |||||
} | |||||
#ifdef COMPAT_FREEBSD32 | #ifdef COMPAT_FREEBSD32 | ||||
if (wrap32) | if (wrap32) | ||||
ptrace_lwpinfo_to32(pl, pl32); | ptrace_lwpinfo_to32(pl, pl32); | ||||
#endif | #endif | ||||
CTR5(KTR_PTRACE, | CTR5(KTR_PTRACE, | ||||
"PT_LWPINFO: tid %d (pid %d) event %d flags %#x child pid %d", | "PT_LWPINFO: tid %d (pid %d) event %d flags %#x child pid %d", | ||||
td2->td_tid, p->p_pid, pl->pl_event, pl->pl_flags, | td2->td_tid, p->p_pid, pl->pl_event, pl->pl_flags, | ||||
pl->pl_child_pid); | pl->pl_child_pid); | ||||
▲ Show 20 Lines • Show All 97 Lines • Show Last 20 Lines |