L4Re - L4 Runtime Environment
debugger
Go to the documentation of this file.
1 // vi:set ft=cpp: -*- Mode: C++ -*-
6 /*
7  * (c) 2010-2011 Adam Lackorzynski <adam@os.inf.tu-dresden.de>,
8  * Alexander Warg <warg@os.inf.tu-dresden.de>
9  * economic rights: Technische Universität Dresden (Germany)
10  *
11  * This file is part of TUD:OS and distributed under the terms of the
12  * GNU General Public License 2.
13  * Please see the COPYING-GPL-2 file for details.
14  *
15  * As a special exception, you may use this file as part of a free software
16  * library without restriction. Specifically, if other files instantiate
17  * templates or use macros or inline functions from this file, or you compile
18  * this file and link it with other files to produce an executable, this
19  * file does not by itself cause the resulting executable to be covered by
20  * the GNU General Public License. This exception does not however
21  * invalidate any other reasons why the executable file might be covered by
22  * the GNU General Public License.
23  */
24 #pragma once
25 
26 #include <l4/sys/debugger.h>
27 #include <l4/sys/kobject>
28 
29 namespace L4 {
30 
53 class Debugger : public Kobject_t<Debugger, Kobject, L4_PROTO_DEBUGGER>
54 {
55 public:
56  enum
57  {
58  Switch_log_on = L4_DEBUGGER_SWITCH_LOG_ON,
59  Switch_log_off = L4_DEBUGGER_SWITCH_LOG_OFF,
60  };
61 
70  l4_msgtag_t set_object_name(const char *name,
71  l4_utcb_t *utcb = l4_utcb()) throw()
72  { return l4_debugger_set_object_name_u(cap(), name, utcb); }
73 
82  unsigned long global_id(l4_utcb_t *utcb = l4_utcb()) throw()
83  { return l4_debugger_global_id_u(cap(), utcb); }
84 
94  unsigned long kobj_to_id(l4_addr_t kobjp,
95  l4_utcb_t *utcb = l4_utcb()) throw()
96  { return l4_debugger_kobj_to_id_u(cap(), kobjp, utcb); }
97 
108  int query_log_typeid(const char *name, unsigned idx,
109  l4_utcb_t *utcb = l4_utcb()) throw()
110  { return l4_debugger_query_log_typeid_u(cap(), name, idx, utcb); }
111 
127  int query_log_name(unsigned idx,
128  char *name, unsigned namelen,
129  char *shortname, unsigned shortnamelen,
130  l4_utcb_t *utcb = l4_utcb()) throw()
131  {
132  return l4_debugger_query_log_name_u(cap(), idx, name, namelen,
133  shortname, shortnamelen, utcb);
134  }
135 
144  l4_msgtag_t switch_log(const char *name, unsigned on_off,
145  l4_utcb_t *utcb = l4_utcb()) throw()
146  { return l4_debugger_switch_log_u(cap(), name, on_off, utcb); }
147 
159  l4_msgtag_t get_object_name(unsigned id, char *name, unsigned size,
160  l4_utcb_t *utcb = l4_utcb()) throw()
161  { return l4_debugger_get_object_name_u(cap(), id, name, size, utcb); }
162 };
163 }
Debugger related definitions.
l4_msgtag_t get_object_name(unsigned id, char *name, unsigned size, l4_utcb_t *utcb=l4_utcb())
Get name of object with Id id.
Definition: debugger:159
L4 low-level kernel interface.
unsigned long kobj_to_id(l4_addr_t kobjp, l4_utcb_t *utcb=l4_utcb())
Get the globally unique ID of the object behind the kobject pointer.
Definition: debugger:94
int query_log_typeid(const char *name, unsigned idx, l4_utcb_t *utcb=l4_utcb())
Query the log-id for a log type.
Definition: debugger:108
struct l4_utcb_t l4_utcb_t
Opaque type for the UTCB.
Definition: utcb.h:67
int query_log_name(unsigned idx, char *name, unsigned namelen, char *shortname, unsigned shortnamelen, l4_utcb_t *utcb=l4_utcb())
Query the name of a log type given the ID.
Definition: debugger:127
l4_msgtag_t switch_log(const char *name, unsigned on_off, l4_utcb_t *utcb=l4_utcb())
Set or unset log.
Definition: debugger:144
l4_msgtag_t set_object_name(const char *name, l4_utcb_t *utcb=l4_utcb())
Set the name of a kernel object.
Definition: debugger:70
l4_utcb_t * l4_utcb(void) L4_NOTHROW L4_PURE
Get the UTCB address.
Definition: utcb.h:340
l4_cap_idx_t cap() const
Return capability selector.
Definition: kobject:79
Helper class to create an L4Re interface class that is derived from a single base class...
Definition: __typeinfo.h:759
unsigned long global_id(l4_utcb_t *utcb=l4_utcb())
Get the globally unique ID of the object behind a capability.
Definition: debugger:82
C++ kernel debugger API.
Definition: debugger:53
Message tag data structure.
Definition: types.h:159
unsigned long l4_addr_t
Address type.
Definition: l4int.h:45