diff options
Diffstat (limited to 'gdb/target-descriptions.c')
-rw-r--r-- | gdb/target-descriptions.c | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/gdb/target-descriptions.c b/gdb/target-descriptions.c index 88cc7e0442d..024257b7340 100644 --- a/gdb/target-descriptions.c +++ b/gdb/target-descriptions.c @@ -633,6 +633,21 @@ tdesc_numbered_register (const struct tdesc_feature *feature, return 1; } +/* Search FEATURE for a register named NAME, but do not assign a fixed + register number to it. */ + +int +tdesc_unnumbered_register (const struct tdesc_feature *feature, + const char *name) +{ + struct tdesc_reg *reg = tdesc_find_register_early (feature, name); + + if (reg == NULL) + return 0; + + return 1; +} + /* Search FEATURE for a register whose name is in NAMES and assign REGNO to it. */ @@ -708,7 +723,7 @@ tdesc_register_name (struct gdbarch *gdbarch, int regno) return ""; } -static struct type * +struct type * tdesc_register_type (struct gdbarch *gdbarch, int regno) { struct tdesc_arch_reg *arch_reg = tdesc_find_arch_register (gdbarch, regno); @@ -856,8 +871,9 @@ tdesc_register_reggroup_p (struct gdbarch *gdbarch, int regno, if (regno >= num_regs && regno < num_regs + num_pseudo_regs) { struct tdesc_arch_data *data = gdbarch_data (gdbarch, tdesc_data); - gdb_assert (data->pseudo_register_reggroup_p != NULL); - return data->pseudo_register_reggroup_p (gdbarch, regno, reggroup); + if (data->pseudo_register_reggroup_p != NULL) + return data->pseudo_register_reggroup_p (gdbarch, regno, reggroup); + /* Otherwise fall through to the default reggroup_p. */ } ret = tdesc_register_in_reggroup_p (gdbarch, regno, reggroup); |