This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [SH] regs command

> Date: Thu, 17 May 2012 01:59:29 +0100
> From: "Maciej W. Rozycki" <>
> On Wed, 16 May 2012, Maciej W. Rozycki 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.
>  So here it is, this change moves *_tdep initialisers to the end while 
> otherwise keeping the order the same (IOW within the two groups the order 
> remains the same as before).  I've checked it against autoconf's tool
> portability list and also verified it with Solaris sed to make sure 
> there are no surprises.

Sorry, but we've always considered it a mistake to rely on a specific
order of running the initialization functions.  Implicit dependencies
between modules like that really are a bad idea.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]