From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26307 invoked by alias); 12 Apr 2002 00:39:54 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 26300 invoked from network); 12 Apr 2002 00:39:52 -0000 Received: from unknown (HELO cygnus.com) (205.180.230.5) by sources.redhat.com with SMTP; 12 Apr 2002 00:39:52 -0000 Received: from redhat.com (reddwarf.sfbay.redhat.com [172.16.24.50]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id RAA23133; Thu, 11 Apr 2002 17:39:50 -0700 (PDT) Message-ID: <3CB62A0B.AFA5623B@redhat.com> Date: Thu, 11 Apr 2002 17:39:00 -0000 From: Michael Snyder Organization: Red Hat, Inc. X-Accept-Language: en MIME-Version: 1.0 To: Kevin Buettner CC: Andrew Cagney , gdb@sources.redhat.com Subject: Re: [rfc] ``pc'' -> resume_addr? References: <3CB5F437.30607@cygnus.com> <1020411205831.ZM3555@localhost.localdomain> <3CB60B21.10407@cygnus.com> <1020411234158.ZM4406@localhost.localdomain> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2002-04/txt/msg00198.txt.bz2 Kevin Buettner wrote: > > On Apr 11, 6:16pm, Andrew Cagney wrote: > > > >> I think this name choice was unfortunate. It is too easy for a > > >> developer to confuse ``pc'' with the hardware ``pc''. > > > > > > Could you please explain further why you think the name choice was > > > unfortunate? > > > > I think the name ``pc'' brings with it a certain amount of baggage. > > When reading a piece of code, it isn't clear if the hardware ``pc'' > > (possibly needing adjustment) or the program's resume address is being used. > > Is there really that much confusion about this though? I think that > the length of time during which this confusion exists is mercifully > brief. AFAICT, gdb's notion of the pc is adjusted shortly after > stopping via a call to bpstat_stop_status() and from then on, the pc > value is simply the continuation (or resume) address. Even the "PC" > value in the register cache has been adjusted to be the program's > resume address at this point. And since the register cache is write-thru, so has the child's PC register.