25 #include <l4/sys/consts.h> 26 #include <l4/sys/ipc.h> 35 L4_KDEBUG_OUTCHAR = 1,
36 L4_KDEBUG_OUTNSTRING = 2,
37 L4_KDEBUG_OUTHEX32 = 3,
38 L4_KDEBUG_OUTHEX20 = 4,
39 L4_KDEBUG_OUTHEX16 = 5,
40 L4_KDEBUG_OUTHEX12 = 6,
41 L4_KDEBUG_OUTHEX8 = 7,
63 __kdebug_text(
unsigned op,
char const *text,
unsigned len)
L4_NOTHROW 70 if (len > (
sizeof(store) - (2 *
sizeof(
l4_umword_t))))
73 __builtin_memcpy(&store, mr,
sizeof(store));
76 __builtin_memcpy(&mr->
mr[2], text, len);
83 __builtin_memcpy(mr, &store,
sizeof(*mr));
88 __kdebug_3_text(
unsigned op,
char const *text,
unsigned len,
96 if (len > (
sizeof(store) - (5 *
sizeof(
l4_umword_t))))
99 __builtin_memcpy(&store, mr,
sizeof(store));
105 __builtin_memcpy(&mr->
mr[5], text, len);
112 __builtin_memcpy(mr, &store,
sizeof(*mr));
136 L4_INLINE
void enter_kdebug(
char const *text)
L4_NOTHROW 147 __kdebug_text(L4_KDEBUG_ENTER, text, __builtin_strlen(text));
150 L4_INLINE
void outnstring(
char const *text,
unsigned len)
151 { __kdebug_text(L4_KDEBUG_OUTNSTRING, text, len); }
153 L4_INLINE
void outstring(
char const *text)
154 { outnstring(text, __builtin_strlen(text)); }
157 L4_INLINE
void outchar(
char c)
159 __kdebug_op_1(L4_KDEBUG_OUTCHAR, c);
164 __kdebug_op_1(L4_KDEBUG_OUTHEX32, number);
169 __kdebug_op_1(L4_KDEBUG_OUTHEX20, number);
174 __kdebug_op_1(L4_KDEBUG_OUTHEX16, number);
179 __kdebug_op_1(L4_KDEBUG_OUTHEX12, number);
184 __kdebug_op_1(L4_KDEBUG_OUTHEX8, number);
189 __kdebug_op_1(L4_KDEBUG_OUTDEC, number);
192 #endif //__KDEBUG_H__ Encapsulation of the message-register block in the UTCB.
Protocol ID for the debugger.
unsigned short int l4_uint16_t
Unsigned 16bit value.
signed long l4_mword_t
Signed machine word.
l4_umword_t mr[L4_UTCB_GENERIC_DATA_SIZE]
Message registers.
l4_msgtag_t l4_ipc_call(l4_cap_idx_t object, l4_utcb_t *utcb, l4_msgtag_t tag, l4_timeout_t timeout) L4_NOTHROW
Object call (usual invocation).
struct l4_utcb_t l4_utcb_t
Opaque type for the UTCB.
#define L4_IPC_NEVER
never timeout
L4 compiler related defines.
Capability selector for the debugger cap.
unsigned long l4_umword_t
Unsigned machine word.
l4_utcb_t * l4_utcb(void) L4_NOTHROW L4_PURE
Get the UTCB address.
l4_msgtag_t l4_msgtag(long label, unsigned words, unsigned items, unsigned flags) L4_NOTHROW
Create a message tag from the specified values.
unsigned char l4_uint8_t
Unsigned 8bit value.
Message tag data structure.
unsigned int l4_uint32_t
Unsigned 32bit value.
#define L4_NOTHROW
Mark a function declaration and definition as never throwing an exception.