Index: kernel/generic/include/udebug/udebug.h
===================================================================
--- kernel/generic/include/udebug/udebug.h	(revision 9c81703396899b0f387e719f5279bbd14aa89698)
+++ kernel/generic/include/udebug/udebug.h	(revision 7d364fb8ea8ef4fe1f9f9a2a7f89c21619faf824)
@@ -36,149 +36,5 @@
 #define KERN_UDEBUG_H_
 
-#define UDEBUG_EVMASK(event)  (1 << ((event) - 1))
-
-typedef enum { /* udebug_method_t */
-	
-	/** Start debugging the recipient.
-	 *
-	 * Causes all threads in the receiving task to stop. When they
-	 * are all stoped, an answer with retval 0 is generated.
-	 *
-	 */
-	UDEBUG_M_BEGIN = 1,
-	
-	/** Finish debugging the recipient.
-	 *
-	 * Answers all pending GO and GUARD messages.
-	 *
-	 */
-	UDEBUG_M_END,
-	
-	/** Set which events should be captured. */
-	UDEBUG_M_SET_EVMASK,
-	
-	/** Make sure the debugged task is still there.
-	 *
-	 * This message is answered when the debugged task dies
-	 * or the debugging session ends.
-	 *
-	 */
-	UDEBUG_M_GUARD,
-	
-	/** Run a thread until a debugging event occurs.
-	 *
-	 * This message is answered when the thread stops
-	 * in a debugging event.
-	 *
-	 * - ARG2 - id of the thread to run
-	 *
-	 */
-	UDEBUG_M_GO,
-	
-	/** Stop a thread being debugged.
-	 *
-	 * Creates a special STOP event in the thread, causing
-	 * it to answer a pending GO message (if any).
-	 *
-	 */
-	UDEBUG_M_STOP,
-	
-	/** Read arguments of a syscall.
-	 *
-	 * - ARG2 - thread identification
-	 * - ARG3 - destination address in the caller's address space
-	 *
-	 */
-	UDEBUG_M_ARGS_READ,
-	
-	/** Read thread's userspace register state (istate_t).
-	 *
-	 * - ARG2 - thread identification
-	 * - ARG3 - destination address in the caller's address space
-	 *
-	 * or, on error, retval will be
-	 * - ENOENT - thread does not exist
-	 * - EBUSY - register state not available
-	 */
-	UDEBUG_M_REGS_READ,
-	
-	/** Read the list of the debugged tasks's threads.
-	 *
-	 * - ARG2 - destination address in the caller's address space
-	 * - ARG3 - size of receiving buffer in bytes
-	 *
-	 * The kernel fills the buffer with a series of sysarg_t values
-	 * (thread ids). On answer, the kernel will set:
-	 *
-	 * - ARG2 - number of bytes that were actually copied
-	 * - ARG3 - number of bytes of the complete data
-	 *
-	 */
-	UDEBUG_M_THREAD_READ,
-	
-	/** Read the name of the debugged task.
-	 *
-	 * - ARG2 - destination address in the caller's address space
-	 * - ARG3 - size of receiving buffer in bytes
-	 *
-	 * The kernel fills the buffer with a non-terminated string.
-	 *
-	 * - ARG2 - number of bytes that were actually copied
-	 * - ARG3 - number of bytes of the complete data
-	 *
-	 */
-	UDEBUG_M_NAME_READ,
-	
-	/** Read the list of the debugged task's address space areas.
-	 *
-	 * - ARG2 - destination address in the caller's address space
-	 * - ARG3 - size of receiving buffer in bytes
-	 *
-	 * The kernel fills the buffer with a series of as_area_info_t structures.
-	 * Upon answer, the kernel will set:
-	 *
-	 * - ARG2 - number of bytes that were actually copied
-	 * - ARG3 - number of bytes of the complete data
-	 *
-	 */
-	UDEBUG_M_AREAS_READ,
-	
-	/** Read the debugged tasks's memory.
-	 *
-	 * - ARG2 - destination address in the caller's address space
-	 * - ARG3 - source address in the recipient's address space
-	 * - ARG4 - size of receiving buffer in bytes
-	 *
-	 */
-	UDEBUG_M_MEM_READ
-} udebug_method_t;
-
-typedef enum {
-	UDEBUG_EVENT_FINISHED = 1,  /**< Debuging session has finished */
-	UDEBUG_EVENT_STOP,          /**< Stopped on DEBUG_STOP request */
-	UDEBUG_EVENT_SYSCALL_B,     /**< Before beginning syscall execution */
-	UDEBUG_EVENT_SYSCALL_E,     /**< After finishing syscall execution */
-	UDEBUG_EVENT_THREAD_B,      /**< The task created a new thread */
-	UDEBUG_EVENT_THREAD_E       /**< A thread exited */
-} udebug_event_t;
-
-typedef enum {
-	UDEBUG_EM_FINISHED = UDEBUG_EVMASK(UDEBUG_EVENT_FINISHED),
-	UDEBUG_EM_STOP = UDEBUG_EVMASK(UDEBUG_EVENT_STOP),
-	UDEBUG_EM_SYSCALL_B = UDEBUG_EVMASK(UDEBUG_EVENT_SYSCALL_B),
-	UDEBUG_EM_SYSCALL_E = UDEBUG_EVMASK(UDEBUG_EVENT_SYSCALL_E),
-	UDEBUG_EM_THREAD_B = UDEBUG_EVMASK(UDEBUG_EVENT_THREAD_B),
-	UDEBUG_EM_THREAD_E = UDEBUG_EVMASK(UDEBUG_EVENT_THREAD_E),
-	UDEBUG_EM_ALL =
-	    (UDEBUG_EVMASK(UDEBUG_EVENT_FINISHED) |
-	    UDEBUG_EVMASK(UDEBUG_EVENT_STOP) |
-	    UDEBUG_EVMASK(UDEBUG_EVENT_SYSCALL_B) |
-	    UDEBUG_EVMASK(UDEBUG_EVENT_SYSCALL_E) |
-	    UDEBUG_EVMASK(UDEBUG_EVENT_THREAD_B) |
-	    UDEBUG_EVMASK(UDEBUG_EVENT_THREAD_E))
-} udebug_evmask_t;
-
-#ifdef KERNEL
-
+#include <abi/udebug.h>
 #include <ipc/ipc.h>
 #include <synch/mutex.h>
@@ -251,6 +107,4 @@
 #endif
 
-#endif
-
 /** @}
  */
