L4Re – L4 Runtime Environment
debugger.h File Reference

Debugger related definitions. More...

#include <l4/sys/compiler.h>
#include <l4/sys/utcb.h>
#include <l4/sys/ipc.h>
#include <l4/sys/kernel_object.h>
+ Include dependency graph for debugger.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

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. More...
 
l4_msgtag_t l4_debugger_get_object_name (l4_cap_idx_t cap, unsigned id, char *name, unsigned size) L4_NOTHROW
 Get name of the kernel object with Id id. More...
 
unsigned long l4_debugger_global_id (l4_cap_idx_t cap) L4_NOTHROW
 Get the globally unique ID of the object behind a capability. More...
 
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. More...
 
long 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. More...
 
long 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. More...
 
l4_msgtag_t l4_debugger_switch_log (l4_cap_idx_t cap, const char *name, int on_off) L4_NOTHROW
 Set or unset log. More...
 
unsigned __strcpy_maxlen (char *dst, char const *src, unsigned maxlen)
 Copy a number of characters from the C string src to the C string dst. More...
 

Detailed Description

Debugger related definitions.

Definition in file debugger.h.

Function Documentation

◆ __strcpy_maxlen()

unsigned __strcpy_maxlen ( char *  dst,
char const *  src,
unsigned  maxlen 
)
inline

Copy a number of characters from the C string src to the C string dst.

The resulting string dst is always '\0'-terminated unless maxlen is 0. If the C string in src is shorter than the buffer dst then the remaining bytes in dst are NOT initialized.

Parameters
dstTarget buffer.
srcSource buffer.
maxlenMaximum number of bytes written to the target buffer.
Returns
The number of bytes written (including the terminating '\0'.

Definition at line 231 of file debugger.h.

◆ l4_debugger_get_object_name()

l4_msgtag_t l4_debugger_get_object_name ( l4_cap_idx_t  cap,
unsigned  id,
char *  name,
unsigned  size 
)
inline

Get name of the kernel object with Id id.

Parameters
capCapability of the debugger object.
idGlobal id of the object whose name is asked.
[out]nameBuffer to copy the name into. The buffer must be allocated by the caller.
sizeLength of the name buffer.
Returns
Syscall return tag

Definition at line 381 of file debugger.h.

◆ l4_debugger_query_log_name()

long l4_debugger_query_log_name ( l4_cap_idx_t  cap,
unsigned  idx,
char *  name,
unsigned  namelen,
char *  shortname,
unsigned  shortnamelen 
)
inline

Query the name of a log type given the ID.

Parameters
capDebugger capability.
idxID to query.
nameBuffer to copy name to.
namelenBuffer length of name.
shortnameBuffer to copy shortname to.
shortnamelenBuffer length of shortname.
Return values
0Success
<0Error

This is a debugging facility, the call might be invalid.

Definition at line 365 of file debugger.h.

◆ l4_debugger_query_log_typeid()

long l4_debugger_query_log_typeid ( l4_cap_idx_t  cap,
const char *  name,
unsigned  idx 
)
inline

Query the log-id for a log type.

Parameters
capDebugger capability
nameName to query for.
idxIdx to start searching, start with 0
Returns
positive ID, or negative error code

This is a debugging facility, the call might be invalid.

Definition at line 358 of file debugger.h.

◆ l4_debugger_switch_log()

l4_msgtag_t l4_debugger_switch_log ( l4_cap_idx_t  cap,
const char *  name,
int  on_off 
)
inline

Set or unset log.

Parameters
capDebugger object.
nameName of the log type.
on_off1: turn log on, 0: turn log off
Returns
Syscall return tag

Definition at line 374 of file debugger.h.