L4Re Operating System Framework – Interface and Usage Documentation
Loading...
Searching...
No Matches
L4::Debugger Class Reference

C++ kernel debugger API. More...

#include <debugger>

+ Inheritance diagram for L4::Debugger:
+ Collaboration diagram for L4::Debugger:

Public Member Functions

l4_msgtag_t set_object_name (const char *name, l4_utcb_t *utcb=l4_utcb()) noexcept
 Set the name of a kernel object.
 
unsigned long global_id (l4_utcb_t *utcb=l4_utcb()) noexcept
 Get the globally unique ID of the object behind a capability.
 
unsigned long kobj_to_id (l4_addr_t kobjp, l4_utcb_t *utcb=l4_utcb()) noexcept
 Get the globally unique ID of the object behind the kobject pointer.
 
long query_log_typeid (const char *name, unsigned idx, l4_utcb_t *utcb=l4_utcb()) noexcept
 Query the log-id for a log type.
 
long query_log_name (unsigned idx, char *name, unsigned namelen, char *shortname, unsigned shortnamelen, l4_utcb_t *utcb=l4_utcb()) noexcept
 Query the name of a log type given the ID.
 
l4_msgtag_t switch_log (const char *name, unsigned on_off, l4_utcb_t *utcb=l4_utcb()) noexcept
 Set or unset log.
 
l4_msgtag_t get_object_name (unsigned id, char *name, unsigned size, l4_utcb_t *utcb=l4_utcb()) noexcept
 Get name of object with Id id.
 
- Public Member Functions inherited from L4::Kobject
l4_msgtag_t dec_refcnt (l4_mword_t diff, l4_utcb_t *utcb=l4_utcb())
 Decrement the in kernel reference counter for the object.
 

Additional Inherited Members

- Protected Types inherited from L4::Kobject_t< Debugger, Kobject, L4_PROTO_DEBUGGER >
typedef Debugger Class
 The target interface type (inheriting from Kobject_t)
 
typedef Typeid::Iface< PROTO, Debugger__Iface
 The interface description for the derived class.
 
typedef Typeid::Merge_list< Typeid::Iface_list< __Iface >, typename Base::__Iface_list > __Iface_list
 The list of all RPC interfaces provided directly or through inheritance.
 
- Protected Member Functions inherited from L4::Kobject_t< Debugger, Kobject, L4_PROTO_DEBUGGER >
L4::Cap< Classc () const noexcept
 Get the capability to ourselves.
 
- Protected Member Functions inherited from L4::Kobject
l4_cap_idx_t cap () const noexcept
 Return capability selector.
 
- Static Protected Member Functions inherited from L4::Kobject_t< Debugger, Kobject, L4_PROTO_DEBUGGER >
static void __check_protocols__ () noexcept
 Helper to check for protocol conflicts.
 

Detailed Description

C++ kernel debugger API.

Attention
This API is subject to change! Do not rely on it in production code.

This API is to be used for debugging exclusively.

This is the API for accessing kernel-debugger functionality from user-level programs. Specifically, it provides functionality to enrich the kernel debugger with insights into the program. The purpose is to facilitate debugging with the kernel debugger. For instance, a developer might choose to name the threads of her program so that she can find them in the kernel debugger thread list.

This API interacts with a kernel object that interfaces with the kernel debugger, the jdb-kernel object. The jdb-kernel object is fix and only available when the kernel debugger is built into the microkernel. The developer needs to pass the capability through to her program.

Include File
#include <l4/sys/debugger>
The debugger interface specifies common debugging related definitions.

Definition at line 53 of file debugger.

Member Function Documentation

◆ get_object_name()

l4_msgtag_t L4::Debugger::get_object_name ( unsigned  id,
char *  name,
unsigned  size,
l4_utcb_t utcb = l4_utcb() 
)
inlinenoexcept

Get name of object with Id id.

Parameters
idId 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.
utcbUTCB to be used for this operation, shall be the UTCB of the calling thread. See l4_utcb.
Returns
Syscall return tag

Definition at line 159 of file debugger.

References L4::Kobject::cap().

+ Here is the call graph for this function:

◆ global_id()

unsigned long L4::Debugger::global_id ( l4_utcb_t utcb = l4_utcb())
inlinenoexcept

Get the globally unique ID of the object behind a capability.

Parameters
utcbUTCB to be used for this operation, shall be the UTCB of the calling thread. Defaults to l4_utcb.
Return values
~0ULThe capability is invalid.
>=0The global debugger id.

Definition at line 82 of file debugger.

References L4::Kobject::cap().

+ Here is the call graph for this function:

◆ kobj_to_id()

unsigned long L4::Debugger::kobj_to_id ( l4_addr_t  kobjp,
l4_utcb_t utcb = l4_utcb() 
)
inlinenoexcept

Get the globally unique ID of the object behind the kobject pointer.

Parameters
kobjpKobject pointer
utcbUTCB to be used for this operation, shall be the UTCB of the calling thread. See l4_utcb.
Return values
~0ULThe capability or the Kobject pointer are invalid.
>=0The globally unique id.

Definition at line 94 of file debugger.

References L4::Kobject::cap().

+ Here is the call graph for this function:

◆ query_log_name()

long L4::Debugger::query_log_name ( unsigned  idx,
char *  name,
unsigned  namelen,
char *  shortname,
unsigned  shortnamelen,
l4_utcb_t utcb = l4_utcb() 
)
inlinenoexcept

Query the name of a log type given the ID.

Parameters
idxID to query.
[out]nameBuffer to copy name to. The buffer must be allocated by the caller.
namelenBuffer length of name.
[out]shortnameBuffer to copy shortname to. The buffer must be allocated by the caller.
shortnamelenBuffer length of shortname.
utcbUTCB to be used for this operation, shall be the UTCB of the calling thread. See l4_utcb.
Return values
0Success
<0Error

Definition at line 127 of file debugger.

References L4::Kobject::cap().

+ Here is the call graph for this function:

◆ query_log_typeid()

long L4::Debugger::query_log_typeid ( const char *  name,
unsigned  idx,
l4_utcb_t utcb = l4_utcb() 
)
inlinenoexcept

Query the log-id for a log type.

Parameters
nameName to query for.
idxIdx to start searching, start with 0
utcbUTCB to be used for this operation, shall be the UTCB of the calling thread. See l4_utcb.
Return values
>=0Id
<0Error

Definition at line 108 of file debugger.

References L4::Kobject::cap().

+ Here is the call graph for this function:

◆ set_object_name()

l4_msgtag_t L4::Debugger::set_object_name ( const char *  name,
l4_utcb_t utcb = l4_utcb() 
)
inlinenoexcept

Set the name of a kernel object.

Parameters
nameName
utcbUTCB to be used for this operation, shall be the UTCB of the calling thread. Defaults to l4_utcb.
Returns
System call return tag.

Definition at line 70 of file debugger.

References L4::Kobject::cap().

+ Here is the call graph for this function:

◆ switch_log()

l4_msgtag_t L4::Debugger::switch_log ( const char *  name,
unsigned  on_off,
l4_utcb_t utcb = l4_utcb() 
)
inlinenoexcept

Set or unset log.

Parameters
nameName of the log type.
on_off1: turn log on, 0: turn log off
utcbUTCB to be used for this operation, shall be the UTCB of the calling thread. See l4_utcb.
Returns
Syscall return tag

Definition at line 144 of file debugger.

References L4::Kobject::cap().

+ Here is the call graph for this function:

The documentation for this class was generated from the following file: