[patch, testsuite] gdb.base/savedregs.exp: SIGSEGV -> SIGILL
Pedro Alves
pedro@codesourcery.com
Thu Jun 9 14:25:00 GMT 2011
On Thursday 09 June 2011 14:09:39, Yao Qi wrote:
> On 06/09/2011 07:17 PM, Mark Kettenis wrote:
> >> Date: Thu, 09 Jun 2011 17:28:09 +0800
> >> From: Yao Qi <yao@codesourcery.com>
> >>
> >> In current gdb.base/savedregs.exp, signal handler is installed for
> >> signal SIGSEGV, and SIGSEGV is trigger by `*(char *)0 = 0;'. However,
> >> on non-mmu uclinux system, writing to an address 0x0 doesn't trigger
> >> SIGSEGV.
> >>
> >> In my patch, SIGILL is chosen to replace SIGSEGV. One assumption here
> >> is that 0xffff is an invalid instruction on all ports.
> >
> > Please don't do this. You're changing the test significantly. And
>
> I don't think the test is changed *significantly*. The purpose of
> writing to zero, at least in this case, is to trigger a signal, and
> check the register in signal trampoline frame. Either SIGSEGV or SIGILL
> meets this need.
You made me go look for the original explanation behind the
test :-)
<http://sourceware.org/ml/gdb-patches/2004-10/msg00475.html>
--
Pedro Alves
More information about the Gdb-patches
mailing list