Re: [WIP/RFC] MIPS registers overhaul

Kevin Buettner
2003-05-15T22:01:07Z

On May 14, 3:00pm, Kevin Buettner wrote:

> I'll adopt the following naming scheme:
>
> rawnums - for code which uses and should continue to use raw numbers
> cookednums - for code which uses and should continue to use cooked
> numbers
> regnums - for one of two cases, either code that's currently using
> raw numbers that should be converted to be cooked, or
> for code which I'm unsure of. (Either case, these'll
> be raw numbers. When someone converts the code or decides
> that the "raw" usage is correct, the name should be
> changed.)
>
> For the last category, I'm open to suggestions for some other name.

I've decided I don't like the name "regnums" that well for the last
category. I've settled on the name "rawnums_c" instead. The "_c"
suffix indicates that they *should* be cooked. (Yes, it's terse, but I
fear that anything longer will make the code unwieldy.) I'll also put
in a comment at each ``rawnums_c'' initialization indicating that the
code needs to be converted at some point to use cooked register
numbers. E.g.:

/* This function needs to be converted to use cooked register numbers. */
const struct mips_regnums *rawnums_c = mips_raw_regnums (gdbarch);

Kevin