mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-27 10:00:24 +00:00
UserspaceEmulator: Add support for SC_abort syscall
This commit is contained in:
parent
d2b7500c65
commit
7191098356
Notes:
sideshowbarker
2024-07-18 21:10:45 +09:00
Author: https://github.com/bcoles Commit: https://github.com/SerenityOS/serenity/commit/71910983560 Pull-request: https://github.com/SerenityOS/serenity/pull/5899
2 changed files with 12 additions and 0 deletions
|
@ -163,6 +163,7 @@ private:
|
|||
int virt$connect(int sockfd, FlatPtr address, socklen_t address_size);
|
||||
int virt$shutdown(int sockfd, int how);
|
||||
void virt$sync();
|
||||
void virt$abort();
|
||||
void virt$exit(int);
|
||||
ssize_t virt$getrandom(FlatPtr buffer, size_t buffer_size, unsigned int flags);
|
||||
int virt$chdir(FlatPtr, size_t);
|
||||
|
|
|
@ -219,6 +219,9 @@ u32 Emulator::virt_syscall(u32 function, u32 arg1, u32 arg2, u32 arg3)
|
|||
case SC_sync:
|
||||
virt$sync();
|
||||
return 0;
|
||||
case SC_abort:
|
||||
virt$abort();
|
||||
return 0;
|
||||
case SC_exit:
|
||||
virt$exit((int)arg1);
|
||||
return 0;
|
||||
|
@ -1027,6 +1030,14 @@ void Emulator::virt$sync()
|
|||
syscall(SC_sync);
|
||||
}
|
||||
|
||||
void Emulator::virt$abort()
|
||||
{
|
||||
reportln("\n=={}== \033[33;1mSyscall: abort\033[0m, shutting down!", getpid());
|
||||
m_exit_status = 127;
|
||||
m_shutdown = true;
|
||||
dump_backtrace();
|
||||
}
|
||||
|
||||
void Emulator::virt$exit(int status)
|
||||
{
|
||||
reportln("\n=={}== \033[33;1mSyscall: exit({})\033[0m, shutting down!", getpid(), status);
|
||||
|
|
Loading…
Reference in a new issue