Loading...
Searching...
No Matches
kdebug.h File Reference
Base API » Fiasco extensions » Kernel Debugger

Functionality for invoking the kernel debugger. More...

`#include <l4/sys/compiler.h>`
`#include <l4/sys/consts.h>`
`#include <l4/sys/ipc.h>`
Include dependency graph for kdebug.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Enumerations

enum | l4_kdebug_group_t
| Opcode groups for operations that can be invoked on the base debugger capability.
enum | l4_kdebug_ops_t
| Op-codes for operations that can be invoked on the base debugger capability. More...

## Functions

void | enter_kdebug (char const *text) L4_NOTHROW
| Enter the kernel debugger.
l4_msgtag_t | __kdebug_op (unsigned op) L4_NOTHROW
| Invoke a nullary operation on the base debugger capability.
l4_msgtag_t | __kdebug_text (unsigned op, char const *text, unsigned len) L4_NOTHROW
| Invoke a text output operation on the base debugger capability.
l4_msgtag_t | __kdebug_3_text (unsigned op, char const *text, unsigned len, l4_umword_t v1, l4_umword_t v2, l4_umword_t v3) L4_NOTHROW
| Invoke a text output operation with 3 additional machine word arguments on the base debugger capability.
l4_msgtag_t | __kdebug_op_1 (unsigned op, l4_mword_t val) L4_NOTHROW
| Invoke an unary operation on the base debugger capability.
void | outnstring (char const *text, unsigned len)
| Output a fixed-length string via the kernel debugger.
void | outstring (char const *text)
| Output a string via the kernel debugger.
void | outchar (char c)
| Output a single character via the kernel debugger.
void | outumword (l4_umword_t number)
| Output a hexadecimal unsigned machine word via the kernel debugger.
void | outhex64 (l4_uint64_t number)
| Output a 64-bit unsigned hexadecimal number via the kernel debugger.
void | outhex32 (l4_uint32_t number)
| Output a 32-bit unsigned hexadecimal number via the kernel debugger.
void | outhex20 (l4_uint32_t number)
| Output a 20-bit unsigned hexadecimal number via the kernel debugger.
void | outhex16 (l4_uint16_t number)
| Output a 16-bit unsigned hexadecimal number via the kernel debugger.
void | outhex12 (l4_uint16_t number)
| Output a 12-bit unsigned hexadecimal number via the kernel debugger.
void | outhex8 (l4_uint8_t number)
| Output an 8-bit unsigned hexadecimal number via the kernel debugger.
void | outdec (l4_mword_t number)
| Output a decimal unsigned machine word via the kernel debugger.

## Detailed Description

Functionality for invoking the kernel debugger.

Definition in file kdebug.h.

## Enumeration Type Documentation

## l4_kdebug_ops_t

enum l4_kdebug_ops_t

Op-codes for operations that can be invoked on the base debugger capability.

See also __ktrace-impl.h for additional op-codes.

Definition at line 44 of file kdebug.h.

## Function Documentation

## __kdebug_3_text()

l4_msgtag_t __kdebug_3_text | ( | unsigned | op,
|  | char const * | text,
|  | unsigned | len,
|  | l4_umword_t | v1,
|  | l4_umword_t | v2,
|  | l4_umword_t | v3 )

inline

Invoke a text output operation with 3 additional machine word arguments on the base debugger capability.

Parameters

  op | Text output operation code from l4_kdebug_ops_t or a value above 0x200 used by the kernel trace buffer implementation (__ktrace-impl.h).
  text | Output string.
  len | Length of the output string. The maximum length is limited to L4_UTCB_GENERIC_DATA_SIZE - 5 machine words. Output strings longer than this limit will be cropped.
  v1 | First machine word argument.
  v2 | Second machine word argument.
  v3 | Third machine word argument.

Return values

  Message | tag returned from the IPC on the base debugger capability.

Definition at line 139 of file kdebug.h.

