linux-user/s390x: Add stub sigframe argument for last_break

In order to properly present these arguments, we need to add
code to target/s390x to record LowCore parameters for user-only.

But in the meantime, at least zero the missing last_break
argument, and fixup the comment style in the vicinity.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: David Hildenbrand <david@redhat.com>
Message-Id: <20210428193408.233706-12-richard.henderson@linaro.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
This commit is contained in:
Richard Henderson 2021-04-28 12:34:04 -07:00 committed by Laurent Vivier
parent 7e5355578e
commit 6c18757dc5

View File

@ -167,13 +167,16 @@ void setup_frame(int sig, struct target_sigaction *ka,
| (env->psw.mask & ~PSW_MASK_ASC); | (env->psw.mask & ~PSW_MASK_ASC);
env->psw.addr = ka->_sa_handler; env->psw.addr = ka->_sa_handler;
env->regs[2] = sig; //map_signal(sig); env->regs[2] = sig;
env->regs[3] = frame_addr += offsetof(typeof(*frame), sc); env->regs[3] = frame_addr += offsetof(typeof(*frame), sc);
/* We forgot to include these in the sigcontext. /*
To avoid breaking binary compatibility, they are passed as args. */ * We forgot to include these in the sigcontext.
env->regs[4] = 0; // FIXME: no clue... current->thread.trap_no; * To avoid breaking binary compatibility, they are passed as args.
env->regs[5] = 0; // FIXME: no clue... current->thread.prot_addr; */
env->regs[4] = 0; /* FIXME: regs->int_code & 127 */
env->regs[5] = 0; /* FIXME: regs->int_parm_long */
env->regs[6] = 0; /* FIXME: current->thread.last_break */
/* Place signal number on stack to allow backtrace from handler. */ /* Place signal number on stack to allow backtrace from handler. */
__put_user(env->regs[2], &frame->signo); __put_user(env->regs[2], &frame->signo);
@ -223,9 +226,10 @@ void setup_rt_frame(int sig, struct target_sigaction *ka,
| (env->psw.mask & ~PSW_MASK_ASC); | (env->psw.mask & ~PSW_MASK_ASC);
env->psw.addr = ka->_sa_handler; env->psw.addr = ka->_sa_handler;
env->regs[2] = sig; //map_signal(sig); env->regs[2] = sig;
env->regs[3] = frame_addr + offsetof(typeof(*frame), info); env->regs[3] = frame_addr + offsetof(typeof(*frame), info);
env->regs[4] = frame_addr + offsetof(typeof(*frame), uc); env->regs[4] = frame_addr + offsetof(typeof(*frame), uc);
env->regs[5] = 0; /* FIXME: current->thread.last_break */
} }
static void restore_sigregs(CPUS390XState *env, target_sigregs *sc) static void restore_sigregs(CPUS390XState *env, target_sigregs *sc)