Subversion Repositories HelenOS

Rev

Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1.  
  2. /** @addtogroup tdebug
  3.  * @{
  4.  */
  5. /** @file
  6.  */
  7.  
  8. #ifndef KERN_TDEBUG_H_
  9. #define KERN_TDEBUG_H_
  10.  
  11. #include <atomic.h>
  12. #include <arch/types.h>
  13. #include <tdebug/tdebug_type.h>
  14. #include <arch.h>
  15.  
  16. /*
  17.  * Managing tdebug structures.
  18.  */
  19. void tdebug_task_init(struct task *ta);
  20. void tdebug_thread_init(struct thread *t);
  21. void tdebug_cleanup(void);
  22.  
  23. /*
  24.  * Creating hooks at strategic points in the kernel.
  25.  */
  26.  
  27. void tdebug_syscall_event(unative_t a1, unative_t a2, unative_t a3,
  28.     unative_t a4, unative_t a5, unative_t a6, unative_t id, unative_t rc);
  29. void tdebug_exception_event(int n);
  30. void tdebug_stopping_point(void);
  31.  
  32. static inline int tdebug_have_monitor()
  33. {
  34.     return atomic_get(&TASK->tdebug.have_monitor);
  35. }
  36.  
  37. /*
  38.  * Used to implement tdebug syscalls
  39.  */
  40. int tdebug_attach_task(task_id_t taskid, unative_t method);
  41. int tdebug_detach_task(task_id_t taskid);
  42. int tdebug_continue_thread(thread_id_t tid);
  43. int tdebug_get_syscall_args(thread_id_t tid, unative_t *sc_args);
  44. int tdebug_set_event_mask(thread_id_t tid, unative_t ev_mask);
  45. int tdebug_stop_thread(thread_id_t tid);
  46. int tdebug_stop_task(task_id_t taskid);
  47.  
  48. #endif
  49.  
  50. /** @}
  51.  */
  52.