References L4_BASE_DEBUGGER_CAP, l4_bytes_to_mwords(), l4_ipc_call(), L4_IPC_NEVER, l4_msgtag(), L4_NOTHROW, L4_PROTO_DEBUGGER, l4_utcb(), and l4_msg_regs_t::mr.

Referenced by fiasco_tbuf_log_3val().

Here is the call graph for this function:
Here is the caller graph for this function:

## __kdebug_op()

l4_msgtag_t __kdebug_op | ( | unsigned | op | ) |

inline

Invoke a nullary operation on the base debugger capability.

Parameters

  op | Nullary operation code from l4_kdebug_ops_t or a value above 0x200 used by the kernel trace buffer implementation (__ktrace-impl.h).

Return values

  Message | tag returned from the IPC on the base debugger capability.

Definition at line 68 of file kdebug.h.

References L4_BASE_DEBUGGER_CAP, l4_ipc_call(), L4_IPC_NEVER, l4_msgtag(), L4_NOTHROW, L4_PROTO_DEBUGGER, l4_utcb(), and l4_msg_regs_t::mr.

Referenced by fiasco_dump_kmem_stats(), fiasco_tbuf_clear(), and fiasco_tbuf_dump().

Here is the call graph for this function:
Here is the caller graph for this function:

## __kdebug_op_1()

l4_msgtag_t __kdebug_op_1 | ( | unsigned | op,
|  | l4_mword_t | val )

inline

Invoke an unary operation on the base debugger capability.

Parameters

  op | Unary operation code from l4_kdebug_ops_t or a value above 0x200 used by the kernel trace buffer implementation (__ktrace-impl.h).
  val | Machine word argument to the unary operation.

Return values

  Message | tag returned from the IPC on the base debugger capability.

Definition at line 176 of file kdebug.h.

References L4_BASE_DEBUGGER_CAP, l4_ipc_call(), L4_IPC_NEVER, l4_msgtag(), L4_NOTHROW, L4_PROTO_DEBUGGER, l4_utcb(), and l4_msg_regs_t::mr.

Referenced by outchar(), outdec(), outhex12(), outhex16(), outhex20(), outhex32(), outhex64(), outhex8(), and outumword().

Here is the call graph for this function:
Here is the caller graph for this function:

## __kdebug_text()

l4_msgtag_t __kdebug_text | ( | unsigned | op,
|  | char const * | text,
|  | unsigned | len )

inline

Invoke a text output operation on the base debugger capability.

Parameters

  op | Text output operation code from l4_kdebug_ops_t or a value above 0x200 used by the kernel trace buffer implementation (__ktrace-impl.h).
  text | Output string.
  len | Length of the output string. The maximum length is limited to L4_UTCB_GENERIC_DATA_SIZE - 2 machine words. Output strings longer than this limit will be cropped.

Return values

  Message | tag returned from the IPC on the base debugger capability.

Definition at line 98 of file kdebug.h.

References L4_BASE_DEBUGGER_CAP, l4_bytes_to_mwords(), l4_ipc_call(), L4_IPC_NEVER, l4_msgtag(), L4_NOTHROW, L4_PROTO_DEBUGGER, l4_utcb(), and l4_msg_regs_t::mr.

Referenced by enter_kdebug(), fiasco_tbuf_log(), fiasco_tbuf_log_binary(), and outnstring().

Here is the call graph for this function:
Here is the caller graph for this function:

## enter_kdebug()

void enter_kdebug | ( | char const * | text | ) |

inline

Enter the kernel debugger.

Parameters

  text | Optional message displayed by the kernel debugger when entered.

Enter the kernel debugger, if configured. An optional message can be passed to the kernel debugger which is printed upon the entering of the debugger.

Examples
  examples/sys/singlestep/main.c.

Definition at line 204 of file kdebug.h.

References __kdebug_text(), L4_BASE_DEBUGGER_CAP, L4_INLINE, l4_ipc_call(), L4_IPC_NEVER, l4_msgtag(), L4_NOTHROW, and L4_PROTO_DEBUGGER.

Here is the call graph for this function:

## outchar()

void outchar | ( | char | c | ) |

