From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11088 invoked by alias); 3 Oct 2014 16:32:18 -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 11075 invoked by uid 89); 3 Oct 2014 16:32:17 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.0 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 03 Oct 2014 16:32:13 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-FEM-02.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1Xa5m5-0005BY-Ke from Maciej_Rozycki@mentor.com ; Fri, 03 Oct 2014 09:32:09 -0700 Received: from localhost (137.202.0.76) by SVR-IES-FEM-02.mgc.mentorg.com (137.202.0.106) with Microsoft SMTP Server (TLS) id 14.3.181.6; Fri, 3 Oct 2014 17:32:08 +0100 Date: Fri, 03 Oct 2014 16:32:00 -0000 From: "Maciej W. Rozycki" To: Pedro Alves , James Hogan CC: Subject: Re: [PATCH] MIPS: Ignore invalid regs during info registers all In-Reply-To: <542ACDDB.2080202@redhat.com> Message-ID: References: <1412088186-26402-1-git-send-email-james.hogan@imgtec.com> <542AC5A9.7060101@redhat.com> <542AC6CE.3070700@imgtec.com> <542ACDDB.2080202@redhat.com> User-Agent: Alpine 1.10 (DEB 962 2008-03-14) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-SW-Source: 2014-10/txt/msg00071.txt.bz2 On Tue, 30 Sep 2014, Pedro Alves wrote: > >>> The "info registers all" command causes mips_print_registers_info () to be > >>> called for all register numbers, including invalid ones such as unused DSP > >>> register numbers. This triggers an error () call which prevents further > >>> register values being printed. Just silently return without printing > >>> anything or erroring, so that all valid registers can be printed. > >> > >> What happens when the user does "info registers that-unused-register" ? > > > > I don't think that's possible, because the check is: > > if (*(gdbarch_register_name (gdbarch, regnum)) == '\0') > > > > So any such register already has no name by which to refer to it. > > Indeed. :-) I'll leave it to Maciej to approve. I didn't know `info registers' (and `info all-registers' presumably as well) supported further arguments; I'll experiment with the patch a bit and see what comes out. James, did you push your change through regression testing? If so, then how? Please always state precisely how changes you submit have been validated. Maciej