|
iPXE
|
#include <stdio.h>#include <stdint.h>#include <stdarg.h>#include <ctype.h>#include <ipxe/console.h>Go to the source code of this file.
Data Structures | |
| struct | autocolour |
| A colour assigned to an autocolourised debug message stream. More... | |
Macros | |
| #define | DBGCOL_MIN 31 |
| Base message stream colour. | |
| #define | DBGCOL_MAX ( DBGCOL_MIN + 6 - 1 ) |
| Maximum number of separately coloured message streams. | |
Functions | |
| FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
| FILE_SECBOOT (PERMITTED) | |
| void | dbg_printf (const char *fmt,...) |
| Print debug message. | |
| void | dbg_pause (void) |
| Pause until a key is pressed. | |
| void | dbg_more (void) |
| Indicate more data to follow and pause until a key is pressed. | |
| static void | dbg_hex_dump_da_row (unsigned long dispaddr, const void *data, unsigned long len, unsigned int offset) |
| Print row of a hex dump with specified display address. | |
| void | dbg_hex_dump_da (unsigned long dispaddr, const void *data, unsigned long len) |
| Print hex dump with specified display address. | |
| static int | dbg_autocolour (unsigned long stream) |
| Choose colour index for debug autocolourisation. | |
| void | dbg_autocolourise (unsigned long stream) |
| Select automatic colour for debug messages. | |
| void | dbg_decolourise (void) |
| Revert to normal colour. | |
| #define DBGCOL_MIN 31 |
Base message stream colour.
We default to using 31 (red foreground) as the base colour.
Definition at line 132 of file debug.c.
Referenced by dbg_autocolour(), dbg_autocolourise(), and dbg_decolourise().
| #define DBGCOL_MAX ( DBGCOL_MIN + 6 - 1 ) |
Maximum number of separately coloured message streams.
Six is the realistic maximum; there are 8 basic ANSI colours, one of which will be the terminal default and one of which will be invisible on the terminal because it matches the background colour.
Definition at line 143 of file debug.c.
Referenced by dbg_autocolour().
| FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
| FILE_SECBOOT | ( | PERMITTED | ) |
|
static |
Print row of a hex dump with specified display address.
| dispaddr | Display address |
| data | Data to print |
| len | Length of data |
| offset | Starting offset within data |
Definition at line 83 of file debug.c.
References bytes, data, dbg_printf(), isprint(), len, and offset.
Referenced by dbg_hex_dump_da().
|
static |
Choose colour index for debug autocolourisation.
| stream | Message stream ID |
| colour | Colour ID |
Definition at line 160 of file debug.c.
References DBGCOL_MAX, DBGCOL_MIN, autocolour::last_used, and autocolour::stream.
Referenced by dbg_autocolourise().