From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21523 invoked by alias); 21 Jun 2002 20:24:09 -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 21506 invoked from network); 21 Jun 2002 20:24:06 -0000 Received: from unknown (HELO localhost.redhat.com) (216.138.202.10) by sources.redhat.com with SMTP; 21 Jun 2002 20:24:06 -0000 Received: from cygnus.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 4CB9B3D66; Fri, 21 Jun 2002 16:24:05 -0400 (EDT) Message-ID: <3D138B65.8070401@cygnus.com> Date: Fri, 21 Jun 2002 13:24:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.0) Gecko/20020613 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jim Blandy Cc: Joel Brobecker , gdb-patches@sources.redhat.com Subject: Re: [RFA] block_innermost_frame tweak References: <20020620131440.M397@gnat.com> <3D126D8A.9020908@cygnus.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-06/txt/msg00438.txt.bz2 > Andrew Cagney writes: > >> Is there a better name? As you note, it isn't a valid PC (it may not >> even point into an instruction!). Further, it is isn't the address of >> the instruction ``calling'' the ``frame''. Last time this came up >> address_in_block() was used - frame_address_in_block()? > > > I don't disagree with your objections (raised in a previous > discussion) that `frame->pc - 1' isn't a proper PC. It may never have > been the value of the PC register (if indeed the architecture has a > register named `PC'); it doesn't even necessarily point to an > instruction. > > That said, I feel that replacing "PC" with just "address" actually > makes matters worse, not better. It's very helpful to see at a glance > that a particular CORE_ADDR value is a pointer into the instruction > stream. The exact semantics of the value --- is this the return > address or the address of the call? do we need to apply > DECR_PC_AFTER_BREAK? and so on --- is something that one uncovers > when one researches the value more carefully, as with anything else. Except for a small window in WFI, a ``PC'' refers to the address of the instruction that will be executed next. It is just unfortunate that no one has found the time to zap DECR_PC_AFTER_BREAK and hence eliminate that small window. Please don't add to this confusion. > But if I'm the only one who has this reaction, then I don't mind the > renaming. > > Is there some third terse term that indicates (or could indicate, by > establishing a convention) "pointer into the instruction stream that > isn't necessarily an instruction address or the value of a register"? The reason for suggesting ``block'' was that it hopefully implies a code block. frame_address_within_code_block()? enjoy, Andrew