diff options
author | rpaulo <rpaulo@FreeBSD.org> | 2010-08-22 11:41:06 +0000 |
---|---|---|
committer | rpaulo <rpaulo@FreeBSD.org> | 2010-08-22 11:41:06 +0000 |
commit | 8111273b840f5fb9e4e4739f35d615a84b6e45fd (patch) | |
tree | b345a6312ebee46d6c5a18704de1fd66a23b9c4c | |
parent | dda24289cbc6154eda025e717c3f7abaf3875fdc (diff) | |
download | FreeBSD-src-8111273b840f5fb9e4e4739f35d615a84b6e45fd.zip FreeBSD-src-8111273b840f5fb9e4e4739f35d615a84b6e45fd.tar.gz |
Port this to FreeBSD. We miss some suword functions, so we use copyout.
Sponsored by: The FreeBSD Foundation
> Description of fields to fill in above: 76 columns --|
> PR: If a GNATS PR is affected by the change.
> Submitted by: If someone else sent in the change.
> Reviewed by: If someone else reviewed your modification.
> Approved by: If you needed approval for this commit.
> Obtained from: If the change is from a third party.
> MFC after: N [day[s]|week[s]|month[s]]. Request a reminder email.
> Security: Vulnerability reference (one per line) or description.
> Empty fields above will be automatically removed.
M sys/fasttrap_impl.h
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/sys/fasttrap_impl.h | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/sys/fasttrap_impl.h b/sys/cddl/contrib/opensolaris/uts/common/sys/fasttrap_impl.h index 232b5f6..a4e51fd 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/sys/fasttrap_impl.h +++ b/sys/cddl/contrib/opensolaris/uts/common/sys/fasttrap_impl.h @@ -158,10 +158,16 @@ typedef struct fasttrap_hash { */ #define fasttrap_copyout copyout #define fasttrap_fuword32 fuword32 -#define fasttrap_suword32 suword32 - -#define fasttrap_fulword fulword -#define fasttrap_sulword sulword +#define fasttrap_suword32(_k, _u) copyout((_k), (_u), sizeof(uint32_t)) +#define fasttrap_suword64(_k, _u) copyout((_k), (_u), sizeof(uint64_t)) + +#ifdef __amd64__ +#define fasttrap_fulword fuword64 +#define fasttrap_sulword fasttrap_suword64 +#else +#define fasttrap_fulword fuword32 +#define fasttrap_sulword fasttrap_suword32 +#endif extern void fasttrap_sigtrap(proc_t *, kthread_t *, uintptr_t); @@ -179,8 +185,9 @@ extern int fasttrap_tracepoint_init(proc_t *, fasttrap_tracepoint_t *, extern int fasttrap_tracepoint_install(proc_t *, fasttrap_tracepoint_t *); extern int fasttrap_tracepoint_remove(proc_t *, fasttrap_tracepoint_t *); -extern int fasttrap_pid_probe(struct regs *); -extern int fasttrap_return_probe(struct regs *); +struct reg; +extern int fasttrap_pid_probe(struct reg *); +extern int fasttrap_return_probe(struct reg *); extern uint64_t fasttrap_pid_getarg(void *, dtrace_id_t, void *, int, int); extern uint64_t fasttrap_usdt_getarg(void *, dtrace_id_t, void *, int, int); |