/* Default implementation of gdbarch_set_cap_tag_from_address. */
extern void default_set_cap_tag_from_address (struct gdbarch *gdbarch,
CORE_ADDR addr, bool tag);
+
+/* Default implementation of gdbarch_print_cap_attributes. */
+extern void default_print_cap (struct gdbarch *gdbarch,
+ const gdb_byte *contents, bool tag, bool compact,
+ struct ui_file *stream);
+
+/* Default implementation of gdbarch_print_cap_attributes. */
+extern void default_print_cap_attributes (struct gdbarch *gdbarch,
+ const gdb_byte *contents, bool tag,
+ struct ui_file *stream);
+
#endif /* ARCH_UTILS_H */
invalid=False,
)
+Method(
+ comment="""
+Print value of a capability containing CONTENTS and TAG to STREAM.
+""",
+ type="void",
+ name="print_cap",
+ params=[
+ ("const gdb_byte *", "contents"),
+ ("bool", "tag"),
+ ("bool", "compact"),
+ ("struct ui_file *", "stream"),
+ ],
+ predefault="default_print_cap",
+ invalid=False,
+)
+
+Method(
+ comment="""
+Print additional attributes for a capability containing CONTENTS and
+TAG to STREAM.
+""",
+ type="void",
+ name="print_cap_attributes",
+ params=[
+ ("const gdb_byte *", "contents"),
+ ("bool", "tag"),
+ ("struct ui_file *", "stream"),
+ ],
+ predefault="default_print_cap_attributes",
+ invalid=False,
+)
+
Function(
comment="""
Fetch the target specific address used to represent a load module.
extern void gdbarch_set_cap_tag_from_address (struct gdbarch *gdbarch, CORE_ADDR addr, bool tag);
extern void set_gdbarch_set_cap_tag_from_address (struct gdbarch *gdbarch, gdbarch_set_cap_tag_from_address_ftype *set_cap_tag_from_address);
+/* Print value of a capability containing CONTENTS and TAG to STREAM. */
+
+typedef void (gdbarch_print_cap_ftype) (struct gdbarch *gdbarch, const gdb_byte *contents, bool tag, bool compact, struct ui_file *stream);
+extern void gdbarch_print_cap (struct gdbarch *gdbarch, const gdb_byte *contents, bool tag, bool compact, struct ui_file *stream);
+extern void set_gdbarch_print_cap (struct gdbarch *gdbarch, gdbarch_print_cap_ftype *print_cap);
+
+/* Print additional attributes for a capability containing CONTENTS and
+ TAG to STREAM. */
+
+typedef void (gdbarch_print_cap_attributes_ftype) (struct gdbarch *gdbarch, const gdb_byte *contents, bool tag, struct ui_file *stream);
+extern void gdbarch_print_cap_attributes (struct gdbarch *gdbarch, const gdb_byte *contents, bool tag, struct ui_file *stream);
+extern void set_gdbarch_print_cap_attributes (struct gdbarch *gdbarch, gdbarch_print_cap_attributes_ftype *print_cap_attributes);
+
/* Fetch the target specific address used to represent a load module. */
extern bool gdbarch_fetch_tls_load_module_address_p (struct gdbarch *gdbarch);
gdbarch_remote_register_number_ftype *remote_register_number;
gdbarch_get_cap_tag_from_address_ftype *get_cap_tag_from_address;
gdbarch_set_cap_tag_from_address_ftype *set_cap_tag_from_address;
+ gdbarch_print_cap_ftype *print_cap;
+ gdbarch_print_cap_attributes_ftype *print_cap_attributes;
gdbarch_fetch_tls_load_module_address_ftype *fetch_tls_load_module_address;
gdbarch_get_thread_local_address_ftype *get_thread_local_address;
CORE_ADDR frame_args_skip;
gdbarch->remote_register_number = default_remote_register_number;
gdbarch->get_cap_tag_from_address = default_get_cap_tag_from_address;
gdbarch->set_cap_tag_from_address = default_set_cap_tag_from_address;
+ gdbarch->print_cap = default_print_cap;
+ gdbarch->print_cap_attributes = default_print_cap_attributes;
gdbarch->unwind_pc = default_unwind_pc;
gdbarch->unwind_sp = default_unwind_sp;
gdbarch->stabs_argument_has_addr = default_stabs_argument_has_addr;
/* Skip verify of remote_register_number, invalid_p == 0 */
/* Skip verify of get_cap_tag_from_address, invalid_p == 0 */
/* Skip verify of set_cap_tag_from_address, invalid_p == 0 */
+ /* Skip verify of print_cap, invalid_p == 0 */
+ /* Skip verify of print_cap_attributes, invalid_p == 0 */
/* Skip verify of fetch_tls_load_module_address, has predicate. */
/* Skip verify of get_thread_local_address, has predicate. */
/* Skip verify of frame_args_skip, invalid_p == 0 */
fprintf_filtered (file,
"gdbarch_dump: set_cap_tag_from_address = <%s>\n",
host_address_to_string (gdbarch->set_cap_tag_from_address));
+ fprintf_filtered (file,
+ "gdbarch_dump: print_cap = <%s>\n",
+ host_address_to_string (gdbarch->print_cap));
+ fprintf_filtered (file,
+ "gdbarch_dump: print_cap_attributes = <%s>\n",
+ host_address_to_string (gdbarch->print_cap_attributes));
fprintf_filtered (file,
"gdbarch_dump: gdbarch_fetch_tls_load_module_address_p() = %d\n",
gdbarch_fetch_tls_load_module_address_p (gdbarch));
gdbarch->set_cap_tag_from_address = set_cap_tag_from_address;
}
+void
+gdbarch_print_cap (struct gdbarch *gdbarch, const gdb_byte *contents, bool tag, bool compact, struct ui_file *stream)
+{
+ gdb_assert (gdbarch != NULL);
+ gdb_assert (gdbarch->print_cap != NULL);
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_print_cap called\n");
+ gdbarch->print_cap (gdbarch, contents, tag, compact, stream);
+}
+
+void
+set_gdbarch_print_cap (struct gdbarch *gdbarch,
+ gdbarch_print_cap_ftype print_cap)
+{
+ gdbarch->print_cap = print_cap;
+}
+
+void
+gdbarch_print_cap_attributes (struct gdbarch *gdbarch, const gdb_byte *contents, bool tag, struct ui_file *stream)
+{
+ gdb_assert (gdbarch != NULL);
+ gdb_assert (gdbarch->print_cap_attributes != NULL);
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_print_cap_attributes called\n");
+ gdbarch->print_cap_attributes (gdbarch, contents, tag, stream);
+}
+
+void
+set_gdbarch_print_cap_attributes (struct gdbarch *gdbarch,
+ gdbarch_print_cap_attributes_ftype print_cap_attributes)
+{
+ gdbarch->print_cap_attributes = print_cap_attributes;
+}
+
bool
gdbarch_fetch_tls_load_module_address_p (struct gdbarch *gdbarch)
{