diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-05-02 15:49:48 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-05-02 15:49:48 +0200 |
commit | 25ddcd1022032d5b0620cdd8fee5e336b6292742 (patch) | |
tree | c4a777f342c28d4ce9923efb5b2007e1697021f1 /Kernel | |
parent | 4508287cb24388ef54ed4a6202310fc4002d55d6 (diff) | |
download | serenity-25ddcd1022032d5b0620cdd8fee5e336b6292742.zip |
Kernel: Emit systrace events for exit, thread_exit and sigreturn.
Since these syscalls don't return to caller, we have to emit the trace
events manually.
Diffstat (limited to 'Kernel')
-rw-r--r-- | Kernel/Syscall.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Kernel/Syscall.cpp b/Kernel/Syscall.cpp index 252773348f..90fd031ed6 100644 --- a/Kernel/Syscall.cpp +++ b/Kernel/Syscall.cpp @@ -115,11 +115,15 @@ static dword handle(RegisterDump& regs, dword function, dword arg1, dword arg2, return current->process().sys$gethostname((char*)arg1, (size_t)arg2); case Syscall::SC_exit: cli(); + if (auto* tracer = current->process().tracer()) + tracer->did_syscall(function, arg1, arg2, arg3, 0); current->process().sys$exit((int)arg1); ASSERT_NOT_REACHED(); return 0; case Syscall::SC_exit_thread: cli(); + if (auto* tracer = current->process().tracer()) + tracer->did_syscall(function, arg1, arg2, arg3, 0); current->process().sys$exit_thread((int)arg1); ASSERT_NOT_REACHED(); break; @@ -170,6 +174,8 @@ static dword handle(RegisterDump& regs, dword function, dword arg1, dword arg2, case Syscall::SC_setgroups: return current->process().sys$setgroups((ssize_t)arg1, (const gid_t*)arg2); case Syscall::SC_sigreturn: + if (auto* tracer = current->process().tracer()) + tracer->did_syscall(function, arg1, arg2, arg3, 0); current->process().sys$sigreturn(); ASSERT_NOT_REACHED(); return 0; |