From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27090 invoked by alias); 30 Sep 2014 15:05:56 -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 27081 invoked by uid 89); 30 Sep 2014 15:05:55 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 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, 30 Sep 2014 15:05:55 +0000 Received: from KLMAIL01.kl.imgtec.org (unknown [192.168.5.35]) by Websense Email Security Gateway with ESMTPS id 27D99C0424504; Tue, 30 Sep 2014 16:05:48 +0100 (IST) Received: from LEMAIL01.le.imgtec.org (192.168.152.62) by KLMAIL01.kl.imgtec.org (192.168.5.35) with Microsoft SMTP Server (TLS) id 14.3.195.1; Tue, 30 Sep 2014 16:05:51 +0100 Received: from [192.168.154.101] (192.168.154.101) by LEMAIL01.le.imgtec.org (192.168.152.62) with Microsoft SMTP Server (TLS) id 14.3.195.1; Tue, 30 Sep 2014 16:05:50 +0100 Message-ID: <542AC6CE.3070700@imgtec.com> Date: Tue, 30 Sep 2014 15:05:00 -0000 From: James Hogan User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: Pedro Alves , Subject: Re: [PATCH] MIPS: Ignore invalid regs during info registers all References: <1412088186-26402-1-git-send-email-james.hogan@imgtec.com> <542AC5A9.7060101@redhat.com> In-Reply-To: <542AC5A9.7060101@redhat.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2014-09/txt/msg00905.txt.bz2 On 30/09/14 16:00, Pedro Alves wrote: > On 09/30/2014 03:43 PM, James Hogan 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. Cheers James