mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:57:44 +00:00
UserspaceEmulator: Add support for UNIX signals :^)
The emulator will now register signal handlers for all possible signals and act as a translation layer between the kernel and the emulated process. To get an accurate simulation of signal handling, we duplicate the same trampoline mechanism used by the kernel's signal delivery system, and also use the "sigreturn" syscall to return from a signal handler. Signal masking is not fully implemented yet, but this is pretty cool!
This commit is contained in:
parent
ce95628b7f
commit
8dea25d974
3 changed files with 269 additions and 0 deletions
|
@ -241,6 +241,13 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
u32 eflags() const { return m_eflags; }
|
||||
void set_eflags(ValueWithShadow<u32> eflags)
|
||||
{
|
||||
m_eflags = eflags.value();
|
||||
m_flags_tainted = eflags.is_uninitialized();
|
||||
}
|
||||
|
||||
ValueWithShadow<u32> eax() const { return const_gpr32(X86::RegisterEAX); }
|
||||
ValueWithShadow<u32> ebx() const { return const_gpr32(X86::RegisterEBX); }
|
||||
ValueWithShadow<u32> ecx() const { return const_gpr32(X86::RegisterECX); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue