CHERIoT RTOS
A compartmentalised RTOS for CHERIoT hardware
Loading...
Searching...
No Matches
anonymous_namespace{debug.hh} Namespace Reference

Classes

struct  DebugContext
 Helper class wrapping a string for use as a template argument. More...
struct  SourceLocation
 Our libc++ does not currently provide source_location, but our clang provides the necessary builtins for one. More...
struct  DebugLevelTemplateArgument
 Compatibility wrapper that can be constructed from a boolean or a DebugLevel. More...
class  ConditionalDebug
 Conditional debug class. More...
class  StackUsageCheck
 Check the (dynamic) stack usage of a function, including all of its callees. More...

Enumerations

enum class  DebugLevel {
  Information , Warning , Error , Critical ,
  None
}
 Debug level. More...
enum class  StackCheckMode {
  Disabled , LoggingMonotonic , Logging , AssertingMonotonic ,
  Asserting
}

Functions

consteval std::strong_ordering operator<=> (const DebugLevel Level, const DebugLevel Threshold)
 Comparison operator to determine whether a provided debug level is above the threshold at which it should be reported.

Enumeration Type Documentation

◆ DebugLevel

enum class anonymous_namespace{debug.hh}::DebugLevel
strong

Debug level.

Enumerator
Information 

This is informative and may be helpful for debugging.

Warning 

This is probably wrong but the component issuing the warning can recover.

For example, you called an API with an invalid argument.

Error 

This is definitely wrong and may cause problems but the rest of the system is not impacted.

For example, you have called an API in a way that caused the compartment to raise an error, but the compartment has some form of isolation between callers and so this doesn't affect anyone else.

Critical 

Something is completely broken.

For example, a compartment with state shared between callers has detected internal consistency errors and may not be able to proceed at all.

None 

No debugging information should be reported.

Definition at line 675 of file debug.hh.

◆ StackCheckMode

enum class anonymous_namespace{debug.hh}::StackCheckMode
strong

Definition at line 1052 of file debug.hh.

Function Documentation

◆ operator<=>()

std::strong_ordering anonymous_namespace{debug.hh}::operator<=> ( const DebugLevel Level,
const DebugLevel Threshold )
consteval

Comparison operator to determine whether a provided debug level is above the threshold at which it should be reported.

Definition at line 740 of file debug.hh.