From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 442 invoked by alias); 20 Jun 2011 15:14:36 -0000 Received: (qmail 434 invoked by uid 22791); 20 Jun 2011 15:14:35 -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 ausc60ps301.us.dell.com (HELO ausc60ps301.us.dell.com) (143.166.148.206) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 20 Jun 2011 15:14:22 +0000 X-Loopcount0: from 10.152.240.141 Subject: Re: [patch V2, testsuite] gdb.base/savedregs.exp: SIGSEGV -> SIGALRM Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Paul Koning In-Reply-To: <4DFF6239.9090203@codesourcery.com> Date: Mon, 20 Jun 2011 15:14:00 -0000 Cc: Mark Kettenis , Content-Transfer-Encoding: quoted-printable Message-Id: 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> <4DFF0418.6060706@codesourcery.com> <201106201110.p5KBAvb1025773@glazunov.sibelius.xs4all.nl> <4DFF6239.9090203@codesourcery.com> To: Yao Qi 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/msg00265.txt.bz2 On Jun 20, 2011, at 11:07 AM, Yao Qi wrote: > On 06/20/2011 07:10 PM, Mark Kettenis wrote: >> My concern with using SIGILL (apart from generating an instruction >> that forces SIGALL on all architectures we support) is that you're >> going to end up testing a different unwinder as well. Typically in >> the SIGSEGV case you'll end up at the faulting instruction, which is >> defenitely in the function body, where we should be using the DWARF >> CFI unwinder. But for SIGILL you could end up at the instruction >> after the trapping instruction, which is likely to be in the function >> epilogue which may be handled by an epilogue unwinder. >=20 > Oh, I don't know PC could be the next instruction of that illegal > instruction. At least, some years ago, when I was working on PowerPC, > PC still points to the illegal instruction when SIGILL is triggered. Same for MIPS. More in general, where the PC points for any given exception is very much a= n architecture dependent question. On some architectures, PC points to the= next instruction in a SEGV. On some architecture, PC points to the next i= nstruction on SIGILL. Some architectures have imprecise exceptions where a= ny number of these have a PC pointing somewhere in the vicinity (usually) o= f the offending instruction, but not a single well-known distance from it. paul