This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: stupify MAX_REGISTER_{RAW,VIRTUAL}_SIZE
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: Andrew Cagney <ac131313 at redhat dot com>
- Cc: gdb at sources dot redhat dot com
- Date: Tue, 1 Apr 2003 19:20:38 -0500
- Subject: Re: stupify MAX_REGISTER_{RAW,VIRTUAL}_SIZE
- References: <3E8A2B34.3080504@redhat.com>
On Tue, Apr 01, 2003 at 07:13:40PM -0500, Andrew Cagney wrote:
> Hmm,
>
> The architecture vector contains the two macros:
>
> MAX_REGISTER_RAW_SIZE
> MAX_REGISTER_VIRTUAL_SIZE
>
> which provide small per-architecture upper bounds on a register. They
> are used when allocating scratch buffers (typically using alloca()).
> The regcache provides a successor - max_register_size().
>
> I'm now wondering if it would be easier to simply define:
>
> enum { MAX_REGISTER_SIZE = 16 };
>
> and then, if that ever proves to be too small, make it bigger. Just as
> long as no one creates an architecture with >~2k registers ....
Entirely in favor!
I've got a port which supports 20, and we'll probably be seeing 32 in
new platforms soon - but I don't think using a constant will get out of
hand for a long time.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer