Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@cygnus.com>
To: Andrew Cagney <ac131313@cygnus.com>
Cc: gdb@sources.redhat.com
Subject: Re: [rfc] ``pc'' -> resume_addr?
Date: Fri, 26 Apr 2002 08:09:00 -0000	[thread overview]
Message-ID: <3CC96DB9.9060504@cygnus.com> (raw)
In-Reply-To: <3CB5F437.30607@cygnus.com>

> Hello,
> 
> GDB, in a number of places, refers to the ``pc'' - PC_REGNUM, frame->pc,  read_pc(), write_pc(), ...
> 
> I think this name choice was unfortunate.  It is too easy for a developer to confuse ``pc'' with the hardware ``pc''.
> 
> With this in mind, I'd like to propose a GDBspeak ``resume_addr''.  It is the address of the first instruction that will be executed when the target resumes.
> 
> thoughts?  better names?
> Andrew 

To follow this up.  My take on this is:

The real culprit is DECR_PC_AFTER_BREAK.  That needs to be eliminated. 
If that goes, much of the PC confusion will go with it.  Me trying to 
rename ->pc is like applying window dressing :-)

Secondary to this, there is read_pc() vs PC_REGNUM. (At the risk of 
starting another debate :-) Perhaphs, I should rename PC_REGNUM to 
HW_PC_REGNUM (same for FP and SP and PSW). That way it is clear that 
these regnum's can only map onto hardware registers.

enjoy,
Andrew


      parent reply	other threads:[~2002-04-26 15:09 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-11 13:38 Andrew Cagney
2002-04-11 13:58 ` Kevin Buettner
2002-04-11 15:15   ` Andrew Cagney
2002-04-11 16:35     ` Andrew Cagney
2002-04-11 16:48       ` Kevin Buettner
2002-04-11 17:08         ` Andrew Cagney
2002-04-11 17:37       ` Michael Snyder
2002-04-11 16:42     ` Kevin Buettner
2002-04-11 17:39       ` Michael Snyder
2002-04-11 17:34     ` Michael Snyder
2002-04-12  8:59       ` Andrew Cagney
2002-04-13 20:21         ` Andrew Cagney
2002-04-11 17:25 ` Michael Snyder
2002-04-26  8:09 ` Andrew Cagney [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3CC96DB9.9060504@cygnus.com \
    --to=ac131313@cygnus.com \
    --cc=gdb@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox