]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/kern/etap_macros.h
xnu-344.tar.gz
[apple/xnu.git] / osfmk / kern / etap_macros.h
index 7935b6276c50575d6f9d25fdcfc01bb03bb5ef6a..530522648edbb0a3c8afecac5212863cc90c3eab 100644 (file)
 
 #if    ETAP
 
-#include <kern/macro_help.h>
 #include <mach/vm_param.h>
-#include <ipc/ipc_types.h>
 #include <mach/message.h>
 
+#include <kern/macro_help.h>
+
 extern void etap_init_phase1(void);
 extern void etap_init_phase2(void);
 extern void etap_event_table_assign(struct event_table_chain *, etap_event_t);
@@ -261,6 +261,22 @@ MACRO_END
 #endif /* ETAP_LOCK_MONITOR */
 
 
+#if     ETAP_EVENT_MONITOR
+
+#include <mach/exception_types.h>
+
+#define ETAP_EXCEPTION_PROBE(_f, _th, _ex, _sysnum)             \
+        if (_ex == EXC_SYSCALL) {                               \
+                ETAP_PROBE_DATA(ETAP_P_SYSCALL_UNIX,            \
+                                _f,                             \
+                                _th,                            \
+                                _sysnum,                        \
+                                sizeof(int));                   \
+        }
+#else   /* ETAP_EVENT_MONITOR */
+#define ETAP_EXCEPTION_PROBE(_f, _th, _ex, _sysnum)
+#endif  /* ETAP_EVENT_MONITOR */
+
 #if    ETAP_EVENT_MONITOR
 
 #define ETAP_PROBE_DATA_COND(_event, _flags, _thread, _data, _size, _cond)                  \