diff options
author | Mike Frysinger <vapier@gentoo.org> | 2015-12-20 17:04:16 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2015-12-20 17:04:16 -0500 |
commit | 05bc0619935cd3646e282a8d68b9564cad7d5b6e (patch) | |
tree | 04aaf22de47e8a853c064e964dd6bf06361c6c3b /libsandbox | |
parent | libsandbox: new ia64 ptrace port (diff) | |
download | sandbox-05bc0619935cd3646e282a8d68b9564cad7d5b6e.tar.gz sandbox-05bc0619935cd3646e282a8d68b9564cad7d5b6e.tar.bz2 sandbox-05bc0619935cd3646e282a8d68b9564cad7d5b6e.zip |
libsandbox: fix alpha ptrace error setting
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'libsandbox')
-rw-r--r-- | libsandbox/trace/linux/alpha.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libsandbox/trace/linux/alpha.c b/libsandbox/trace/linux/alpha.c index 4aa6cd6..950d019 100644 --- a/libsandbox/trace/linux/alpha.c +++ b/libsandbox/trace/linux/alpha.c @@ -52,7 +52,12 @@ static long trace_raw_ret(void *vregs) static void trace_set_ret(void *vregs, int err) { + /* We set r19 here, but it looks like trace_set_regs does not sync that. + * Remember that {r16..r31} == {a0..a15}, so when we write out {a0..a5}, + * we also write out {r16..r21} -- a3 == r19. + */ trace_regs *regs = vregs; - regs->r0 = -err; + regs->r0 = err; + regs->r19 = -1; trace_set_regs(regs); } |