diff options
author | Mike Frysinger <vapier@gentoo.org> | 2015-12-20 04:48:47 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2015-12-20 04:48:47 -0500 |
commit | 3ae4d849ae4aaaf469bc9a58b01d8a2b2931c14a (patch) | |
tree | 2e0c65dea21e544e2e9647bcf51785262d9a6d51 /libsandbox | |
parent | build: fix schizo match on x86 hosts (diff) | |
download | sandbox-3ae4d849ae4aaaf469bc9a58b01d8a2b2931c14a.tar.gz sandbox-3ae4d849ae4aaaf469bc9a58b01d8a2b2931c14a.tar.bz2 sandbox-3ae4d849ae4aaaf469bc9a58b01d8a2b2931c14a.zip |
libsandbox: new arm ptrace port
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'libsandbox')
-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; +} |