diff --git a/hypervisor/debug/console.c b/hypervisor/debug/console.c index b032732f7..106078f12 100644 --- a/hypervisor/debug/console.c +++ b/hypervisor/debug/console.c @@ -135,38 +135,6 @@ int console_write(const char *s, size_t len) return res; } -void console_dump_bytes(const void *p, unsigned int len) -{ - - const unsigned char *x = p; - const unsigned char *e = x + len; - int i; - - /* dump all bytes */ - while (x < e) { - /* write the address of the first byte in the row */ - printf("%08x: ", (uint64_t) x); - /* print one row (16 bytes) as hexadecimal values */ - for (i = 0; i < 16; i++) { - printf("%02x ", x[i]); - } - - /* print one row as ASCII characters (if possible) */ - for (i = 0; i < 16; i++) { - if ((x[i] < ' ') || (x[i] >= 127)) { - (void)console_putc('.'); - } - else { - (void)console_putc(x[i]); - } - } - /* continue with next row */ - (void)console_putc('\n'); - /* set pointer one row ahead */ - x += 16; - } -} - static void console_read(void) { spinlock_obtain(&lock); diff --git a/hypervisor/include/debug/console.h b/hypervisor/include/debug/console.h index ca07f3e94..a0d418e5c 100644 --- a/hypervisor/include/debug/console.h +++ b/hypervisor/include/debug/console.h @@ -47,17 +47,6 @@ int console_write(const char *str, size_t len); int console_putc(int ch); -/** Dumps an array to the console. - * - * This function dumps an array of bytes to the console - * in a hexadecimal format. - * - * @param p A pointer to the byte array to dump. - * @param len The number of bytes to dump. - */ - -void console_dump_bytes(const void *p, unsigned int len); - void console_setup_timer(void); uint32_t get_serial_handle(void); @@ -89,10 +78,7 @@ static inline int console_putc(__unused int ch) { return 0; } -static inline void console_dump_bytes(__unused const void *p, - __unused unsigned int len) -{ -} + static inline void console_setup_timer(void) {} static inline uint32_t get_serial_handle(void) { return 0; }