Commit Graph

4 Commits

Author SHA1 Message Date
Mark Kettenis 9ea75c57ce * regset.c: Tweak comment.
(regset_alloc): Remove descr argument.  Use GDBARCH_OBSTACK_ZALLOC
macro.
* regset.h: Update copyright year.
(struct regset): Remove `descr' member, add `gdbarch' member.
(regset_alloc): Adjust prototype and comment.
* i386-tdep.c (i386_supply_gregset): Get TDEP from REGSET->arch.
(i386_supply_fpregset): Likewise.
(i386_regset_from_core_section): Update call to regset_alloc.
* i386obsd-tdep.c (i386obsd_aout_supply_regset): Get TDEP from
REGSET->arch.
(i386obsd_aout_regset_from_core_section): Update call to
regset_alloc.
* i386nbsd-tdep.c (i386nbsd_aout_supply_regset): Get TDEP from
REGSET->arch.
(i386nbsd_aout_regset_from_core_section): Update call to
regset_alloc.
* amd64-tdep.c (amd64_supply_fpregset): Get TDEP from
REGSET->arch.
(amd64_regset_from_core_section): Update call to regset_alloc.
* amd64obsd-tdep.c (amd64obsd_supply_regset): Get TDEP from
REGSET->arch.
(amd64obsd_regset_from_core_section): Update call to regset_alloc.
* sparcnbsd-tdep.c (sparc32nbsd_supply_gregset): Directly pass
&sparc32nbsd_gregset in sparc32_supply_gregset call.
(sparc32nbsd_init_abi): Update call to regset_alloc.
* sparc64obsd-tdep.c (sparc64obsd_supply_gregset): Directly pass
&sparc64obsd_core_gregset in sparc64_supply_gregset call.
(sparc64obsd_init_abi): Update call to regset_alloc.
* sparc64nbsd-tdep.c (sparc64nbsd_supply_gregset): Directly pass
&sparc64nbsd_gregset in sparc64_supply_gregset call.
(sparc64nbsd_init_abi): Update call to regset_alloc.
* sparc64fbsd-tdep.c (sparc64fbsd_supply_gregset): Directly pass
&sparc64fbsd_gregset in sparc64_supply_gregset call.
(sparc64fbsd_init_abi): Update call to regset_alloc.
2004-05-22 15:16:22 +00:00
Jim Blandy 617a4cbacf Allocate regset structures in the gdbarch's obstack, not using
xmalloc.
* regset.c (regset_alloc): Renamed from regset_xmalloc.
Add 'arch' argument.  Allocate the regset on arch's obstack, not
using xmalloc.
* regset.h (regset_alloc): Update declaration.
* am64-tdep.c (amd64_regset_from_core_section): Update call; pass
gdbarch argument.
* amd64obsd-tdep.c (amd64obsd_regset_from_core_section): Same.
* i386-tdep.c (i386_regset_from_core_section): Same.
* i386nbsd-tdep.c (i386nbsd_aout_regset_from_core_section): Same.
* i386obsd-tdep.c (i386obsd_aout_regset_from_core_section): Same.
* sparc64fbsd-tdep.c (sparc64fbsd_init_abi): Same.
* sparc64nbsd-tdep.c (sparc64nbsd_init_abi): Same.
* sparc64obsd-tdep.c (sparc64obsd_init_abi): Same.
* sparcnbsd-tdep.c (sparc32nbsd_init_abi): Same.
2004-05-21 22:15:10 +00:00
Mark Kettenis 144529d0d2 * regset.h: Make prototype const-correct.
* regset.c (regset_xmalloc): Make const-correct.
2004-05-20 17:47:55 +00:00
Jim Blandy be07a590ed Use a constructor function to create regset structures.
* regset.h (supply_regset_ftype, collect_regset_ftype): New typedefs.
(struct regset): Use supply_regset_ftype.  Add new
'collect_regset' member.
(regset_xmalloc): New declaration.
* regset.c: New file.
* am64-tdep.c (amd64_regset_from_core_section): Use
regset_xmalloc to construct regset structures.
* amd64obsd-tdep.c (amd64obsd_regset_from_core_section): Same.
* i386-tdep.c (i386_regset_from_core_section): Same.
* i386nbsd-tdep.c (i386nbsd_aout_regset_from_core_section): Same.
* i386obsd-tdep.c (i386obsd_aout_regset_from_core_section): Same.
* sparc64fbsd-tdep.c (sparc64fbsd_init_abi): Same.
* sparc64nbsd-tdep.c (sparc64nbsd_init_abi): Same.
* sparc64obsd-tdep.c (sparc64obsd_init_abi): Same.
* sparcnbsd-tdep.c (sparc32nbsd_init_abi): Same.
* Makefile.in (COMMON_OBS): Add regset.o.
(regset.o): New rule.
2004-05-20 00:53:06 +00:00