RFA: relax restrictions on per-architecture data registration

Andrew Cagney ac131313@cygnus.com
Wed Jun 6 09:35:00 GMT 2001


> Okay.  My first patch was exactly that, but then I felt like I was
> assuming that all per-architecture data would be registered by the
> time initialization was done, which wasn't a documented requirement in
> gdbarch.h.  So I made it more dynamic.


Ah.

My e-mail actually contained a white lie.  At present it really does:

	o	compile in a static dummy architecture and
		wire things to use that

	o	call _initialize_*()

	o	create the real architecture

the first step, a hack, is to get around a chicken/egg problem with the 
current GDB code.  gdbtypes.[hc] assumes that there is an architecture 
_before_ anything has been initialized (ulgh).

As usual, the long term objective is to eliminate the hack :-)  Tweeking 
the ``create the real architecture'' code to create the data vector in 
both the multi-arch and non-multi-arch cases will actually take this a 
step closer - chunks of GDB can be rewritten to just use the 
register_gdbarch_data() mechanism.

I'll add a comment to top.c / gdbint.texinfo to explain this.

	Andrew



More information about the Gdb-patches mailing list