| Message ID | 1393597532-17078-1-git-send-email-petar.jovanovic@rt-rk.com |
|---|---|
| State | New |
| Headers | show |
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; > } >
> 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
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; }