This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] regcache fix
- From: Andrew Cagney <ac131313 at cygnus dot com>
- To: "Martin M. Hunt" <hunt at redhat dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Wed, 20 Mar 2002 15:41:50 -0500
- Subject: Re: [RFA] regcache fix
- References: <200203200228.g2K2Sri16880@localhost.localdomain>
> Currently build_regcache is called 3 times, once at initialization,
> before any architectures are registered, once when the host is
> registered and once when the target is registered. I don't see
> any reason for the first call, and in some non-multiarched
> targets it can cause core dumps.
(the second time is for bfd's default architecture)
Yep, ok! There is no longer a need to do this, and other similar,
calls. Will make understanding things a little bit easier.
Thanks for testing this on non-multi-arch as well.
--
This change got me thinking again about your other post about
initialization order and a race condition.
You're right, there is one. All the gdbtype info needs to be created
before anything else vis:
o create base architecture
o create gdbtypes from architecture
o initialize everything else (like regcache).
otherwize, as you were seeing with regcache, there isn't that guarentee
that the type info is available.
enjoy,
Andrew