]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/l4re/lib/src/debug.cc
Inital import
[l4.git] / l4 / pkg / l4re / lib / src / debug.cc
1 /**
2  * \file   l4re/lib/src/debug.cc
3  * \brief  Debug
4  */
5 /*
6  * (c) 2008-2009 Technische Universität Dresden
7  * This file is part of TUD:OS and distributed under the terms of the
8  * GNU General Public License 2.
9  * Please see the COPYING-GPL-2 file for details.
10  *
11  * As a special exception, you may use this file as part of a free software
12  * library without restriction.  Specifically, if other files instantiate
13  * templates or use macros or inline functions from this file, or you compile
14  * this file and link it with other files to produce an executable, this
15  * file does not by itself cause the resulting executable to be covered by
16  * the GNU General Public License.  This exception does not however
17  * invalidate any other reasons why the executable file might be covered by
18  * the GNU General Public License.
19  */
20 #include <l4/re/debug>
21 #include <l4/re/protocols>
22
23 #include <l4/cxx/ipc_stream>
24 #include <l4/cxx/ipc_helper>
25
26 int
27 L4Re::Debug_obj::debug(unsigned long function) const throw()
28 {
29   L4::Ipc_iostream io(l4_utcb());
30   io << function;
31   return l4_error(io.call(cap(), L4Re::Protocol::Debug));
32 }