Intercept calls to `openat' under Android
authorPo Lu <luangruo@yahoo.com>
Sat, 27 Jan 2024 02:36:30 +0000 (10:36 +0800)
committerPo Lu <luangruo@yahoo.com>
Sat, 27 Jan 2024 02:36:30 +0000 (10:36 +0800)
commitc37b50ad417c6cb340f54ffe218f5d889345451a
treefc6b825b4e3489621d0d7738eb739fa74e56d059
parent55f0b3e561034a1ad4235770d1c0685439a64fe5
Intercept calls to `openat' under Android

* exec/configure.ac (OPEN_SYSCALL, OPENAT_SYSCALL): Define new
macros.

* exec/exec.h (struct exec_tracee): New field `sp'.

* exec/trace.c (handle_openat): New function.
(process_system_call): If handle_openat executes successfully,
save the unmodified stack pointer within the tracee structure to
be restored once the system call completes.
exec/configure.ac
exec/exec.h
exec/trace.c