L4Re Operating System Framework
Interface and Usage Documentation
Loading...
Searching...
No Matches
__ktrace-impl.h
Go to the documentation of this file.
1
6/*
7 * (c) 2008-2009 Adam Lackorzynski <adam@os.inf.tu-dresden.de>,
8 * Björn Döbel <doebel@os.inf.tu-dresden.de>,
9 * Torsten Frenzel <frenzel@os.inf.tu-dresden.de>
10 * economic rights: Technische Universität Dresden (Germany)
11 *
12 * This file is part of TUD:OS and distributed under the terms of the
13 * GNU General Public License 2.
14 * Please see the COPYING-GPL-2 file for details.
15 *
16 * As a special exception, you may use this file as part of a free software
17 * library without restriction. Specifically, if other files instantiate
18 * templates or use macros or inline functions from this file, or you compile
19 * this file and link it with other files to produce an executable, this
20 * file does not by itself cause the resulting executable to be covered by
21 * the GNU General Public License. This exception does not however
22 * invalidate any other reasons why the executable file might be covered by
23 * the GNU General Public License.
24 */
25#pragma once
26
27#include <l4/sys/types.h>
28#include <l4/sys/kdebug.h>
29
30/*****************************************************************************
31 *** Implementation
32 *****************************************************************************/
33
35fiasco_tbuf_log(const char *text)
36{
37 enum { TBUF_LOG = 0x201 };
38 return l4_error(__kdebug_text(TBUF_LOG, text, __builtin_strlen(text)));
39}
40
43 l4_umword_t v3)
44{
45 enum { TBUF_LOG_3VAL = 0x204 };
46 return l4_error(__kdebug_3_text(TBUF_LOG_3VAL, text,
47 __builtin_strlen(text), v1, v2, v3));
48}
49
50L4_INLINE void
52{
53 enum { TBUF_CLEAR = 0x202 };
54 __kdebug_op(TBUF_CLEAR);
55}
56
57L4_INLINE void
59{
60 enum { TBUF_DUMP = 0x203 };
61 __kdebug_op(TBUF_DUMP);
62}
63
65fiasco_tbuf_log_binary(const unsigned char *data)
66{
67 enum { TBUF_LOG_BIN = 0x208 };
68 return l4_error(__kdebug_text(TBUF_LOG_BIN, (const char *)data, 24));
69}
70
l4_umword_t fiasco_tbuf_log(const char *text)
Create new trace-buffer entry with describing <text>.
void fiasco_tbuf_clear(void)
Clear trace-buffer.
l4_umword_t fiasco_tbuf_log_3val(const char *text, l4_umword_t v1, l4_umword_t v2, l4_umword_t v3)
Create new trace-buffer entry with describing <text> and three additional values.
l4_umword_t fiasco_tbuf_log_binary(const unsigned char *data)
Create new trace-buffer entry with binary data.
void fiasco_tbuf_dump(void)
Dump trace-buffer to kernel console.
unsigned long l4_umword_t
Unsigned machine word.
Definition l4int.h:51
long l4_error(l4_msgtag_t tag) L4_NOTHROW
Get IPC error code if any or message tag label otherwise for an IPC call.
Definition ipc.h:657
#define L4_INLINE
L4 Inline function attribute.
Definition compiler.h:62
Functionality for invoking the kernel debugger.
l4_msgtag_t __kdebug_3_text(unsigned op, char const *text, unsigned len, l4_umword_t v1, l4_umword_t v2, l4_umword_t v3) L4_NOTHROW
Invoke a text output operation with 3 additional machine word arguments on the base debugger capabili...
Definition kdebug.h:137
l4_msgtag_t __kdebug_text(unsigned op, char const *text, unsigned len) L4_NOTHROW
Invoke a text output operation on the base debugger capability.
Definition kdebug.h:96
l4_msgtag_t __kdebug_op(unsigned op) L4_NOTHROW
Invoke a nullary operation on the base debugger capability.
Definition kdebug.h:66
Common L4 ABI Data Types.