83 unsigned long len,
unsigned int offset ) {
95 ( ( ( i % 16 ) == 8 ) ?
'-' :
' ' ),
bytes[i] );
117 unsigned long len ) {
131 #define DBGCOL_MIN 31 142 #define DBGCOL_MAX ( DBGCOL_MIN + 6 - 1 ) 161 static unsigned long use;
164 unsigned int oldest_last_used;
170 for ( i = 0 ; i < (
sizeof ( acs ) /
sizeof ( acs[0] ) ) ; i++ ) {
179 oldest_last_used = use;
180 for ( i = 0 ; i < (
sizeof ( acs ) /
sizeof ( acs[0] ) ) ; i++ ) {
181 if ( acs[i].
last_used < oldest_last_used ) {
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
#define DBGCOL_MIN
Base message stream colour.
void dbg_autocolourise(unsigned long stream)
Select automatic colour for debug messages.
#define DBGCOL_MAX
Maximum number of separately coloured message streams.
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_more(void)
Indicate more data to follow and pause until a key is pressed.
static int isprint(int character)
Check if character is printable.
unsigned long last_used
Last recorded usage.
static int dbg_autocolour(unsigned long stream)
Choose colour index for debug autocolourisation.
int getchar(void)
Read a single character from any console.
#define CONSOLE_USAGE_DEBUG
Debug messages.
A colour assigned to an autocolourised debug message stream.
void dbg_pause(void)
Pause until a key is pressed.
__builtin_va_list va_list
void dbg_decolourise(void)
Revert to normal colour.
static int console_set_usage(int usage)
Set console usage.
static unsigned int saved_usage
uint8_t data[48]
Additional event data.
int ssize_t const char * fmt
int vprintf(const char *fmt, va_list args)
Write a formatted string to the console.
void dbg_hex_dump_da(unsigned long dispaddr, const void *data, unsigned long len)
Print hex dump with specified display address.
uint16_t offset
Offset to command line.
#define va_start(ap, last)
void dbg_printf(const char *fmt,...)
Print debug message.
unsigned long stream
Message stream ID.