Use ui_file_as_string in gdbarch.sh/gdbarch.c
[deliverable/binutils-gdb.git] / gdb / arch-utils.h
index ad3f126a8389ad1e7919f0eca9ebadb7f3c6d9aa..830ebed31206ff5a794681a6036b0f09db5b4cf8 100644 (file)
@@ -26,6 +26,52 @@ struct minimal_symbol;
 struct type;
 struct gdbarch_info;
 
+template <size_t bp_size, const gdb_byte *break_insn>
+struct bp_manipulation
+{
+  static int
+  kind_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr)
+  {
+    return bp_size;
+  }
+
+  static const gdb_byte *
+  bp_from_kind (struct gdbarch *gdbarch, int kind, int *size)
+  {
+    *size = kind;
+    return break_insn;
+  }
+};
+
+template <size_t bp_size,
+         const gdb_byte *break_insn_little,
+         const gdb_byte *break_insn_big>
+struct bp_manipulation_endian
+{
+  static int
+  kind_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr)
+  {
+    return bp_size;
+  }
+
+  static const gdb_byte *
+  bp_from_kind (struct gdbarch *gdbarch, int kind, int *size)
+  {
+    *size = kind;
+    if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG)
+      return break_insn_big;
+    else
+      return break_insn_little;
+  }
+};
+
+#define BP_MANIPULATION(BREAK_INSN) \
+  bp_manipulation<sizeof (BREAK_INSN), BREAK_INSN>
+
+#define BP_MANIPULATION_ENDIAN(BREAK_INSN_LITTLE, BREAK_INSN_BIG) \
+  bp_manipulation_endian<sizeof (BREAK_INSN_LITTLE),             \
+  BREAK_INSN_LITTLE, BREAK_INSN_BIG>
+
 /* An implementation of gdbarch_displaced_step_copy_insn for
    processors that don't need to modify the instruction before
    single-stepping the displaced copy.
@@ -95,6 +141,11 @@ int cannot_register_not (struct gdbarch *gdbarch, int regnum);
 
 extern gdbarch_virtual_frame_pointer_ftype legacy_virtual_frame_pointer;
 
+/* Default implementation of gdbarch_floatformat_for_type.  */
+extern const struct floatformat **
+  default_floatformat_for_type (struct gdbarch *gdbarch,
+                               const char *name, int len);
+
 extern CORE_ADDR generic_skip_trampoline_code (struct frame_info *frame,
                                               CORE_ADDR pc);
 
@@ -166,8 +217,13 @@ extern int default_has_shared_address_space (struct gdbarch *);
 extern int default_fast_tracepoint_valid_at (struct gdbarch *gdbarch,
                                             CORE_ADDR addr, char **msg);
 
-extern void default_remote_breakpoint_from_pc (struct gdbarch *,
-                                              CORE_ADDR *pcptr, int *kindptr);
+extern const gdb_byte *default_breakpoint_from_pc (struct gdbarch *gdbarch,
+                                                  CORE_ADDR *pcptr,
+                                                  int *lenptr);
+
+extern int default_breakpoint_kind_from_current_state (struct gdbarch *gdbarch,
+                                                      struct regcache *regcache,
+                                                      CORE_ADDR *pcptr);
 
 extern void default_gen_return_address (struct gdbarch *gdbarch,
                                        struct agent_expr *ax,
This page took 0.024196 seconds and 4 git commands to generate.