From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3456 invoked by alias); 22 Apr 2002 11:08:12 -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 3449 invoked from network); 22 Apr 2002 11:08:11 -0000 Received: from unknown (HELO fw-cam.cambridge.arm.com) (193.131.176.3) by sources.redhat.com with SMTP; 22 Apr 2002 11:08:11 -0000 Received: by fw-cam.cambridge.arm.com; id MAA18349; Mon, 22 Apr 2002 12:08:09 +0100 (BST) Received: from unknown(172.16.1.2) by fw-cam.cambridge.arm.com via smap (V5.5) id xma017353; Mon, 22 Apr 02 12:07:20 +0100 Received: from cam-mail2.cambridge.arm.com (localhost [127.0.0.1]) by cam-admin0.cambridge.arm.com (8.9.3/8.9.3) with ESMTP id MAA08463; Mon, 22 Apr 2002 12:07:19 +0100 (BST) Received: from sun18.cambridge.arm.com (sun18.cambridge.arm.com [172.16.2.18]) by cam-mail2.cambridge.arm.com (8.9.3/8.9.3) with ESMTP id MAA06332; Mon, 22 Apr 2002 12:07:19 +0100 (BST) Message-Id: <200204221107.MAA06332@cam-mail2.cambridge.arm.com> To: Andrew Cagney cc: gdb-patches@sources.redhat.com, Richard.Earnshaw@arm.com Reply-To: Richard.Earnshaw@arm.com Organization: ARM Ltd. X-Telephone: +44 1223 400569 (direct+voicemail), +44 1223 400400 (switchbd) X-Fax: +44 1223 400410 X-Address: ARM Ltd., 110 Fulbourn Road, Cherry Hinton, Cambridge CB1 9NJ. X-Url: http://www.arm.com/ Subject: Re: [patch:arm] Don't use NUM_PSEUDO_REGS in arm_gdbarch_init() In-reply-to: Your message of "Sat, 20 Apr 2002 23:25:29 EDT." <3CC23129.3080700@cygnus.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 22 Apr 2002 04:08:00 -0000 From: Richard Earnshaw X-SW-Source: 2002-04/txt/msg00785.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? /* We can't use SIZEOF_FRAME_SAVED_REGS here, since that still references the old architecture vector, not the one we are building here. */ R.