From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26800 invoked by alias); 16 Feb 2004 16:04:39 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 26785 invoked from network); 16 Feb 2004 16:04:38 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 16 Feb 2004 16:04:38 -0000 Received: from int-mx2.corp.redhat.com (nat-pool-rdu-dmz.redhat.com [172.16.52.200] (may be forged)) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id i1GG4bb21800 for ; Mon, 16 Feb 2004 11:04:37 -0500 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx2.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i1GG4aM27489 for ; Mon, 16 Feb 2004 11:04:37 -0500 Received: from cygbert.vinschen.de (vpn50-42.rdu.redhat.com [172.16.50.42]) by potter.sfbay.redhat.com (8.11.6/8.11.6) with ESMTP id i1GG4ZX18146 for ; Mon, 16 Feb 2004 08:04:35 -0800 Received: by cygbert.vinschen.de (Postfix, from userid 500) id 0A5AE580C6; Mon, 16 Feb 2004 17:04:28 +0100 (CET) Date: Mon, 16 Feb 2004 16:04:00 -0000 From: Corinna Vinschen To: gdb-patches@sources.redhat.com Subject: Re: [RFA] sh-tdep.c: Define only the minimal register set in sh_generic_register_name Message-ID: <20040216160428.GK18953@cygbert.vinschen.de> Reply-To: gdb-patches@sources.redhat.com Mail-Followup-To: gdb-patches@sources.redhat.com References: <20040212172905.GF3854@cygbert.vinschen.de> <16432.58389.45723.945873@localhost.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <16432.58389.45723.945873@localhost.redhat.com> User-Agent: Mutt/1.4.2i X-SW-Source: 2004-02/txt/msg00408.txt.bz2 On Feb 16 10:39, Elena Zannoni wrote: > Your are right. I would prefer to just get rid of the function > entirely. It is already the same as the sh3e_register_name. And after > the change it would duplicate the sh_register_name. No point in > keeping it around. Thanks, I've applied the below patch then. Corinna Index: sh-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/sh-tdep.c,v retrieving revision 1.159 diff -u -p -r1.159 sh-tdep.c --- sh-tdep.c 14 Feb 2004 15:46:33 -0000 1.159 +++ sh-tdep.c 16 Feb 2004 16:03:00 -0000 @@ -74,27 +74,6 @@ struct sh_frame_cache }; static const char * -sh_generic_register_name (int reg_nr) -{ - static char *register_names[] = { - "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", - "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15", - "pc", "pr", "gbr", "vbr", "mach", "macl", "sr", - "fpul", "fpscr", - "fr0", "fr1", "fr2", "fr3", "fr4", "fr5", "fr6", "fr7", - "fr8", "fr9", "fr10", "fr11", "fr12", "fr13", "fr14", "fr15", - "ssr", "spc", - "r0b0", "r1b0", "r2b0", "r3b0", "r4b0", "r5b0", "r6b0", "r7b0", - "r0b1", "r1b1", "r2b1", "r3b1", "r4b1", "r5b1", "r6b1", "r7b1", - }; - if (reg_nr < 0) - return NULL; - if (reg_nr >= (sizeof (register_names) / sizeof (*register_names))) - return NULL; - return register_names[reg_nr]; -} - -static const char * sh_sh_register_name (int reg_nr) { static char *register_names[] = { @@ -2332,7 +2311,7 @@ sh_gdbarch_init (struct gdbarch_info inf break; default: - set_gdbarch_register_name (gdbarch, sh_generic_register_name); + set_gdbarch_register_name (gdbarch, sh_sh_register_name); break; } -- Corinna Vinschen Cygwin Developer Red Hat, Inc.