diff --git a/kernel/x64/x64.cpp b/kernel/x64/x64.cpp index 3be44780..8e7832ef 100644 --- a/kernel/x64/x64.cpp +++ b/kernel/x64/x64.cpp @@ -26,24 +26,24 @@ #include #include -namespace Sortix +namespace Sortix { +namespace X64 { + +void InterruptRegisters::LogRegisters() const { - namespace X64 - { - void InterruptRegisters::LogRegisters() const - { - Log::PrintF("[cr2=0x%zx,ds=0x%zx,rdi=0x%zx,rsi=0x%zx,rbp=0x%zx," - "rsp=0x%zx,rbx=0x%zx,rdx=0x%zx,rcx=0x%zx,rax=0x%zx," - "r8=0x%zx,r9=0x%zx,r10=0x%zx,r11=0x%zx,r12=0x%zx," - "r13=0x%zx,r14=0x%zx,r15=0x%zx,int_no=0x%zx," - "err_code=0x%zx,rip=0x%zx,cs=0x%zx,rflags=0x%zx," - "userrsp=0x%zx,ss=0x%zx]", - cr2, ds, rdi, rsi, rbp, - rsp, rbx, rdx, rcx, rax, - r8, r9, r10, r11, r12, - r13, r14, r15, int_no, - err_code, rip, cs, rflags, - userrsp, ss); - } - } + Log::PrintF("[cr2=0x%zx,ds=0x%zx,rdi=0x%zx,rsi=0x%zx,rbp=0x%zx," + "rsp=0x%zx,rbx=0x%zx,rdx=0x%zx,rcx=0x%zx,rax=0x%zx," + "r8=0x%zx,r9=0x%zx,r10=0x%zx,r11=0x%zx,r12=0x%zx," + "r13=0x%zx,r14=0x%zx,r15=0x%zx,int_no=0x%zx," + "err_code=0x%zx,rip=0x%zx,cs=0x%zx,rflags=0x%zx," + "userrsp=0x%zx,ss=0x%zx]", + cr2, ds, rdi, rsi, rbp, + rsp, rbx, rdx, rcx, rax, + r8, r9, r10, r11, r12, + r13, r14, r15, int_no, + err_code, rip, cs, rflags, + userrsp, ss); } + +} // namespace X64 +} // namespace Sortix diff --git a/kernel/x86/x86.cpp b/kernel/x86/x86.cpp index 9848175b..dd3ca174 100644 --- a/kernel/x86/x86.cpp +++ b/kernel/x86/x86.cpp @@ -26,20 +26,20 @@ #include #include -namespace Sortix +namespace Sortix { +namespace X86 { + +void InterruptRegisters::LogRegisters() const { - namespace X86 - { - void InterruptRegisters::LogRegisters() const - { - Log::PrintF("[cr2=0x%zx,ds=0x%zx,edi=0x%zx,esi=0x%zx,ebp=0x%zx," - "esp=0x%zx,ebx=0x%zx,edx=0x%zx,ecx=0x%zx,eax=0x%zx," - "int_no=0x%zx,err_code=0x%zx,eip=0x%zx,cs=0x%zx," - "eflags=0x%zx,useresp=0x%zx,ss=0x%zx]", - cr2, ds, edi, esi, ebp, - esp, ebx, edx, ecx, eax, - int_no, err_code, eip, cs, - eflags, useresp, ss); - } - } + Log::PrintF("[cr2=0x%zx,ds=0x%zx,edi=0x%zx,esi=0x%zx,ebp=0x%zx," + "esp=0x%zx,ebx=0x%zx,edx=0x%zx,ecx=0x%zx,eax=0x%zx," + "int_no=0x%zx,err_code=0x%zx,eip=0x%zx,cs=0x%zx," + "eflags=0x%zx,useresp=0x%zx,ss=0x%zx]", + cr2, ds, edi, esi, ebp, + esp, ebx, edx, ecx, eax, + int_no, err_code, eip, cs, + eflags, useresp, ss); } + +} // namespace X86 +} // namespace Sortix