diff options
-rw-r--r-- | libsandbox/trace/linux/arch.c | 2 | ||||
-rw-r--r-- | libsandbox/trace/linux/arm.c | 22 |
2 files changed, 24 insertions, 0 deletions
diff --git a/libsandbox/trace/linux/arch.c b/libsandbox/trace/linux/arch.c index 53461d6..83b6977 100644 --- a/libsandbox/trace/linux/arch.c +++ b/libsandbox/trace/linux/arch.c @@ -7,6 +7,8 @@ #if !defined(HAVE_PTRACE) || !defined(HAVE_SYS_PTRACE_H) || \ !defined(HAVE_SYS_USER_H) || !defined(PTRACE_SETOPTIONS) # define SB_NO_TRACE_ARCH +#elif defined(__arm__) +# include "arm.c" #elif defined(__bfin__) # include "bfin.c" #elif defined(__hppa__) diff --git a/libsandbox/trace/linux/arm.c b/libsandbox/trace/linux/arm.c new file mode 100644 index 0000000..fbbf7cb --- /dev/null +++ b/libsandbox/trace/linux/arm.c @@ -0,0 +1,22 @@ +#define trace_reg_ret ARM_r0 + +static int trace_get_sysnum(void *vregs) +{ + trace_regs *regs = vregs; + return regs->ARM_r7; +} +static void trace_set_sysnum(void *vregs, long nr) +{ + trace_regs *regs = vregs; + regs->ARM_r0 = nr; + trace_set_regs(regs); +} + +static unsigned long trace_arg(void *vregs, int num) +{ + trace_regs *regs = vregs; + if (num < 7) + return regs->uregs[num - 1]; + else + return -1; +} |