Loading...
Searching...
No Matches
Kernel Debugger
Base API » Fiasco extensions

Kernel debugger related functionality. More...

Collaboration diagram for Kernel Debugger:

## Files

file | kdebug.h
| Functionality for invoking the kernel debugger.

## 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.
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.
unsigned long | l4_debugger_global_id (l4_cap_idx_t cap) L4_NOTHROW
| Get the globally unique ID of the object behind a capability.
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.
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.
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.
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_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.

## Detailed Description

Kernel debugger related functionality.

Attention
  This API is subject to change!

This is a debugging facility, any call to any function might be invalid. Do not rely on it in any real code.

Include File
  #include <l4/sys/debugger.h>
  debugger.h
  Debugger related definitions.

## Function Documentation

## l4_debugger_add_image_info()

l4_msgtag_t l4_debugger_add_image_info | ( | l4_cap_idx_t | cap,
|  | l4_addr_t | base,
|  | const char * | name )

inline

Add loaded image information for a task.

Parameters

  cap | Capability which refers to the task object.
  base | Load base address of image.
  name | Image base name.

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

Definition at line 417 of file debugger.h.

References L4_NOTHROW, and l4_utcb().

Here is the call graph for this function:

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

  | cap | Capability of the debugger object.
  | id | Global 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.

Returns
  Syscall return tag

Definition at line 410 of file debugger.h.

References L4_NOTHROW, and l4_utcb().

Here is the call graph for this function:

## l4_debugger_global_id()

unsigned long l4_debugger_global_id | ( | l4_cap_idx_t | cap | ) |

inline

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

Parameters

  cap | Capability

Return values

  ~0UL | Capability is not valid.
  otherwise | Global debugger id.

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

Definition at line 375 of file debugger.h.

References L4_NOTHROW, and l4_utcb().

Here is the call graph for this function:

## l4_debugger_kobj_to_id()

unsigned long l4_debugger_kobj_to_id | ( | l4_cap_idx_t | cap,
|  | l4_addr_t | kobjp )

inline

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

Parameters

  cap | Capability
  kobjp | Kobject pointer

Return values

  ~0UL | The capability or the kobject pointer are invalid.
  otherwise | The globally unique id.

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

Definition at line 381 of file debugger.h.

References L4_NOTHROW, and l4_utcb().

Here is the call graph for this function:

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

  cap | Debugger capability.
  idx | ID to query.
  name | Buffer to copy name to.
  namelen | Buffer length of name.
  shortname | Buffer to copy shortname to.
  shortnamelen | Buffer length of shortname.

Return values

  0 | Success
  <0 | Error

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

Definition at line 394 of file debugger.h.

References L4_NOTHROW, and l4_utcb().

Here is the call graph for this function:

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

  cap | Debugger capability
  name | Name to query for.
  idx | Idx 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 387 of file debugger.h.

References L4_NOTHROW, and l4_utcb().

Here is the call graph for this function:

## l4_debugger_set_object_name()

l4_msgtag_t l4_debugger_set_object_name | ( | l4_cap_idx_t | cap,
|  | const char * | name )

inline

Set the name of a kernel object.

Parameters

  cap | Capability which refers to the kernel object.
  name | Name of the kernel object that is e.g. displayed in the kernel debugger.

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

Examples
  examples/libs/shmc/prodcons.c, and examples/sys/aliens/main.c.

Definition at line 368 of file debugger.h.

References L4_NOTHROW, and l4_utcb().

Here is the call graph for this function:

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

  cap | Debugger object.
  name | Name of the log type.
  on_off | 1: turn log on, 0: turn log off

Returns
  Syscall return tag

Definition at line 403 of file debugger.h.

References L4_NOTHROW, and l4_utcb().

Here is the call graph for this function: