From: "Maciej W. Rozycki" <macro@codesourcery.com>
To: Joel Brobecker <brobecker@adacore.com>,
Thomas Schwinge <thomas@codesourcery.com>
Cc: Tom Tromey <tromey@redhat.com>, <gdb-patches@sourceware.org>,
Kevin Buettner <kevinb@redhat.com>
Subject: Re: [SH] regs command
Date: Thu, 17 May 2012 00:59:00 -0000 [thread overview]
Message-ID: <alpine.DEB.1.10.1205170145070.11227@tp.orcam.me.uk> (raw)
In-Reply-To: <alpine.DEB.1.10.1205162033380.11227@tp.orcam.me.uk>
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.
Thomas, can you give it a shot and see if this fixes your alias issue?
I'll add some commentary if this works for you and gets a go-ahead.
2012-05-17 Maciej W. Rozycki <macro@codesourcery.com>
gdb/
* Makefile.in (init.c): Reorder *_tdep initialisers to the end.
Maciej
gdb-init-tdep.diff
Index: gdb-fsf-trunk-quilt/gdb/Makefile.in
===================================================================
--- gdb-fsf-trunk-quilt.orig/gdb/Makefile.in 2012-05-17 01:08:19.000000000 +0100
+++ gdb-fsf-trunk-quilt/gdb/Makefile.in 2012-05-17 01:43:27.325562969 +0100
@@ -1121,6 +1121,12 @@ init.c: $(INIT_FILES)
while read f; do \
sed -n -e 's/^_initialize_\([a-z_0-9A-Z]*\).*/\1/p' $$f 2>/dev/null; \
done | \
+ sed -n \
+ -e '/_tdep$$/H' \
+ -e '//!p' \
+ -e '$$x' \
+ -e '$$s/\n//' \
+ -e '$$p' | \
while read f; do \
case " $$fs " in \
*" $$f "* ) ;; \
next prev parent reply other threads:[~2012-05-17 0:59 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-16 13:56 Thomas Schwinge
2012-05-16 14:26 ` Joel Brobecker
2012-05-16 16:32 ` Thomas Schwinge
2012-05-16 16:58 ` Joel Brobecker
2012-05-16 17:21 ` Thomas Schwinge
2012-05-16 18:47 ` Tom Tromey
2012-05-16 19:06 ` Joel Brobecker
2012-05-16 19:38 ` Maciej W. Rozycki
2012-05-17 0:59 ` Maciej W. Rozycki [this message]
2012-05-17 11:10 ` Mark Kettenis
2012-05-17 11:23 ` Maciej W. Rozycki
2012-05-17 12:38 ` Joel Brobecker
2012-05-17 15:23 ` Mark Kettenis
2012-05-17 15:45 ` Joel Brobecker
2012-05-17 19:52 ` Tom Tromey
2012-05-17 20:38 ` Joel Brobecker
2012-05-18 12:23 ` Maciej W. Rozycki
2012-05-18 12:39 ` Pedro Alves
2012-05-18 12:49 ` Joel Brobecker
2012-05-18 13:33 ` Pedro Alves
2012-05-18 13:47 ` Tom Tromey
2012-05-21 23:36 ` Maciej W. Rozycki
2012-05-24 18:05 ` Tom Tromey
2012-05-17 19:32 ` Kevin Buettner
2012-05-16 18:36 ` Tom Tromey
2012-05-16 18:36 ` Pedro Alves
2012-05-16 19:36 ` Eli Zaretskii
2012-06-06 18:10 ` Thomas Schwinge
2012-08-10 9:22 ` Thomas Schwinge
2012-08-10 16:20 ` Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.1.10.1205170145070.11227@tp.orcam.me.uk \
--to=macro@codesourcery.com \
--cc=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=kevinb@redhat.com \
--cc=thomas@codesourcery.com \
--cc=tromey@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox