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.
l4_msgtag_t | add_image_info (l4_addr_t base, const char *name, l4_utcb_t *utcb=l4_utcb()) noexcept
| Add loaded image information for a task.
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 Kobject::__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< Class > | c () 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>
  debugger
  The debugger interface specifies common debugging related definitions.

Definition at line 42 of file debugger.

## Member Function Documentation

## add_image_info()

l4_msgtag_t L4::Debugger::add_image_info | ( | l4_addr_t | base,
|  | const char * | name,
|  | l4_utcb_t * | utcb = l4_utcb() )

inlinenoexcept

Add loaded image information for a task.

Parameters

  base | Image load base address
  name | Image name
  utcb | The UTCB to use for the operation.

Returns
  System call return tag.

Definition at line 161 of file debugger.

References L4::Kobject::cap().

Here is the call graph for this function:

## 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

  | id | Id of the object whose name is asked.
  [out] | name | Buffer to copy the name into. The buffer must be allocated by the caller.
  | size | Length of the name buffer.
  | utcb | UTCB to be used for this operation, shall be the UTCB of the calling thread. See l4_utcb.

Returns
  Syscall return tag

Definition at line 148 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

  utcb | UTCB to be used for this operation, shall be the UTCB of the calling thread. Defaults to l4_utcb.

Return values

  ~0UL | The capability is invalid.
  >=0 | The global debugger id.

Definition at line 71 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

  kobjp | Kobject pointer
  utcb | UTCB to be used for this operation, shall be the UTCB of the calling thread. See l4_utcb.

Return values

  ~0UL | The capability or the Kobject pointer are invalid.
  >=0 | The globally unique id.

Definition at line 83 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

  | idx | ID to query.
  [out] | name | Buffer to copy name to. The buffer must be allocated by the caller.
  | namelen | Buffer length of name.
  [out] | shortname | Buffer to copy shortname to. The buffer must be allocated by the caller.
  | shortnamelen | Buffer length of shortname.
  | utcb | UTCB to be used for this operation, shall be the UTCB of the calling thread. See l4_utcb.

Return values

  0 | Success
  <0 | Error

Definition at line 116 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

  name | Name to query for.
  idx | Idx to start searching, start with 0
  utcb | UTCB to be used for this operation, shall be the UTCB of the calling thread. See l4_utcb.

Return values

  >=0 | Id
  <0 | Error

Definition at line 97 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

  name | Name
  utcb | UTCB 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 59 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

  name | Name of the log type.
  on_off | 1: turn log on, 0: turn log off
  utcb | UTCB to be used for this operation, shall be the UTCB of the calling thread. See l4_utcb.

Returns
  Syscall return tag

Definition at line 133 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:

- l4/sys/debugger