From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19582 invoked by alias); 22 Apr 2002 13:59:06 -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 19543 invoked from network); 22 Apr 2002 13:59:00 -0000 Received: from unknown (HELO localhost.redhat.com) (24.112.240.27) by sources.redhat.com with SMTP; 22 Apr 2002 13:59:00 -0000 Received: from cygnus.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 152AD3D1A; Mon, 22 Apr 2002 09:59:00 -0400 (EDT) Message-ID: <3CC41723.70603@cygnus.com> Date: Mon, 22 Apr 2002 06:59:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:0.9.9) Gecko/20020328 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Richard.Earnshaw@arm.com Cc: gdb-patches@sources.redhat.com Subject: Re: [patch:arm] Don't use NUM_PSEUDO_REGS in arm_gdbarch_init() References: <200204221107.MAA06332@cam-mail2.cambridge.arm.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-04/txt/msg00791.txt.bz2 > Hello, >> >> The macro NUM_PSEUDO_REGS refers to ``current_gdbarch'' and not >> ``gdbarch''. Hence the equation in the patch was picking up the number >> of pseudo-registers from the previously selected architecture (which may >> not even be ARM), outch! No wonder macro's are bad :-) >> >> The attached calls gdbarch_num_pseudo_regs() directly with the correct >> architecture. (It also fixes a core dump that my next patch will cause ...) >> >> Committed as fairly obvious. >> >> Andrew >> >> 2002-04-20 Andrew Cagney >> >> * arm-tdep.c (arm_gdbarch_init): Use gdbarch_num_pseudo_regs >> instead of NUM_PSEUDO_REGS. > > > Argh! As you will see from the comment, I'd already fixed a similar > problem to avoid using SIZEOF_FRAME_SAVED_REGS, but missed that part. Can > you update the comment as well? M'kay. > /* We can't use SIZEOF_FRAME_SAVED_REGS here, since that still > references the old architecture vector, not the one we are > building here. */ BTW, once the patch: http://sources.redhat.com/ml/gdb-patches/2002-04/msg00711.html goes through the problem should largely ``go away''. Andrew