This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: RFA: relax restrictions on per-architecture data registration
> 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