L4Re - L4 Runtime Environment
debug
Go to the documentation of this file.
1 // vi:set ft=cpp: -*- Mode: C++ -*-
2 /**
3  * \file
4  * \brief Debug interface
5  */
6 /*
7  * (c) 2008-2009 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/capability>
27 #include <l4/re/protocols.h>
28 #include <l4/sys/cxx/ipc_iface>
29 
30 namespace L4Re {
31 /**
32  * \defgroup api_l4re_debug Debugging API
33  * \ingroup api_l4re
34  * \brief Debugging Interface
35  *
36  * The debugging interface can be provided to retrieve, or log debugging
37  * information for an object.
38  * Each class may realize the debug interface to provide debugging
39  * functionality. For example, the region-map objects provide a facility to
40  * dump the currently established memory regions.
41  *
42  * \see L4::Debug_obj for more information.
43  */
44 
45 /**
46  * \brief Debug interface.
47  * \ingroup api_l4re_debug
48  *
49  * \see \link api_l4re_debug Debugging API \endlink.
50  */
51 class L4_EXPORT Debug_obj :
52  public L4::Kobject_t<Debug_obj, L4::Kobject, L4RE_PROTO_DEBUG>
53 {
54 public:
55 
56  /**
57  * \brief Debug call
58  *
59  * \param function Function to call.
60  * \return - L4_EOK
61  * - IPC errors
62  */
63  L4_INLINE_RPC(long, debug, (unsigned long function));
64  typedef L4::Typeid::Rpc_nocode<debug_t> Rpcs;
65 };
66 
67 template<typename BASE>
68 class Debug_obj_t :
69  public L4::Kobject_2t<Debug_obj_t<BASE>, BASE, Debug_obj, L4::PROTO_EMPTY>
70 {
71  typedef L4::Typeid::Rpcs<> Rpcs;
72 };
73 }