From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 57405 invoked by alias); 25 Feb 2016 01:39:13 -0000 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 Received: (qmail 57395 invoked by uid 89); 25 Feb 2016 01:39:12 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1603, H*r:Thu, outcome, risk X-HELO: mailapp01.imgtec.com Received: from mailapp01.imgtec.com (HELO mailapp01.imgtec.com) (195.59.15.196) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 25 Feb 2016 01:39:11 +0000 Received: from hhmail02.hh.imgtec.org (unknown [10.100.10.20]) by Websense Email Security Gateway with ESMTPS id CB46B90D3C7EF; Thu, 25 Feb 2016 01:39:08 +0000 (GMT) Received: from [10.100.200.149] (10.100.200.149) by hhmail02.hh.imgtec.org (10.100.10.21) with Microsoft SMTP Server id 14.3.266.1; Thu, 25 Feb 2016 01:39:08 +0000 Date: Thu, 25 Feb 2016 01:39:00 -0000 From: "Maciej W. Rozycki" To: Pedro Alves CC: , "Maciej W. Rozycki" Subject: Re: [PATCH] Handle MIPS Linux SIGTRAP siginfo.si_code values In-Reply-To: <56CE3AA6.6090005@redhat.com> Message-ID: References: <1456332239-24007-1-git-send-email-palves@redhat.com> <56CDFB9B.3090708@redhat.com> <56CE3AA6.6090005@redhat.com> User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-SW-Source: 2016-02/txt/msg00768.txt.bz2 On Wed, 24 Feb 2016, Pedro Alves wrote: > > to actually recognise these events at all in the first place. So we > > better have it right away or updated kernels will break GDB for a change. > > OK, if you're still willing to change the kernel, let's do it. > > I had somehow imagined (and reading back, I have no idea why) that you > _didn't_ want to change the si_code, if possible, and was going by that. > > (There's always risk associated with such a change, as it's effectively > an ABI break and some tool out there may be relying on SI_KERNEL and may > thus stop working correctly. Usually ABI stability trumps "cleanliness", > in kernel circles.) I'll post a proposal, cc-ing you (and Luis), and see if anything pops up. Given that the only codes for SIGTRAP on MIPS/Linux have so far been SI_USER (i.e. 0) or SI_KERNEL, I really doubt that any software bothered checking it. I've never thought of trying to fool a debugger by sending it SIGTRAP signals with kill(2) and now that I think of it, then honestly I fail to see a reason to actually special-case such fooling and prevent the user from doing so -- if they do it, then certainly they must have had a reason. Did GDB itself check for SI_KERNEL before your recent rewrite? > I've just finished testing it on s390 -- no regressions. I've > pushed it in now, as is. I'll follow up with a new patch that makes > gdb accept the anticipated new si_codes too. I'm fine with waiting for any outcome from a discussion with kernel people before pushing such a change. Maciej