reggroups: Convert reggroups from post_init to pre_init
Currently the reggroups gdbarch_data cannot be manipulated until after
the gdbarch is completely initialized. This is usually done when the
object init depends on architecture specific fields. In the case of
reggroups it only depends on the obstack being available.
Coverting this to pre_init allows using reggroups during gdbarch
initialization. This is needed to allow registering arbitrary reggroups
during gdbarch initializations.
gdb/ChangeLog:
yyyy-mm-dd Stafford Horne <shorne@gmail.com>
* reggroups.c (reggroups_init): Change to depend only on
obstack rather than gdbarch.
(reggroup_add): Remove logic for forcing premature init.
(_initialize_reggroup): Set `reggroups_data` with
gdbarch_data_register_pre_init() rather than
gdbarch_data_register_post_init().