1 /* Manage register sets.
3 Copyright (C) 2003, 2004, 2007, 2008, 2009, 2010, 2011
4 Free Software Foundation, Inc.
6 This file is part of GDB.
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 3 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <http://www.gnu.org/licenses/>. */
27 /* Data structure for the supported register notes in a core file. */
28 struct core_regset_section
30 const char *sect_name;
32 const char *human_name;
35 /* Data structure describing a register set. */
37 typedef void (supply_regset_ftype) (const struct regset *, struct regcache *,
38 int, const void *, size_t);
39 typedef void (collect_regset_ftype) (const struct regset *,
40 const struct regcache *,
45 /* Data pointer for private use by the methods below, presumably
46 providing some sort of description of the register set. */
49 /* Function supplying values in a register set to a register cache. */
50 supply_regset_ftype *supply_regset;
52 /* Function collecting values in a register set from a register cache. */
53 collect_regset_ftype *collect_regset;
55 /* Architecture associated with the register set. */
59 /* Allocate a fresh 'struct regset' whose supply_regset function is
60 SUPPLY_REGSET, and whose collect_regset function is COLLECT_REGSET.
61 If the regset has no collect_regset function, pass NULL for
64 The object returned is allocated on ARCH's obstack. */
66 extern struct regset *regset_alloc (struct gdbarch *arch,
67 supply_regset_ftype *supply_regset,
68 collect_regset_ftype *collect_regset);