From d38f995aeec761879865ea2ab30128da4c5cdaf8 Mon Sep 17 00:00:00 2001 From: Steve Reinhardt Date: Tue, 10 Feb 2004 21:43:57 -0800 Subject: Fixes for Linux syscall emulation. arch/alpha/alpha_linux_process.cc: Fixes for Linux emulation: - stat struct alignment - osf_{get,set}sysinfo return values - additional syscall numbers - initialize $r0 to 0 sim/syscall_emul.cc: brk(0) just returns brk value (don't update it!) --HG-- extra : convert_revision : 78e22458321c81e81540d101c9e65e2e4b0ad117 --- sim/syscall_emul.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sim') diff --git a/sim/syscall_emul.cc b/sim/syscall_emul.cc index e953a7308..57ae39cf8 100644 --- a/sim/syscall_emul.cc +++ b/sim/syscall_emul.cc @@ -104,7 +104,9 @@ int obreakFunc(SyscallDesc *desc, int num, Process *p, ExecContext *xc) { // change brk addr to first arg - p->brk_point = xc->getSyscallArg(0); + Addr new_brk = xc->getSyscallArg(0); + if (new_brk != 0) + p->brk_point = xc->getSyscallArg(0); return p->brk_point; } -- cgit v1.2.3