On 29 March 2016 at 15:13,  <cheng...@emindsoft.com.cn> wrote:
> From: Chen Gang <cheng...@emindsoft.com.cn>
>
> The return address is in target space, so the restorer address needs to
> be target space, too.
>
> Signed-off-by: Chen Gang <gang.chen.5...@gmail.com>
> ---
>  linux-user/signal.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/linux-user/signal.c b/linux-user/signal.c
> index 4157154..c0a6f7e 100644
> --- a/linux-user/signal.c
> +++ b/linux-user/signal.c
> @@ -3532,7 +3532,8 @@ static void setup_frame(int sig, struct 
> target_sigaction *ka,
>
>          /* Return from sighandler will jump to the tramp.
>             Negative 8 offset because return is rtsd r15, 8 */
> -        env->regs[15] = ((unsigned long)frame->tramp) - 8;
> +        env->regs[15] = frame_addr + offsetof(struct target_signal_frame, 
> tramp)
> +                                   - 8;
>      }
>
>      /* Set up registers for signal handler */

Reviewed-by: Peter Maydell <peter.mayd...@linaro.org>

thanks
-- PMM

Reply via email to