]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/l4sys/include/debugger
update
[l4.git] / l4 / pkg / l4sys / include / debugger
1 // vi:ft=cpp
2 /**
3  * \file
4  * \brief Debugger interface.
5  */
6 /**
7  * \file
8  * \brief Common thread related definitions.
9  */
10 /*
11  * (c) 2010-2011 Adam Lackorzynski <adam@os.inf.tu-dresden.de>,
12  *               Alexander Warg <warg@os.inf.tu-dresden.de>
13  *     economic rights: Technische Universität Dresden (Germany)
14  *
15  * This file is part of TUD:OS and distributed under the terms of the
16  * GNU General Public License 2.
17  * Please see the COPYING-GPL-2 file for details.
18  *
19  * As a special exception, you may use this file as part of a free software
20  * library without restriction.  Specifically, if other files instantiate
21  * templates or use macros or inline functions from this file, or you compile
22  * this file and link it with other files to produce an executable, this
23  * file does not by itself cause the resulting executable to be covered by
24  * the GNU General Public License.  This exception does not however
25  * invalidate any other reasons why the executable file might be covered by
26  * the GNU General Public License.
27  */
28 #pragma once
29
30 #include <l4/sys/debugger.h>
31
32 namespace L4 {
33
34 /**
35  * \ingroup l4_debugger_api
36  * \brief   Debugger interface.
37  *
38  * <c>\#include <l4/sys/debugger></c>
39  */
40 class Debugger : public Kobject_t<Debugger, Kobject, L4_PROTO_DEBUGGER>
41 {
42   L4_KOBJECT(Debugger)
43
44 public:
45   enum
46   {
47     Switch_log_on  = L4_DEBUGGER_SWITCH_LOG_ON,
48     Switch_log_off = L4_DEBUGGER_SWITCH_LOG_OFF,
49   };
50
51   /**
52    * \copydoc l4_debugger_set_object_name()
53    * \note the \a cap argument is the implicit \a this pointer.
54    */
55   l4_msgtag_t set_object_name(const char *name,
56                               l4_utcb_t *utcb = l4_utcb()) throw()
57   { return l4_debugger_set_object_name_u(cap(), name, utcb); }
58
59   /**
60    * \copydoc l4_debugger_global_id()
61    * \note the \a cap argument is the implicit \a this pointer.
62    */
63   unsigned long global_id(l4_utcb_t *utcb = l4_utcb()) throw()
64   { return l4_debugger_global_id_u(cap(), utcb); }
65
66   /**
67    * \copydoc l4_debugger_kobj_to_id()
68    * \note the \a cap argument is the implicit \a this pointer.
69    */
70   unsigned long kobj_to_id(l4_addr_t kobjp,
71                            l4_utcb_t *utcb = l4_utcb()) throw()
72   { return l4_debugger_kobj_to_id_u(cap(), kobjp, utcb); }
73
74   /**
75    * \copydoc l4_debugger_query_log_typeid()
76    * \note the \a cap argument is the implicit \a this pointer.
77    */
78   int query_log_typeid(const char *name, unsigned idx,
79                       l4_utcb_t *utcb = l4_utcb()) throw()
80   { return l4_debugger_query_log_typeid_u(cap(), name, idx, utcb); }
81
82   /**
83    * \copydoc l4_debugger_query_log_name()
84    * \note the \a cap argument is the implicit \a this pointer.
85    */
86   int query_log_name(unsigned idx,
87                      char *name, unsigned namelen,
88                      char *shortname, unsigned shortnamelen,
89                      l4_utcb_t *utcb = l4_utcb()) throw()
90   {
91     return l4_debugger_query_log_name_u(cap(), idx, name, namelen,
92                                         shortname, shortnamelen, utcb);
93   }
94
95   /**
96    * \copydoc l4_debugger_switch_log()
97    * \note the \a cap argument is the implicit \a this pointer.
98    */
99   l4_msgtag_t switch_log(const char *name, unsigned on_off,
100                          l4_utcb_t *utcb = l4_utcb()) throw()
101   { return l4_debugger_switch_log_u(cap(), name, on_off, utcb); }
102
103   /**
104    * \copydoc l4_debugger_get_object_name()
105    * \note the \a cap argument is the implicit \a this pointer.
106    */
107   l4_msgtag_t get_object_name(unsigned id, char *name, unsigned size,
108                        l4_utcb_t *utcb = l4_utcb()) throw()
109   { return l4_debugger_get_object_name_u(cap(), id, name, size, utcb); }
110 };
111 }