L4Re - L4 Runtime Environment
Go to the documentation of this file.
5 #pragma once
7 #include <l4/sys/ipc.h>
9 L4_INLINE l4_msgtag_t
10 l4_invoke_debugger(l4_cap_idx_t obj, l4_msgtag_t tag, l4_utcb_t *utcb) L4_NOTHROW
11 {
12  l4_msgtag_t t2;
13  l4_msg_regs_t *mr = l4_utcb_mr_u(utcb);
15  if (l4_is_invalid_cap(obj))
16  return l4_msgtag(-L4_EINVAL, 0, 0, 0);
18  mr->mr[0] += 0x100;
19  mr->mr[l4_msgtag_words(tag)] = L4_ITEM_MAP;
20  mr->mr[l4_msgtag_words(tag) + 1] = l4_obj_fpage(obj, 0, L4_FPAGE_RWX).raw;
22  1, l4_msgtag_flags(tag));
25 }
Identify a message item as map item.
Definition: consts.h:189
Encapsulation of the message-register block in the UTCB.
Definition: utcb.h:78
unsigned l4_is_invalid_cap(l4_cap_idx_t c) L4_NOTHROW
Test if a capability selector is the invalid capability.
Definition: types.h:391
Invalid argument.
Definition: err.h:56
Protocol ID for the ddebugger.
Definition: types.h:75
l4_umword_t mr[L4_UTCB_GENERIC_DATA_SIZE]
Message registers.
Definition: utcb.h:80
Read-write-execute flex page.
Definition: __l4_fpage.h:114
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).
Definition: ipc.h:445
unsigned long l4_cap_idx_t
L4 Capability selector Type.
Definition: types.h:341
struct l4_utcb_t l4_utcb_t
Opaque type for the UTCB.
Definition: utcb.h:67
#define L4_IPC_NEVER
never timeout
Definition: __timeout.h:80
Flags for message tags.
Definition: types.h:94
Capability selector for the debugger cap.
Definition: consts.h:259
unsigned l4_msgtag_words(l4_msgtag_t t) L4_NOTHROW
Get the number of untyped words.
Definition: types.h:422
l4_umword_t raw
Raw value.
Definition: __l4_fpage.h:83
l4_msgtag_t l4_msgtag(long label, unsigned words, unsigned items, unsigned flags) L4_NOTHROW
Create a message tag from the specified values.
Definition: types.h:407
Message tag data structure.
Definition: types.h:158
l4_fpage_t l4_obj_fpage(l4_cap_idx_t obj, unsigned int order, unsigned char rights) L4_NOTHROW
Create a kernel-object flex page.
Definition: __l4_fpage.h:645
#define L4_NOTHROW
Mark a function declaration and definition as never throwing an exception.
Definition: compiler.h:185