aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ali Polatel <polatel@gmail.com> 2009-08-23 19:48:34 +0300
committerAvatar Ali Polatel <polatel@gmail.com> 2009-08-23 19:48:38 +0300
commit980f3c65587722234585348ae8cde174d4cc6808 (patch)
treef7401b4e8d760933e6d6add502c06bfe9abe67e2
parent15fb6c885b6cf535f7cc5aaa3da3ddede2862745 (diff)
downloadsydbox-sparc64.tar.gz
sydbox-sparc64.tar.xz
sparc64: Fix trace_set_returnsparc64
-rw-r--r--src/trace-sparc64.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/trace-sparc64.c b/src/trace-sparc64.c
index 33ebaa2..2e54b62 100644
--- a/src/trace-sparc64.c
+++ b/src/trace-sparc64.c
@@ -145,12 +145,14 @@ int trace_set_return(pid_t pid, long val)
return -1;
}
- if (val < 0)
+ if (val < 0) {
regs.r_tstate |= 0x1100000000UL;
- else
+ regs.r_o0 = -val;
+ }
+ else {
regs.r_tstate &= ~0x1100000000UL;
-
- regs.r_o0 = val;
+ regs.r_o0 = val;
+ }
if (G_UNLIKELY(0 > ptrace(PTRACE_SETREGS, pid, &regs, NULL))) {
save_errno = errno;