inline

Output a single character via the kernel debugger.

Parameters

  c | Output character.

Definition at line 245 of file kdebug.h.

References __kdebug_op_1(), and L4_INLINE.

Here is the call graph for this function:

## outdec()

void outdec | ( | l4_mword_t | number | ) |

inline

Output a decimal unsigned machine word via the kernel debugger.

Parameters

  number | Output machine word.

Definition at line 334 of file kdebug.h.

References __kdebug_op_1(), and L4_INLINE.

Here is the call graph for this function:

## outhex12()

void outhex12 | ( | l4_uint16_t | number | ) |

inline

Output a 12-bit unsigned hexadecimal number via the kernel debugger.

Parameters

  number | Output 12-bit number. Only the 12 LSB bits are used.

Definition at line 314 of file kdebug.h.

References __kdebug_op_1(), and L4_INLINE.

Here is the call graph for this function:

## outhex16()

void outhex16 | ( | l4_uint16_t | number | ) |

inline

Output a 16-bit unsigned hexadecimal number via the kernel debugger.

Parameters

  number | Output 16-bit number.

Definition at line 304 of file kdebug.h.

References __kdebug_op_1(), and L4_INLINE.

Here is the call graph for this function:

## outhex20()

void outhex20 | ( | l4_uint32_t | number | ) |

inline

Output a 20-bit unsigned hexadecimal number via the kernel debugger.

Parameters

  number | Output 20-bit number. Only the 20 LSB bits are used.

Definition at line 294 of file kdebug.h.

References __kdebug_op_1(), and L4_INLINE.

Here is the call graph for this function:

## outhex32()

void outhex32 | ( | l4_uint32_t | number | ) |

inline

Output a 32-bit unsigned hexadecimal number via the kernel debugger.

Parameters

  number | Output 32-bit number.

Definition at line 284 of file kdebug.h.

References __kdebug_op_1(), and L4_INLINE.

Here is the call graph for this function:

## outhex64()

void outhex64 | ( | l4_uint64_t | number | ) |

inline

Output a 64-bit unsigned hexadecimal number via the kernel debugger.

Parameters

  number | Output 64-bit number.

The two 32-bit halves are printed non-atomically.

Definition at line 273 of file kdebug.h.

References __kdebug_op_1(), and L4_INLINE.

Here is the call graph for this function:

## outhex8()

void outhex8 | ( | l4_uint8_t | number | ) |

inline

Output an 8-bit unsigned hexadecimal number via the kernel debugger.

Parameters

  number | Output 8-bit number.

Definition at line 324 of file kdebug.h.

References __kdebug_op_1(), and L4_INLINE.

Here is the call graph for this function:

## outnstring()

void outnstring | ( | char const * | text,
|  | unsigned | len )

inline

Output a fixed-length string via the kernel debugger.

Parameters

  text | Beginning of the output string.
  len | Length of the output string. The maximum length is limited to L4_UTCB_GENERIC_DATA_SIZE - 2 machine words. Output strings longer than this limit will be cropped.

Definition at line 226 of file kdebug.h.

References __kdebug_text(), and L4_INLINE.

Referenced by outstring().

Here is the call graph for this function:
Here is the caller graph for this function:

## outstring()

void outstring | ( | char const * | text | ) |

inline

Output a string via the kernel debugger.

Parameters

  text | Beginning of the output string. The maximum length of the output string is limited to L4_UTCB_GENERIC_DATA_SIZE - 2 machine words. Output strings longer than this limit will be cropped.

Definition at line 237 of file kdebug.h.

References L4_INLINE, and outnstring().

Here is the call graph for this function:

## outumword()

void outumword | ( | l4_umword_t | number | ) |

inline

Output a hexadecimal unsigned machine word via the kernel debugger.

Parameters

  number | Output machine word.

If the machine word is 64 bits long, it is printed non-atomically as two 32-bit numbers.

Definition at line 258 of file kdebug.h.

References __kdebug_op_1(), and L4_INLINE.

Here is the call graph for this function: