qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] linux-user: correct handling of break exception


From: Andreas Färber
Subject: Re: [Qemu-devel] [PATCH] linux-user: correct handling of break exception for MIPS
Date: Fri, 28 Feb 2014 16:30:27 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0

Hi,

Am 28.02.2014 15:25, schrieb Petar Jovanovic:
> From: Petar Jovanovic <address@hidden>
> 
> Exception with break instruction has not been correctly propagated as
> SIGTRAP. This resolves crash issues with examples that use break
> instruction on MIPS.
> 
> Signed-off-by: Petar Jovanovic <address@hidden>
> ---
>  linux-user/main.c |    4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/linux-user/main.c b/linux-user/main.c
> index 9192977..c19e7fb 100644
> --- a/linux-user/main.c
> +++ b/linux-user/main.c
> @@ -2384,6 +2384,10 @@ static int do_break(CPUMIPSState *env, 
> target_siginfo_t *info,
>          ret = 0;
>          break;
>      default:
> +        info->si_signo = TARGET_SIGTRAP;
> +        info->si_errno = 0;
> +        queue_signal(env, info->si_signo, &*info);

This looks strange. Isn't &*info == info?

Other than that seems to touch only MIPS code and looks sensible.

Regards,
Andreas

> +        ret = 0;
>          break;
>      }
>  

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg



reply via email to

[Prev in Thread] Current Thread [Next in Thread]