summaryrefslogtreecommitdiff
path: root/gdb/regset.h
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2004-05-22 15:16:22 +0000
committerMark Kettenis <kettenis@gnu.org>2004-05-22 15:16:22 +0000
commit9ce31f43119b8020e4d905f0f98006beaf1627d2 (patch)
tree431aa958def22349a56f30ca0d8eecdf4b31de29 /gdb/regset.h
parentd68e89fee73bb29bcd9176b4c42d04cb97134902 (diff)
downloadgdb-9ce31f43119b8020e4d905f0f98006beaf1627d2.tar.gz
* 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.h')
-rw-r--r--gdb/regset.h17
1 files changed, 8 insertions, 9 deletions
diff --git a/gdb/regset.h b/gdb/regset.h
index e64c48bc0e1..48ad32d6838 100644
--- a/gdb/regset.h
+++ b/gdb/regset.h
@@ -1,6 +1,6 @@
/* Manage register sets.
- Copyright 2003 Free Software Foundation, Inc.
+ Copyright 2003, 2004 Free Software Foundation, Inc.
This file is part of GDB.
@@ -26,6 +26,7 @@ struct gdbarch;
struct regcache;
/* Data structure describing a register set. */
+
typedef void (supply_regset_ftype) (const struct regset *, struct regcache *,
int, const void *, size_t);
typedef void (collect_regset_ftype) (const struct regset *,
@@ -36,7 +37,7 @@ struct regset
{
/* Data pointer for private use by the methods below, presumably
providing some sort of description of the register set. */
- const void *descr;
+ struct gdbarch *arch;
/* Function supplying values in a register set to a register cache. */
supply_regset_ftype *supply_regset;
@@ -45,17 +46,15 @@ struct regset
collect_regset_ftype *collect_regset;
};
-
-/* Allocate a fresh 'struct regset' whose descr is DESCR, whose
- supply_regset function is SUPPLY_REGSET, and whose collect_regset
- function is COLLECT_REGSET. If the regset has no collect function,
- pass NULL for COLLECT_REGSET.
+/* 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. */
+
extern struct regset *regset_alloc (struct gdbarch *arch,
- const void *descr,
supply_regset_ftype *supply_regset,
collect_regset_ftype *collect_regset);
-
#endif /* regset.h */