summaryrefslogtreecommitdiff
path: root/exec/exec.h
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2024-01-27 10:36:30 +0800
committerPo Lu <luangruo@yahoo.com>2024-01-27 10:36:30 +0800
commitc37b50ad417c6cb340f54ffe218f5d889345451a (patch)
treefc6b825b4e3489621d0d7738eb739fa74e56d059 /exec/exec.h
parent55f0b3e561034a1ad4235770d1c0685439a64fe5 (diff)
downloademacs-c37b50ad417c6cb340f54ffe218f5d889345451a.tar.gz
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.
Diffstat (limited to 'exec/exec.h')
-rw-r--r--exec/exec.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/exec/exec.h b/exec/exec.h
index bed5edc9bab..ad1b50276c8 100644
--- a/exec/exec.h
+++ b/exec/exec.h
@@ -148,6 +148,10 @@ struct exec_tracee
/* The next process being traced. */
struct exec_tracee *next;
+ /* Address of any stack pointer to restore after system call
+ completion. */
+ USER_WORD sp;
+
/* The thread ID of this process. */
pid_t pid;