From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20643 invoked by alias); 10 Dec 2001 19:33:35 -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 20622 invoked from network); 10 Dec 2001 19:33:32 -0000 Received: from unknown (HELO cygnus.com) (205.180.230.5) by sources.redhat.com with SMTP; 10 Dec 2001 19:33:32 -0000 Received: from cygnus.com (reddwarf.cygnus.com [205.180.231.12]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id LAA19888; Mon, 10 Dec 2001 11:33:31 -0800 (PST) Message-ID: <3C150D60.631D281C@cygnus.com> Date: Mon, 10 Dec 2001 11:33:00 -0000 From: Michael Snyder Organization: Red Hat, Inc. X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.4.2-2smp i686) X-Accept-Language: en MIME-Version: 1.0 To: Elena Zannoni CC: gdb-patches@sources.redhat.com Subject: Re: [RFA] ppc: include register numbers in gdbarch_tdep structure. References: <15379.50110.429092.453327@krustylu.cygnus.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2001-12/txt/msg00275.txt.bz2 Elena Zannoni wrote: > +++ ppc-bdm.c 2001/12/09 19:55:12 > @@ -200,8 +200,8 @@ bdm_ppc_fetch_registers (int regno) > /* printf("Asking for register %d\n", first_regno); */ > > /* if asking for an invalid register */ > - if ((first_regno == PPC_MQ_REGNUM) || > - ((first_regno >= FP0_REGNUM) && (first_regno <= FPLAST_REGNUM))) > + if ((first_regno == gdbarch_tdep (current_gdbarch)->ppc_mq_regnum) > + || ((first_regno >= FP0_REGNUM) && (first_regno <= FPLAST_REGNUM))) [and many similar changes] Not to be nit-picky, and I realize it's already been approved and committed, but wouldn't this code look prettier if we simply provided something like: #define PPC_MQ_REGNUM gdbarch_tdep (current_gdbarch)->ppc_mq_regnum