mirror of https://github.com/tailix/mrubyvisor.git
Use new debug output formatter
This commit is contained in:
parent
d8ebd15e6d
commit
e3bbdcb4b2
1
Makefile
1
Makefile
|
@ -56,6 +56,7 @@ LIBKERNAUX_ARGS = \
|
|||
--enable-freestanding \
|
||||
--enable-split-libc \
|
||||
--enable-debug \
|
||||
--disable-werror \
|
||||
--disable-float \
|
||||
--with-libc
|
||||
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
#define KERNAUX_ACCESS_PROTECTED
|
||||
|
||||
#include "stack_trace.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <drivers/console.h>
|
||||
#include <kernaux/generic/display.h>
|
||||
#include <kernaux/multiboot2.h>
|
||||
|
||||
#include <kernaux/macro/packing_start.run>
|
||||
|
@ -23,6 +26,14 @@ KERNAUX_PACKED;
|
|||
|
||||
#include <kernaux/macro/packing_end.run>
|
||||
|
||||
void my_putc(void *display KERNAUX_UNUSED, char c);
|
||||
void my_vprintf(void *display KERNAUX_UNUSED, const char *format, va_list va);
|
||||
|
||||
static const struct KernAux_Display display = {
|
||||
.putc = my_putc,
|
||||
.vprintf = my_vprintf,
|
||||
};
|
||||
|
||||
void stack_trace_init(
|
||||
const struct KernAux_Multiboot2_Info *const multiboot2_info
|
||||
) {
|
||||
|
@ -45,10 +56,7 @@ void stack_trace_init(
|
|||
(const struct SectionEntry*)(&((uint8_t*)elf_symbols_tag)[20]);
|
||||
|
||||
drivers_console_puts("ELF symbols tag:");
|
||||
KernAux_Multiboot2_ITag_ELFSymbols_print(
|
||||
elf_symbols_tag,
|
||||
drivers_console_printf
|
||||
);
|
||||
KernAux_Multiboot2_ITag_ELFSymbols_print(elf_symbols_tag, &display);
|
||||
drivers_console_printf(" data: 0x%p\n", (void*)section_headers);
|
||||
drivers_console_putc('\n');
|
||||
|
||||
|
@ -99,3 +107,13 @@ void stack_trace_init(
|
|||
§ion_headers[debug_str_index];
|
||||
*/
|
||||
}
|
||||
|
||||
void my_putc(void *display KERNAUX_UNUSED, char c)
|
||||
{
|
||||
drivers_console_putc(c);
|
||||
}
|
||||
|
||||
void my_vprintf(void *display KERNAUX_UNUSED, const char *format, va_list va)
|
||||
{
|
||||
drivers_console_vprintf(format, va);
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 29728ae2a669d3916385909df38d4bcc95d09b7e
|
||||
Subproject commit aad813390ed6062f65ee89be47c214481e3ae5bd
|
|
@ -1 +1 @@
|
|||
Subproject commit b2c05b376773f5e6aaa5d5e2c57cd90d1d7a6dd9
|
||||
Subproject commit e6203d58cc7e472a7937c0c830f3658970b88a2f
|
Loading…
Reference in New Issue