From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6696 invoked by alias); 7 Nov 2007 12:58:20 -0000 Received: (qmail 6688 invoked by uid 22791); 7 Nov 2007 12:58:19 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 07 Nov 2007 12:58:13 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 398F198353; Wed, 7 Nov 2007 12:58:11 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id DCDE79833F; Wed, 7 Nov 2007 12:58:10 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.68) (envelope-from ) id 1IpkTx-0003h0-Kj; Wed, 07 Nov 2007 07:58:09 -0500 Date: Wed, 07 Nov 2007 12:58:00 -0000 From: Daniel Jacobowitz To: Markus Deuling Cc: Mark Kettenis , gdb-patches@sourceware.org, uweigand@de.ibm.com Subject: Re: [rfc] [02/05] Get rid of current_gdbarch in hppa-linux-nat.c Message-ID: <20071107125809.GA14179@caradoc.them.org> Mail-Followup-To: Markus Deuling , Mark Kettenis , gdb-patches@sourceware.org, uweigand@de.ibm.com References: <47319D46.8080904@de.ibm.com> <200711071130.lA7BUDaD014732@brahms.sibelius.xs4all.nl> <4731A642.6080402@de.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4731A642.6080402@de.ibm.com> User-Agent: Mutt/1.5.15 (2007-04-09) X-IsSubscribed: yes 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 X-SW-Source: 2007-11/txt/msg00124.txt.bz2 On Wed, Nov 07, 2007 at 12:49:22PM +0100, Markus Deuling wrote: > Sure it would. But what for do we have gdbarch_num_regs? I dont think its a > good idea > to either use gdbarch_num_regs or ARRAY_SIZE(whatever) at will. This is > redundant and error-prone. > Btw, there are two further uses of gdbarch_num_regs in that file. > > For my opinion gdbarch should be used to describe an architecture. That doesn't make any sense. The error is there to make sure we don't access memory outside the array. -- Daniel Jacobowitz CodeSourcery