From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32214 invoked by alias); 20 Jun 2011 08:26:23 -0000 Received: (qmail 32200 invoked by uid 22791); 20 Jun 2011 08:26:20 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,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; Mon, 20 Jun 2011 08:26:05 +0000 Received: (qmail 2059 invoked from network); 20 Jun 2011 08:26:04 -0000 Received: from unknown (HELO ?192.168.0.102?) (yao@127.0.0.2) by mail.codesourcery.com with ESMTPA; 20 Jun 2011 08:26:04 -0000 Message-ID: <4DFF0418.6060706@codesourcery.com> Date: Mon, 20 Jun 2011 08:26:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.17) Gecko/20110424 Lightning/1.0b2 Thunderbird/3.1.10 MIME-Version: 1.0 To: Mark Kettenis CC: gdb-patches@sourceware.org Subject: Re: [patch V2, testsuite] gdb.base/savedregs.exp: SIGSEGV -> SIGALRM References: <4DF09229.4070704@codesourcery.com> <201106091117.p59BHRWi025356@glazunov.sibelius.xs4all.nl> <4DF0C613.70101@codesourcery.com> <4DFEC8D8.3000608@codesourcery.com> <201106200701.p5K71m5h030689@glazunov.sibelius.xs4all.nl> In-Reply-To: <201106200701.p5K71m5h030689@glazunov.sibelius.xs4all.nl> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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/msg00260.txt.bz2 On 06/20/2011 03:01 PM, Mark Kettenis wrote: > That's an even bigger change. And I don't think that SIGALRM is even > guaranteed to happen before the program terminates. And if there > MMU-less systems that effectively don't support SIGSEGV, there > certainly are timer-less systems that don't support SIGALRM. > What system doesn't support SIGALRM? I noticed that SIGALRM is widely used in gdb testsuite, so I assume that it is safer to use SIGALRM than SIGILL here. > Really, just skip this test on MMU-less systems. If you're worried > about test coverage on your MMU-less ARM systems, add an additional > test in gdb.arch/ that uses an undefined instruction to generate > SIGILL. I am afraid it is not a good idea. There are many MMU-less processor, and shall we duplicate this test case all over under gdb.arch/ for each MMU-less processor? As I pointed out before, this test case has nothing to do with the difference of MMU system and MMU-less system. Originally, SIGSEGV was used here to trigger an invocation to signal handler. The key point of this case is "to trigger an invocation to a handler, and check the frame in signal handler", so handler of what signal doesn't matter here. Then, we should choose a signal which exists on all systems that gdb supports. Firstly, SIGSEGV is chosen, but it doesn't work on MMU-less system, then SIGILL and SIGALRM is proposed in my two patches respectively, which you don't like. Maybe, another option is to define invalid instruction for each targets in test case. -- Yao (齐尧)