Gentoo Archives: gentoo-commits

From: Mike Frysinger <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/sandbox:master commit in: libsandbox/trace/linux/
Date: Sun, 20 Dec 2015 22:04:51
Message-Id: 1450649056.05bc0619935cd3646e282a8d68b9564cad7d5b6e.vapier@gentoo
1 commit: 05bc0619935cd3646e282a8d68b9564cad7d5b6e
2 Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
3 AuthorDate: Sun Dec 20 22:04:16 2015 +0000
4 Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
5 CommitDate: Sun Dec 20 22:04:16 2015 +0000
6 URL: https://gitweb.gentoo.org/proj/sandbox.git/commit/?id=05bc0619
7
8 libsandbox: fix alpha ptrace error setting
9
10 Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>
11
12 libsandbox/trace/linux/alpha.c | 7 ++++++-
13 1 file changed, 6 insertions(+), 1 deletion(-)
14
15 diff --git a/libsandbox/trace/linux/alpha.c b/libsandbox/trace/linux/alpha.c
16 index 4aa6cd6..950d019 100644
17 --- a/libsandbox/trace/linux/alpha.c
18 +++ b/libsandbox/trace/linux/alpha.c
19 @@ -52,7 +52,12 @@ static long trace_raw_ret(void *vregs)
20
21 static void trace_set_ret(void *vregs, int err)
22 {
23 + /* We set r19 here, but it looks like trace_set_regs does not sync that.
24 + * Remember that {r16..r31} == {a0..a15}, so when we write out {a0..a5},
25 + * we also write out {r16..r21} -- a3 == r19.
26 + */
27 trace_regs *regs = vregs;
28 - regs->r0 = -err;
29 + regs->r0 = err;
30 + regs->r19 = -1;
31 trace_set_regs(regs);
32 }