Use a constructor function to create regset structures.
authorJim Blandy <jimb@codesourcery.com>
Thu, 20 May 2004 00:53:06 +0000 (00:53 +0000)
committerJim Blandy <jimb@codesourcery.com>
Thu, 20 May 2004 00:53:06 +0000 (00:53 +0000)
commitbe07a590ed0a975673fb86e13d07362ff930c750
tree45203347f4831ce8f5b982aaaa4174eb971ccd92
parente14ad0e71ad3ddfb0b603ef48b28f530c49024e7
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.
13 files changed:
gdb/ChangeLog
gdb/Makefile.in
gdb/amd64-tdep.c
gdb/amd64obsd-tdep.c
gdb/i386-tdep.c
gdb/i386nbsd-tdep.c
gdb/i386obsd-tdep.c
gdb/regset.c [new file with mode: 0644]
gdb/regset.h
gdb/sparc64fbsd-tdep.c
gdb/sparc64nbsd-tdep.c
gdb/sparc64obsd-tdep.c
gdb/sparcnbsd-tdep.c