This is the mail archive of the gdb-patches@sources.redhat.com 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: [RFA] regcache fix


> 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



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