From 9c76d28beefd888fa55c7ea9c0b41f04f89bf419 Mon Sep 17 00:00:00 2001 From: Andrew Boie Date: Thu, 10 Oct 2019 11:59:16 -0700 Subject: [PATCH] x86: intel64: fatal: minor formatting improvements Line up everything nicely, add leading '0x' to hex addresses, and remove redundant newlines. Add whitespace between the register name and contents so the contents can be easily selected from a terminal. Signed-off-by: Andrew Boie --- arch/x86/core/intel64/fatal.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/x86/core/intel64/fatal.c b/arch/x86/core/intel64/fatal.c index 1cf628532c5..ada49723c94 100644 --- a/arch/x86/core/intel64/fatal.c +++ b/arch/x86/core/intel64/fatal.c @@ -13,19 +13,19 @@ LOG_MODULE_DECLARE(os); void z_x86_fatal_error(unsigned int reason, const z_arch_esf_t *esf) { if (esf != NULL) { - LOG_ERR("RIP=%016lx RSP=%016lx RFLAGS=%016lx\n", + LOG_ERR("RIP: 0x%016lx RSP: 0x%016lx RFLAGS: 0x%016lx", esf->rip, esf->rsp, esf->rflags); - LOG_ERR("RAX=%016lx RBX=%016lx RCX=%016lx RDX=%016lx\n", + LOG_ERR("RAX: 0x%016lx RBX: 0x%016lx RCX: 0x%016lx RDX: 0x%016lx", esf->rax, esf->rbx, esf->rcx, esf->rdx); - LOG_ERR("RSI=%016lx RDI=%016lx RBP=%016lx RSP=%016lx\n", + LOG_ERR("RSI: 0x%016lx RDI: 0x%016lx RBP: 0x%016lx RSP: 0x%016lx", esf->rsi, esf->rdi, esf->rbp, esf->rsp); - LOG_ERR("R8=%016lx R9=%016lx R10=%016lx R11=%016lx\n", + LOG_ERR(" R8: 0x%016lx R9: 0x%016lx R10: 0x%016lx R11: 0x%016lx", esf->r8, esf->r9, esf->r10, esf->r11); - LOG_ERR("R12=%016lx R13=%016lx R14=%016lx R15=%016lx\n", + LOG_ERR("R12: 0x%016lx R13: 0x%016lx R14: 0x%016lx R15: 0x%016lx", esf->r12, esf->r13, esf->r14, esf->r15); } @@ -34,7 +34,7 @@ void z_x86_fatal_error(unsigned int reason, const z_arch_esf_t *esf) void z_x86_exception(const z_arch_esf_t *esf) { - LOG_ERR("** CPU Exception %ld (code %ld/0x%lx) **\n", + LOG_ERR("** CPU Exception %ld (code %ld/0x%lx) **", esf->vector, esf->code, esf->code); z_x86_fatal_error(K_ERR_CPU_EXCEPTION, esf);