RFA: ``set mips abi''

Andrew Cagney ac131313@cygnus.com
Tue Jun 18 15:26:00 GMT 2002


> 
> If we didn't already have and need the enum all over that file, I'd
> agree with you.  I don't see a point in all the extra globals.  But
> hey, I don't mind.

Yes, I noticed that.  I was thinking of just changing the global_...() 
function to be:

	if (mips_abi == mips_abi_o32)
	  return MIPS_ABI_O32;
	else if (...)
	..
	else
	  internal error()

so that the rest didn't need to be changed.  It is how it has been done 
in the past.

>> (Having an enum mechanism that bound a number to a name would be nice).

> You can do it very easily with designated initializers, but they are
> not adequately portable.  You can do it very easily building the array
> at runtime but why bother?  Keeping two lists in sync is not the most
> complicated thing in the world.

(what's a designated initializer?)

True, if there is a way to do it reliably though.

Andrew




More information about the Gdb-patches mailing list