* [Qemu-devel] [PATCH] linux-user: correct handling of break exception for MIPS @ 2014-02-28 14:25 Petar Jovanovic 2014-02-28 15:30 ` Andreas Färber 0 siblings, 1 reply; 3+ messages in thread From: Petar Jovanovic @ 2014-02-28 14:25 UTC (permalink / raw) To: qemu-devel; +Cc: riku.voipio, petar.jovanovic, aurelien From: Petar Jovanovic <petar.jovanovic@imgtec.com> 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 <petar.jovanovic@imgtec.com> --- 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); + ret = 0; break; } -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] linux-user: correct handling of break exception for MIPS 2014-02-28 14:25 [Qemu-devel] [PATCH] linux-user: correct handling of break exception for MIPS Petar Jovanovic @ 2014-02-28 15:30 ` Andreas Färber 2014-02-28 17:10 ` Petar Jovanovic 0 siblings, 1 reply; 3+ messages in thread From: Andreas Färber @ 2014-02-28 15:30 UTC (permalink / raw) To: Petar Jovanovic, qemu-devel; +Cc: riku.voipio, petar.jovanovic, aurelien Hi, Am 28.02.2014 15:25, schrieb Petar Jovanovic: > From: Petar Jovanovic <petar.jovanovic@imgtec.com> > > 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 <petar.jovanovic@imgtec.com> > --- > 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 ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] linux-user: correct handling of break exception for MIPS 2014-02-28 15:30 ` Andreas Färber @ 2014-02-28 17:10 ` Petar Jovanovic 0 siblings, 0 replies; 3+ messages in thread From: Petar Jovanovic @ 2014-02-28 17:10 UTC (permalink / raw) To: Andreas Färber, Petar Jovanovic, qemu-devel@nongnu.org Cc: riku.voipio@linaro.org, aurelien@aurel32.net > This looks strange. Isn't &*info == info? It is. Just a few lines above, queue_signal is called in the same manner for style/preference reasons I presume, so this patch follows the pattern. Otherwise, it would require to change the other call site too. Regards, Petar ________________________________________ From: Andreas Färber [afaerber@suse.de] Sent: Friday, February 28, 2014 4:30 PM To: Petar Jovanovic; qemu-devel@nongnu.org Cc: riku.voipio@linaro.org; Petar Jovanovic; aurelien@aurel32.net Subject: Re: [Qemu-devel] [PATCH] linux-user: correct handling of break exception for MIPS Hi, Am 28.02.2014 15:25, schrieb Petar Jovanovic: > From: Petar Jovanovic <petar.jovanovic@imgtec.com> > > 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 <petar.jovanovic@imgtec.com> > --- > 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 ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-02-28 17:11 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-02-28 14:25 [Qemu-devel] [PATCH] linux-user: correct handling of break exception for MIPS Petar Jovanovic 2014-02-28 15:30 ` Andreas Färber 2014-02-28 17:10 ` Petar Jovanovic
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).