This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [SH] regs command
On Wed, 16 May 2012, Joel Brobecker wrote:
> > This means you registered "regs" before the thing it aliases was
> > registered. This can happen because _initialize_xxx order is not
> > defined.
> >
> > There's no easy fix :(. You could move "regs" initialization to a
> > better spot but then it will be visible in all builds of gdb, not just
> > those with this target compiled in.
>
> It seems better in that case to just go with what Thomas had initially,
> maybe just adding a comment why we don't use an alias? It's only for
> a few weeks...
I think a fix is actually very easy. All that has to be done is to tweak
the init.c scriptery such that *_tdep initialisers are run last. And
actually I think it is worth the while regardless of this particular issue
as this way all the target-dependent bits can rely on generic stuff to
have been initialised.
Of course tweaking the scriptery can be horribly boring, but there you
go. I'll see if I can give it a shot -- unless anyone beats me to it.
Maciej