From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2105 invoked by alias); 9 Jun 2011 14:25:49 -0000 Received: (qmail 2083 invoked by uid 22791); 9 Jun 2011 14:25:47 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,TW_XF,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 09 Jun 2011 14:25:33 +0000 Received: (qmail 2186 invoked from network); 9 Jun 2011 14:25:32 -0000 Received: from unknown (HELO scottsdale.localnet) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 9 Jun 2011 14:25:32 -0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: [patch, testsuite] gdb.base/savedregs.exp: SIGSEGV -> SIGILL Date: Thu, 09 Jun 2011 14:25:00 -0000 User-Agent: KMail/1.13.6 (Linux/2.6.38-8-generic; KDE/4.6.2; x86_64; ; ) Cc: Yao Qi , Mark Kettenis References: <4DF09229.4070704@codesourcery.com> <201106091117.p59BHRWi025356@glazunov.sibelius.xs4all.nl> <4DF0C613.70101@codesourcery.com> In-Reply-To: <4DF0C613.70101@codesourcery.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201106091525.28900.pedro@codesourcery.com> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-06/txt/msg00133.txt.bz2 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 > >> > >> 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 :-) -- Pedro Alves