Skip to content

Commit 9c76d28

Browse files
Andrew Boieandrewboie
authored andcommitted
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 <[email protected]>
1 parent a41c0d2 commit 9c76d28

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

arch/x86/core/intel64/fatal.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,19 @@ LOG_MODULE_DECLARE(os);
1313
void z_x86_fatal_error(unsigned int reason, const z_arch_esf_t *esf)
1414
{
1515
if (esf != NULL) {
16-
LOG_ERR("RIP=%016lx RSP=%016lx RFLAGS=%016lx\n",
16+
LOG_ERR("RIP: 0x%016lx RSP: 0x%016lx RFLAGS: 0x%016lx",
1717
esf->rip, esf->rsp, esf->rflags);
1818

19-
LOG_ERR("RAX=%016lx RBX=%016lx RCX=%016lx RDX=%016lx\n",
19+
LOG_ERR("RAX: 0x%016lx RBX: 0x%016lx RCX: 0x%016lx RDX: 0x%016lx",
2020
esf->rax, esf->rbx, esf->rcx, esf->rdx);
2121

22-
LOG_ERR("RSI=%016lx RDI=%016lx RBP=%016lx RSP=%016lx\n",
22+
LOG_ERR("RSI: 0x%016lx RDI: 0x%016lx RBP: 0x%016lx RSP: 0x%016lx",
2323
esf->rsi, esf->rdi, esf->rbp, esf->rsp);
2424

25-
LOG_ERR("R8=%016lx R9=%016lx R10=%016lx R11=%016lx\n",
25+
LOG_ERR(" R8: 0x%016lx R9: 0x%016lx R10: 0x%016lx R11: 0x%016lx",
2626
esf->r8, esf->r9, esf->r10, esf->r11);
2727

28-
LOG_ERR("R12=%016lx R13=%016lx R14=%016lx R15=%016lx\n",
28+
LOG_ERR("R12: 0x%016lx R13: 0x%016lx R14: 0x%016lx R15: 0x%016lx",
2929
esf->r12, esf->r13, esf->r14, esf->r15);
3030
}
3131

@@ -34,7 +34,7 @@ void z_x86_fatal_error(unsigned int reason, const z_arch_esf_t *esf)
3434

3535
void z_x86_exception(const z_arch_esf_t *esf)
3636
{
37-
LOG_ERR("** CPU Exception %ld (code %ld/0x%lx) **\n",
37+
LOG_ERR("** CPU Exception %ld (code %ld/0x%lx) **",
3838
esf->vector, esf->code, esf->code);
3939

4040
z_x86_fatal_error(K_ERR_CPU_EXCEPTION, esf);

0 commit comments

Comments
 (0)