1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 07:28:11 +00:00

Kernel: Add exception_code to RegisterDump.

Added the exception_code field to RegisterDump, removing the need
for RegisterDumpWithExceptionCode. To accomplish this, I had to
push a dummy exception code during some interrupt entries to properly
pad out the RegisterDump. Note that we also needed to change some code
in sys$sigreturn to deal with the new RegisterDump layout.
This commit is contained in:
Drew Stratford 2019-10-05 03:31:34 +13:00 committed by Andreas Kling
parent 334e039294
commit 7fc903b97a
6 changed files with 23 additions and 38 deletions

View file

@ -864,9 +864,12 @@ int Process::sys$sigreturn(RegisterDump& registers)
current->m_signal_mask = *stack_ptr;
stack_ptr++;
//pop edi, esi, ebp, esp, ebx, edx, ecx, eax and eip
memcpy(&registers.edi, stack_ptr, 9 * sizeof(u32));
stack_ptr += 9;
//pop edi, esi, ebp, esp, ebx, edx, ecx and eax
memcpy(&registers.edi, stack_ptr, 8 * sizeof(u32));
stack_ptr += 8;
registers.eip = *stack_ptr;
stack_ptr++;
registers.eflags = *stack_ptr;
stack_ptr++;