/** @addtogroup tdebug
* @{
*/
/** @file
*/
#ifndef KERN_TDEBUG_H_
#define KERN_TDEBUG_H_
#include <atomic.h>
#include <arch/types.h>
#include <tdebug/tdebug_type.h>
#include <arch.h>
/*
* Managing tdebug structures.
*/
void tdebug_task_init(struct task *ta);
void tdebug_thread_init(struct thread *t);
void tdebug_cleanup(void);
/*
* Creating hooks at strategic points in the kernel.
*/
void tdebug_syscall_event(unative_t a1, unative_t a2, unative_t a3,
unative_t a4, unative_t a5, unative_t a6, unative_t id, unative_t rc);
void tdebug_exception_event(int n);
void tdebug_stopping_point(void);
static inline int tdebug_have_monitor()
{
return atomic_get(&TASK->tdebug.have_monitor);
}
/*
* Used to implement tdebug syscalls
*/
int tdebug_attach_task(task_id_t taskid, unative_t method);
int tdebug_detach_task(task_id_t taskid);
int tdebug_continue_thread(thread_id_t tid);
int tdebug_get_syscall_args(thread_id_t tid, unative_t *sc_args);
int tdebug_set_event_mask(thread_id_t tid, unative_t ev_mask);
int tdebug_stop_thread(thread_id_t tid);
int tdebug_stop_task(task_id_t taskid);
#endif
/** @}
*/