GDB (xrefs)

/tmp/gdb-8.1/gdb/reggroups.h
Go to the documentation of this file.
1 /* Register groupings for GDB, the GNU debugger.
2
3 Copyright (C) 2002-2018 Free Software Foundation, Inc.
4
5 Contributed by Red Hat.
6
7 This file is part of GDB.
8
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 3 of the License, or
12 (at your option) any later version.
13
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with this program. If not, see <http://www.gnu.org/licenses/>. */
21
22 #ifndef REGGROUPS_H
23 #define REGGROUPS_H
24
25 struct gdbarch;
26 struct reggroup;
27
28 enum reggroup_type { USER_REGGROUP, INTERNAL_REGGROUP };
29
30 /* Pre-defined, user visible, register groups. */
31 extern struct reggroup *const general_reggroup;
32 extern struct reggroup *const float_reggroup;
33 extern struct reggroup *const system_reggroup;
34 extern struct reggroup *const vector_reggroup;
35 extern struct reggroup *const all_reggroup;
36
37 /* Pre-defined, internal, register groups. */
38 extern struct reggroup *const save_reggroup;
39 extern struct reggroup *const restore_reggroup;
40
41 /* Create a new local register group. */
42 extern struct reggroup *reggroup_new (const char *name,
43 enum reggroup_type type);
44 /* Create a new register group allocated onto the gdbarch obstack. */
45 extern struct reggroup *reggroup_gdbarch_new (struct gdbarch *gdbarch,
46 const char *name,
47 enum reggroup_type type);
48
49 /* Add a register group (with attribute values) to the pre-defined list. */
50 extern void reggroup_add (struct gdbarch *gdbarch, struct reggroup *group);
51
52 /* Register group attributes. */
53 extern const char *reggroup_name (struct reggroup *reggroup);
54 extern enum reggroup_type reggroup_type (struct reggroup *reggroup);
55
56 /* Iterators for the architecture's register groups. Pass in NULL, returns
57 the first (for next), or last (for prev) group. Pass in a group,
58 returns the next or previous group, or NULL when either the end or the
59 beginning of the group list is reached. */
60 extern struct reggroup *reggroup_next (struct gdbarch *gdbarch,
61 struct reggroup *last);
62 extern struct reggroup *reggroup_prev (struct gdbarch *gdbarch,
63 struct reggroup *curr);
64 /* Find a reggroup by name. */
65 extern reggroup *reggroup_find (struct gdbarch *gdbarch, const char *name);
66
67 /* Is REGNUM a member of REGGROUP? */
68 extern int default_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
69 struct reggroup *reggroup);
70
71 #endif
gdbarch
Definition: gdbarch.c:127
save_reggroup
struct reggroup *const save_reggroup
Definition: reggroups.c:319
float_reggroup
struct reggroup *const float_reggroup
Definition: reggroups.c:315
all_reggroup
struct reggroup *const all_reggroup
Definition: reggroups.c:318
reggroup_new
struct reggroup * reggroup_new(const char *name, enum reggroup_type type)
Definition: reggroups.c:40
default_register_reggroup_p
int default_register_reggroup_p(struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup)
Definition: reggroups.c:192
reggroup_gdbarch_new
struct reggroup * reggroup_gdbarch_new(struct gdbarch *gdbarch, const char *name, enum reggroup_type type)
Definition: reggroups.c:52
reggroup_next
struct reggroup * reggroup_next(struct gdbarch *gdbarch, struct reggroup *last)
Definition: reggroups.c:133
reggroup
Definition: reggroups.c:33
system_reggroup
struct reggroup *const system_reggroup
Definition: reggroups.c:316
general_reggroup
struct reggroup *const general_reggroup
Definition: reggroups.c:314
name
const char *const name
Definition: aarch64-tdep.c:76
vector_reggroup
struct reggroup *const vector_reggroup
Definition: reggroups.c:317
reggroup_prev
struct reggroup * reggroup_prev(struct gdbarch *gdbarch, struct reggroup *curr)
Definition: reggroups.c:164
reggroup_type
reggroup_type
Definition: reggroups.h:28
restore_reggroup
struct reggroup *const restore_reggroup
Definition: reggroups.c:320
type
Definition: gdbtypes.h:749
reggroup_find
reggroup * reggroup_find(struct gdbarch *gdbarch, const char *name)
Definition: reggroups.c:221
USER_REGGROUP
Definition: reggroups.h:28
regnum
int regnum
Definition: aarch64-tdep.c:77
INTERNAL_REGGROUP
Definition: reggroups.h:28
reggroup_name
const char * reggroup_name(struct reggroup *reggroup)
Definition: reggroups.c:66
reggroup_add
void reggroup_add(struct gdbarch *gdbarch, struct reggroup *group)
Definition: reggroups.c:117