72l4_debugger_query_object_name_u(
l4_cap_idx_t cap,
unsigned id,
73 char *name,
unsigned size,
97 char *name,
unsigned size,
161l4_debugger_query_log_typeid_u(
l4_cap_idx_t cap,
const char *name,
182 char *name,
unsigned namelen,
183 char *shortname,
unsigned shortnamelen)
L4_NOTHROW;
189l4_debugger_query_log_name_u(
l4_cap_idx_t cap,
unsigned idx,
190 char *name,
unsigned namelen,
191 char *shortname,
unsigned shortnamelen,
212l4_debugger_switch_log_u(
l4_cap_idx_t cap,
const char *name,
int on_off,
263 L4_DEBUGGER_SWITCH_LOG_ON = 1,
264 L4_DEBUGGER_SWITCH_LOG_OFF = 0,
285__strcpy_maxlen(
char *dst,
char const *src,
unsigned maxlen)
291 for (i = 0; i < maxlen - 1 && src[i]; ++i)
304 i = __strcpy_maxlen((
char *)&l4_utcb_mr_u(utcb)->mr[1], name,
305 (L4_UTCB_GENERIC_DATA_SIZE - 2) *
sizeof(
l4_umword_t));
307 return l4_invoke_debugger(cap,
l4_msgtag(0, 1 + i, 0, 0), utcb);
314 if (l4_error_u(l4_invoke_debugger(cap,
l4_msgtag(0, 1, 0, 0), utcb), utcb))
316 return l4_utcb_mr_u(utcb)->mr[0];
323 l4_utcb_mr_u(utcb)->mr[1] = kobjp;
324 if (l4_error_u(l4_invoke_debugger(cap,
l4_msgtag(0, 2, 0, 0), utcb), utcb))
326 return l4_utcb_mr_u(utcb)->mr[0];
330l4_debugger_query_log_typeid_u(
l4_cap_idx_t cap,
const char *name,
337 l4_utcb_mr_u(utcb)->mr[1] = idx;
338 i = __strcpy_maxlen((
char *)&l4_utcb_mr_u(utcb)->mr[2], name, 32);
340 e = l4_error_u(l4_invoke_debugger(cap,
l4_msgtag(0, 2 + i, 0, 0), utcb), utcb);
344 return l4_utcb_mr_u(utcb)->mr[0];
348l4_debugger_query_log_name_u(
l4_cap_idx_t cap,
unsigned idx,
349 char *name,
unsigned namelen,
350 char *shortname,
unsigned shortnamelen,
356 l4_utcb_mr_u(utcb)->mr[1] = idx;
357 e = l4_error_u(l4_invoke_debugger(cap,
l4_msgtag(0, 2, 0, 0), utcb), utcb);
361 n = (
char const *)&l4_utcb_mr_u(utcb)->mr[0];
362 __strcpy_maxlen(name, n, namelen);
363 __strcpy_maxlen(shortname, n + __builtin_strlen(n) + 1, shortnamelen);
369l4_debugger_switch_log_u(
l4_cap_idx_t cap,
const char *name,
int on_off,
374 l4_utcb_mr_u(utcb)->mr[1] = on_off;
375 i = __strcpy_maxlen((
char *)&l4_utcb_mr_u(utcb)->mr[2], name, 32);
377 return l4_invoke_debugger(cap,
l4_msgtag(0, 2 + i, 0, 0), utcb);
381l4_debugger_query_object_name_u(
l4_cap_idx_t cap,
unsigned id,
382 char *name,
unsigned size,
387 l4_utcb_mr_u(utcb)->mr[1] = id;
388 e = l4_error_u(l4_invoke_debugger(cap,
l4_msgtag(0, 2, 0, 0), utcb), utcb);
392 __strcpy_maxlen(name, (
char const *)&l4_utcb_mr_u(utcb)->mr[0], size);
398 char *name,
unsigned size,
403 e = l4_error_u(l4_invoke_debugger(cap,
l4_msgtag(0, 1, 0, 0), utcb), utcb);
407 __strcpy_maxlen(name, (
char const *)&l4_utcb_mr_u(utcb)->mr[0], size);
417 l4_utcb_mr_u(utcb)->mr[1] = base;
418 i = __strcpy_maxlen((
char *)&l4_utcb_mr_u(utcb)->mr[2], name,
419 (L4_UTCB_GENERIC_DATA_SIZE - 3) *
sizeof(
l4_umword_t));
421 return l4_invoke_debugger(cap,
l4_msgtag(0, 2 + i, 0, 0), utcb);
429 return l4_debugger_set_object_name_u(cap, name,
l4_utcb());
435 return l4_debugger_global_id_u(cap,
l4_utcb());
441 return l4_debugger_kobj_to_id_u(cap, kobjp,
l4_utcb());
448 return l4_debugger_query_log_typeid_u(cap, name, idx,
l4_utcb());
453 char *name,
unsigned namelen,
454 char *shortname,
unsigned shortnamelen)
L4_NOTHROW
456 return l4_debugger_query_log_name_u(cap, idx, name, namelen,
457 shortname, shortnamelen,
l4_utcb());
464 return l4_debugger_switch_log_u(cap, name, on_off,
l4_utcb());
471 return l4_debugger_query_object_name_u(cap,
id, name, size,
l4_utcb());
478 return l4_debugger_get_object_name_u(cap, name, size,
l4_utcb());
485 return l4_debugger_add_image_info_u(cap, base, name,
l4_utcb());
L4 compiler related defines.
@ L4_DEBUGGER_LOG_QUERY_NAME_OP
Get name of log type for given log-id.
@ L4_DEBUGGER_KOBJ_PTR_GET_GLOBAL_ID_OP
Get debug ID of kernel object by pointer.
@ L4_DEBUGGER_TASK_ADD_IMAGE_INFO_OP
Add image information for task.
@ L4_DEBUGGER_KOBJ_SET_NAME_OP
Set debug name of kernel object.
@ L4_DEBUGGER_OBJ_INFO_OP
Query information about all kernel objects.
@ L4_DEBUGGER_KOBJ_GET_NAME_OP
Get debug name of kernel object.
@ L4_DEBUGGER_GLOBAL_ID_GET_NAME_OP
Get debug name of kernel object by debug ID.
@ L4_DEBUGGER_LOG_QUERY_TYPEID_OP
Query log-id for log type.
@ L4_DEBUGGER_KOBJ_GET_GLOBAL_ID_OP
Get debug ID of kernel object.
@ L4_DEBUGGER_LOG_SWITCH_OP
Enable / disable log.
unsigned long l4_umword_t
Unsigned machine word.
unsigned long l4_addr_t
Address type.
unsigned long l4_cap_idx_t
Capability selector type.
l4_msgtag_t l4_debugger_add_image_info(l4_cap_idx_t cap, l4_addr_t base, const char *name) L4_NOTHROW
Add loaded image information for a task.
unsigned long l4_debugger_kobj_to_id(l4_cap_idx_t cap, l4_addr_t kobjp) L4_NOTHROW
Get the globally unique ID of the object behind the kobject pointer.
l4_ret_t l4_debugger_query_log_typeid(l4_cap_idx_t cap, const char *name, unsigned idx) L4_NOTHROW
Query the log-id for a log type.
l4_msgtag_t l4_debugger_set_object_name(l4_cap_idx_t cap, const char *name) L4_NOTHROW
Set the name of a kernel object.
l4_ret_t l4_debugger_get_object_name(l4_cap_idx_t cap, char *name, unsigned size) L4_NOTHROW
Get name of a kernel object.
l4_ret_t l4_debugger_query_log_name(l4_cap_idx_t cap, unsigned idx, char *name, unsigned namelen, char *shortname, unsigned shortnamelen) L4_NOTHROW
Query the name of a log type given the ID.
unsigned long l4_debugger_global_id(l4_cap_idx_t cap) L4_NOTHROW
Get the globally unique ID of the object behind a capability.
l4_msgtag_t l4_debugger_switch_log(l4_cap_idx_t cap, const char *name, int on_off) L4_NOTHROW
Set or unset log.
l4_ret_t l4_debugger_query_object_name(l4_cap_idx_t cap, unsigned id, char *name, unsigned size) L4_NOTHROW
Get name of the kernel object with Id id.
unsigned l4_bytes_to_mwords(unsigned size) L4_NOTHROW
Determine how many machine words (l4_umword_t) are required to store a buffer of 'size' bytes.
l4_msgtag_t l4_msgtag(long label, unsigned words, unsigned items, unsigned flags) L4_NOTHROW
Create a message tag from the specified values.
struct l4_utcb_t l4_utcb_t
Opaque type for the UTCB.
l4_utcb_t * l4_utcb(void) L4_NOTHROW L4_PURE
Get the UTCB address.
#define L4_NOTHROW
Mark a function declaration and definition as never throwing an exception.
#define L4_INLINE
L4 Inline function attribute.
Kernel object system calls.
l4_int16_t l4_ret_t
Return value of an IPC call as well as an RPC call.
Message tag data structure.