This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: [rfc] ``pc'' -> resume_addr?
- From: Kevin Buettner <kevinb at redhat dot com>
- To: Andrew Cagney <ac131313 at cygnus dot com>, gdb at sources dot redhat dot com
- Date: Thu, 11 Apr 2002 13:58:31 -0700
- Subject: Re: [rfc] ``pc'' -> resume_addr?
- References: <3CB5F437.30607@cygnus.com>
On Apr 11, 4:38pm, Andrew Cagney wrote:
> 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''.
Could you please explain further why you think the name choice was
unfortunate?
> 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.
So, if I understand you correctly, you're suggesting the following
renaming:
PC_REGNUM ==> RESUME_ADDR_REGNUM
frame->pc ==> frame->resume_addr
read_pc() ==> read_resume_addr()
write_pc() ==> write_resume_addr()
Perhaps I've just gotten fond of ``pc'', but I don't really like any
of these.
Kevin