Author: rpaulo
Date: Sun Aug 22 11:41:06 2010
New Revision: 211618
URL: http://svn.freebsd.org/changeset/base/211618

Log:
  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

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/sys/fasttrap_impl.h

Modified: head/sys/cddl/contrib/opensolaris/uts/common/sys/fasttrap_impl.h
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/sys/fasttrap_impl.h    Sun Aug 
22 11:30:49 2010        (r211617)
+++ head/sys/cddl/contrib/opensolaris/uts/common/sys/fasttrap_impl.h    Sun Aug 
22 11:41:06 2010        (r211618)
@@ -158,10 +158,16 @@ typedef struct fasttrap_hash {
  */
 #define        fasttrap_copyout        copyout
 #define        fasttrap_fuword32       fuword32
-#define        fasttrap_suword32       suword32
+#define        fasttrap_suword32(_k, _u)       copyout((_k), (_u), 
sizeof(uint32_t))
+#define        fasttrap_suword64(_k, _u)       copyout((_k), (_u), 
sizeof(uint64_t))
 
-#define        fasttrap_fulword        fulword
-#define        fasttrap_sulword        sulword
+#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
 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);
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to