diff options
author | Mark Kettenis <kettenis@gnu.org> | 2004-05-22 15:16:22 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@gnu.org> | 2004-05-22 15:16:22 +0000 |
commit | 9ea75c57ced878b09e627ce6c85c7254fd00c647 (patch) | |
tree | 66a92368c0a3d4132b120e920a18288b6680c795 /gdb/regset.c | |
parent | 8f5a3103539e0e5cfab9775dc68aa7e844f50240 (diff) | |
download | gdb-9ea75c57ced878b09e627ce6c85c7254fd00c647.zip gdb-9ea75c57ced878b09e627ce6c85c7254fd00c647.tar.gz gdb-9ea75c57ced878b09e627ce6c85c7254fd00c647.tar.bz2 |
* 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.
Diffstat (limited to 'gdb/regset.c')
-rw-r--r-- | gdb/regset.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/gdb/regset.c b/gdb/regset.c index 7392676..d588b7d 100644 --- a/gdb/regset.c +++ b/gdb/regset.c @@ -1,4 +1,4 @@ -/* Regset support functions, for GDB. +/* Manage register sets. Copyright 2004 Free Software Foundation, Inc. @@ -21,21 +21,26 @@ #include "defs.h" #include "regset.h" + #include "gdb_assert.h" +/* Allocate a fresh 'struct regset' whose supply_regset function is + SUPPLY_REGSET, and whose collect_regset function is COLLECT_REGSET. + If the regset has no collect_regset function, pass NULL for + COLLECT_REGSET. + + The object returned is allocated on ARCH's obstack. */ struct regset * regset_alloc (struct gdbarch *arch, - const void *descr, supply_regset_ftype *supply_regset, collect_regset_ftype *collect_regset) { - struct regset *r - = (struct regset *) gdbarch_obstack_zalloc (arch, sizeof (*r)); + struct regset *regset = GDBARCH_OBSTACK_ZALLOC (arch, struct regset); - r->descr = descr; - r->supply_regset = supply_regset; - r->collect_regset = collect_regset; + regset->arch = arch; + regset->supply_regset = supply_regset; + regset->collect_regset = collect_regset; - return r; + return regset; } |