This is the mail archive of the
gdb-testers@sourceware.org
mailing list for the GDB project.
[binutils-gdb] reggroups: Convert reggroups from post_init to pre_init
- From: sergiodj+buildbot at sergiodj dot net
- To: gdb-testers at sourceware dot org
- Date: Wed, 27 Dec 2017 10:46:25 -0500
- Subject: [binutils-gdb] reggroups: Convert reggroups from post_init to pre_init
- Authentication-results: sourceware.org; auth=none
*** TEST RESULTS FOR COMMIT c1166ca9f3543b28e8b0057ecaf2cd3251cd51c5 ***
Author: Stafford Horne <shorne@gmail.com>
Branch: master
Commit: c1166ca9f3543b28e8b0057ecaf2cd3251cd51c5
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().