From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7390 invoked by alias); 4 Jan 2008 10:36:27 -0000 Received: (qmail 7380 invoked by uid 22791); 4 Jan 2008 10:36:26 -0000 X-Spam-Check-By: sourceware.org Received: from mx2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 04 Jan 2008 10:36:06 +0000 Received: from Relay2.suse.de (mail2.suse.de [195.135.221.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id B28E72FB23; Fri, 4 Jan 2008 11:36:03 +0100 (CET) From: Andreas Schwab To: Joel Brobecker Cc: gdb-patches@sourceware.org Subject: Re: [RFA] fix "ptype $pc" internal-error References: <20080104094316.GO2179@adacore.com> X-Yow: I am a traffic light, and Alan Ginsberg kidnapped my laundry in 1927! Date: Fri, 04 Jan 2008 10:36:00 -0000 In-Reply-To: <20080104094316.GO2179@adacore.com> (Joel Brobecker's message of "Fri\, 4 Jan 2008 01\:43\:16 -0800") Message-ID: User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit 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: 2008-01/txt/msg00051.txt.bz2 Joel Brobecker writes: > Index: eval.c > =================================================================== > --- eval.c (revision 65) > +++ eval.c (revision 66) > @@ -512,7 +512,15 @@ evaluate_subexp_standard (struct type *e > name, strlen (name)); > if (regno == -1) > error (_("Register $%s not available."), name); > - if (noside == EVAL_AVOID_SIDE_EFFECTS) > + > + /* In EVAL_AVOID_SIDE_EFFECTS mode, we only need to return > + a value with the appropriate register type. Unfortunately, > + we don't have easy access to the type of user registers. > + So for these registers, we fetch the register value regardless > + of the evaluation mode. */ > + if (noside == EVAL_AVOID_SIDE_EFFECTS > + && regno < gdbarch_num_regs (current_gdbarch) > + + gdbarch_num_pseudo_regs (current_gdbarch)) Indentation is off here. if (noside == EVAL_AVOID_SIDE_EFFECTS && regno < (gdbarch_num_regs (current_gdbarch) + gdbarch_num_pseudo_regs (current_gdbarch))) Andreas. -- Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."