1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:07:35 +00:00

Everywhere: Prefix hexadecimal numbers with 0x

Depending on the values it might be difficult to figure out whether a
value is decimal or hexadecimal. So let's make this more obvious. Also
this allows copying and pasting those numbers into GNOME calculator and
probably also other apps which auto-detect the base.
This commit is contained in:
Gunnar Beutner 2021-07-21 19:53:38 +02:00 committed by Andreas Kling
parent 7bfd319652
commit 31f30e732a
15 changed files with 67 additions and 86 deletions

View file

@ -39,13 +39,13 @@ static void handle_sigint(int)
static void handle_print_registers(const PtraceRegisters& regs)
{
#if ARCH(I386)
outln("eax={:08x} ebx={:08x} ecx={:08x} edx={:08x}", regs.eax, regs.ebx, regs.ecx, regs.edx);
outln("esp={:08x} ebp={:08x} esi={:08x} edi={:08x}", regs.esp, regs.ebp, regs.esi, regs.edi);
outln("eip={:08x} eflags={:08x}", regs.eip, regs.eflags);
outln("eax={:p} ebx={:p} ecx={:p} edx={:p}", regs.eax, regs.ebx, regs.ecx, regs.edx);
outln("esp={:p} ebp={:p} esi={:p} edi={:p}", regs.esp, regs.ebp, regs.esi, regs.edi);
outln("eip={:p} eflags={:p}", regs.eip, regs.eflags);
#else
outln("rax={:016x} rbx={:016x} rcx={:016x} rdx={:016x}", regs.rax, regs.rbx, regs.rcx, regs.rdx);
outln("rsp={:016x} rbp={:016x} rsi={:016x} rdi={:016x}", regs.rsp, regs.rbp, regs.rsi, regs.rdi);
outln("rip={:016x} rflags={:08x}", regs.rip, regs.rflags);
outln("rax={:p} rbx={:p} rcx={:p} rdx={:p}", regs.rax, regs.rbx, regs.rcx, regs.rdx);
outln("rsp={:p} rbp={:p} rsi={:p} rdi={:p}", regs.rsp, regs.rbp, regs.rsi, regs.rdi);
outln("rip={:p} rflags={:p}", regs.rip, regs.rflags);
#endif
}