From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23852 invoked by alias); 23 Feb 2016 21:09:55 -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 23833 invoked by uid 89); 23 Feb 2016 21:09:54 -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:1683, him, cooked, watchpoint 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; Tue, 23 Feb 2016 21:09:53 +0000 Received: from hhmail02.hh.imgtec.org (unknown [10.100.10.20]) by Websense Email Security Gateway with ESMTPS id 2F792DB5443EF; Tue, 23 Feb 2016 21:09:47 +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; Tue, 23 Feb 2016 21:09:50 +0000 Date: Tue, 23 Feb 2016 21:09:00 -0000 From: "Maciej W. Rozycki" To: Luis Machado CC: Pedro Alves , , "Maciej W. Rozycki" Subject: Re: [PATCH, v3] Expect SI_KERNEL or TRAP_BRKPT si_code values for MIPS breakpoint traps In-Reply-To: <56CBBD44.8020808@codesourcery.com> Message-ID: References: <1456179628-14249-1-git-send-email-lgustavo@codesourcery.com> <56CB8E9D.70605@redhat.com> <56CBBD44.8020808@codesourcery.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/msg00701.txt.bz2 On Tue, 23 Feb 2016, Luis Machado wrote: > > If we get this for both software breakpoints and hardware watchpoints, > > then it seems to me that this change still leaves watchpoints broken, > > as I can't see how check_stopped_by_watchpoint is reached, in either > > gdb/linux-nat.c or gdbserver/linux-low.c. > > With or without this specific breakpoint fix, hardware watchpoints are already > broken for MIPS AFAICS. > > MIPS' kernel has never set si_code to anything other than SI_KERNEL. When the > change to expect TRAP_HWBKPT was committed, then hardware watchpoints stopped > working properly for MIPS. > > Now all hardware watchpoints produce are breakpoint-like traps that get > silently ignored by GDB as "delayed software breakpoint trap". Neither GDB nor > GDBserver can tell when a hardware watchpoint really happened by using si_code > information. Thanks for checking, I wasn't aware there could be something wrong here. > But this seems to be a different issue and i think it should be handle > separately. Agreed. I'll see if I can get a kernel patch cooked up in the next few days, however this still leaves a question open as to what to do about legacy systems which don't have these signal codes implemented. Plain leaving them broken forever does not sound like a good plan to me. > > Also, "and SIGTRAP's in general." seems wrong. I hope that that's > > not the case for user-sent SIGTRAPs? > > > > I'll get this updated in the next version. FWIW it LGTM, but I'll leave it up to Pedro to approve this change as it was him who requested a comment update. Maciej