This functionality is now provided by regcache register tags.
{
}
-/* See arch-utils.h. */
-bool
-default_register_has_tag (struct gdbarch *gdbarch,
- readable_regcache *regcache,
- int cookednum)
-{
- return false;
-}
-
-/* See arch-utils.h. */
-bool
-default_register_tag (struct gdbarch *gdbarch,
- readable_regcache *regcache,
- int cookednum)
-{
- return false;
-}
-
-/* See arch-utils.h. */
-void
-default_register_set_tag (struct gdbarch *gdbarch,
- regcache *regcache,
- int cookednum, bool tag)
-{
- return;
-}
-
/* See arch-utils.h. */
bool default_get_cap_tag_from_address (struct gdbarch *gdbarch,
CORE_ADDR addr)
read_core_file_mappings_pre_loop_ftype pre_loop_cb,
read_core_file_mappings_loop_ftype loop_cb);
-/* Default implementation of gdbarch_register_has_tag. */
-extern bool default_register_has_tag (struct gdbarch *gdbarch,
- readable_regcache *regcache,
- int cookednum);
-
-/* Default implementation of gdbarch_register_tag. */
-extern bool default_register_tag (struct gdbarch *gdbarch,
- readable_regcache *regcache,
- int cookednum);
-
-/* Default implementation of gdbarch_register_set_tag. */
-extern void default_register_set_tag (struct gdbarch *gdbarch,
- regcache *regcache,
- int cookednum, bool tag);
-
/* Default implementation of gdbarch_cap_tag_from_address. */
extern bool default_get_cap_tag_from_address (struct gdbarch *gdbarch,
CORE_ADDR addr);
&& TYPE_CAPABILITY (val_type)))
&& value_tagged (fromval))
{
- gdbarch_register_set_tag (gdbarch, get_current_regcache (),
- regnum, value_tag (fromval));
+ get_current_regcache ()->raw_supply_tag (realnum,
+ value_tag (fromval));
}
}
break;
predefault="default_read_core_file_mappings",
invalid=False,
)
-
-Method(
- comment="""
-Returns true if register COOKEDNUM has a tag and false otherwise.
-The default is to always return false.
-""",
- type="bool",
- name="register_has_tag",
- params=[
- ("readable_regcache *", "regcache"),
- ("int", "cookednum"),
- ],
- predefault="default_register_has_tag",
- invalid=False,
-)
-
-Method(
- comment="""
-Returns true if the register tag bit is 1 and false otherwise.
-The default is to always return false.
-""",
- type="bool",
- name="register_tag",
- params=[
- ("readable_regcache *", "regcache"),
- ("int", "cookednum"),
- ],
- predefault="default_register_tag",
- invalid=False,
-)
-
-Method(
- comment="""
-Sets the register tag to TAG.
-""",
- type="void",
- name="register_set_tag",
- params=[
- ("regcache *", "regcache"),
- ("int", "cookednum"),
- ("bool", "tag"),
- ],
- predefault="default_register_set_tag",
- invalid=False,
-)
typedef void (gdbarch_read_core_file_mappings_ftype) (struct gdbarch *gdbarch, struct bfd *cbfd, read_core_file_mappings_pre_loop_ftype pre_loop_cb, read_core_file_mappings_loop_ftype loop_cb);
extern void gdbarch_read_core_file_mappings (struct gdbarch *gdbarch, struct bfd *cbfd, read_core_file_mappings_pre_loop_ftype pre_loop_cb, read_core_file_mappings_loop_ftype loop_cb);
extern void set_gdbarch_read_core_file_mappings (struct gdbarch *gdbarch, gdbarch_read_core_file_mappings_ftype *read_core_file_mappings);
-
-/* Returns true if register COOKEDNUM has a tag and false otherwise.
- The default is to always return false. */
-
-typedef bool (gdbarch_register_has_tag_ftype) (struct gdbarch *gdbarch, readable_regcache *regcache, int cookednum);
-extern bool gdbarch_register_has_tag (struct gdbarch *gdbarch, readable_regcache *regcache, int cookednum);
-extern void set_gdbarch_register_has_tag (struct gdbarch *gdbarch, gdbarch_register_has_tag_ftype *register_has_tag);
-
-/* Returns true if the register tag bit is 1 and false otherwise.
- The default is to always return false. */
-
-typedef bool (gdbarch_register_tag_ftype) (struct gdbarch *gdbarch, readable_regcache *regcache, int cookednum);
-extern bool gdbarch_register_tag (struct gdbarch *gdbarch, readable_regcache *regcache, int cookednum);
-extern void set_gdbarch_register_tag (struct gdbarch *gdbarch, gdbarch_register_tag_ftype *register_tag);
-
-/* Sets the register tag to TAG. */
-
-typedef void (gdbarch_register_set_tag_ftype) (struct gdbarch *gdbarch, regcache *regcache, int cookednum, bool tag);
-extern void gdbarch_register_set_tag (struct gdbarch *gdbarch, regcache *regcache, int cookednum, bool tag);
-extern void set_gdbarch_register_set_tag (struct gdbarch *gdbarch, gdbarch_register_set_tag_ftype *register_set_tag);
gdbarch_type_align_ftype *type_align;
gdbarch_get_pc_address_flags_ftype *get_pc_address_flags;
gdbarch_read_core_file_mappings_ftype *read_core_file_mappings;
- gdbarch_register_has_tag_ftype *register_has_tag;
- gdbarch_register_tag_ftype *register_tag;
- gdbarch_register_set_tag_ftype *register_set_tag;
};
/* Create a new ``struct gdbarch'' based on information provided by
gdbarch->type_align = default_type_align;
gdbarch->get_pc_address_flags = default_get_pc_address_flags;
gdbarch->read_core_file_mappings = default_read_core_file_mappings;
- gdbarch->register_has_tag = default_register_has_tag;
- gdbarch->register_tag = default_register_tag;
- gdbarch->register_set_tag = default_register_set_tag;
/* gdbarch_alloc() */
return gdbarch;
/* Skip verify of type_align, invalid_p == 0 */
/* Skip verify of get_pc_address_flags, invalid_p == 0 */
/* Skip verify of read_core_file_mappings, invalid_p == 0 */
- /* Skip verify of register_has_tag, invalid_p == 0 */
- /* Skip verify of register_tag, invalid_p == 0 */
- /* Skip verify of register_set_tag, invalid_p == 0 */
if (!log.empty ())
internal_error (__FILE__, __LINE__,
_("verify_gdbarch: the following are invalid ...%s"),
fprintf_filtered (file,
"gdbarch_dump: read_core_file_mappings = <%s>\n",
host_address_to_string (gdbarch->read_core_file_mappings));
- fprintf_filtered (file,
- "gdbarch_dump: register_has_tag = <%s>\n",
- host_address_to_string (gdbarch->register_has_tag));
- fprintf_filtered (file,
- "gdbarch_dump: register_tag = <%s>\n",
- host_address_to_string (gdbarch->register_tag));
- fprintf_filtered (file,
- "gdbarch_dump: register_set_tag = <%s>\n",
- host_address_to_string (gdbarch->register_set_tag));
if (gdbarch->dump_tdep != NULL)
gdbarch->dump_tdep (gdbarch, file);
}
{
gdbarch->read_core_file_mappings = read_core_file_mappings;
}
-
-bool
-gdbarch_register_has_tag (struct gdbarch *gdbarch, readable_regcache *regcache, int cookednum)
-{
- gdb_assert (gdbarch != NULL);
- gdb_assert (gdbarch->register_has_tag != NULL);
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_register_has_tag called\n");
- return gdbarch->register_has_tag (gdbarch, regcache, cookednum);
-}
-
-void
-set_gdbarch_register_has_tag (struct gdbarch *gdbarch,
- gdbarch_register_has_tag_ftype register_has_tag)
-{
- gdbarch->register_has_tag = register_has_tag;
-}
-
-bool
-gdbarch_register_tag (struct gdbarch *gdbarch, readable_regcache *regcache, int cookednum)
-{
- gdb_assert (gdbarch != NULL);
- gdb_assert (gdbarch->register_tag != NULL);
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_register_tag called\n");
- return gdbarch->register_tag (gdbarch, regcache, cookednum);
-}
-
-void
-set_gdbarch_register_tag (struct gdbarch *gdbarch,
- gdbarch_register_tag_ftype register_tag)
-{
- gdbarch->register_tag = register_tag;
-}
-
-void
-gdbarch_register_set_tag (struct gdbarch *gdbarch, regcache *regcache, int cookednum, bool tag)
-{
- gdb_assert (gdbarch != NULL);
- gdb_assert (gdbarch->register_set_tag != NULL);
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_register_set_tag called\n");
- gdbarch->register_set_tag (gdbarch, regcache, cookednum, tag);
-}
-
-void
-set_gdbarch_register_set_tag (struct gdbarch *gdbarch,
- gdbarch_register_set_tag_ftype register_set_tag)
-{
- gdbarch->register_set_tag = register_set_tag;
-}