This is the mail archive of the
mailing list for the GDB project.
Re: [rfc] ``pc'' -> resume_addr?
- From: Andrew Cagney <ac131313 at cygnus dot com>
- To: Andrew Cagney <ac131313 at cygnus dot com>
- Cc: gdb at sources dot redhat dot com
- Date: Fri, 26 Apr 2002 11:09:45 -0400
- Subject: Re: [rfc] ``pc'' -> resume_addr?
- References: <3CB5F437.firstname.lastname@example.org>
> 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?
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.