]> Git Repo - binutils.git/blobdiff - gdb/gdbarch.h
* gdbarch.sh (read_sp): Remove.
[binutils.git] / gdb / gdbarch.h
index 56bf3138b633daac8b9474ac949d9ac4d0a089ba..02557bb44a9128a55cc0860041b5d1c6b7f6c14b 100644 (file)
@@ -42,6 +42,7 @@ struct ui_file;
 struct frame_info;
 struct value;
 struct objfile;
+struct obj_section;
 struct minimal_symbol;
 struct regcache;
 struct reggroup;
@@ -141,7 +142,9 @@ extern void set_gdbarch_long_long_bit (struct gdbarch *gdbarch, int long_long_bi
 
 /* The ABI default bit-size and format for "float", "double", and "long
    double".  These bit/format pairs should eventually be combined into
-   a single object.  For the moment, just initialize them as a pair. */
+   a single object.  For the moment, just initialize them as a pair.
+   Each format describes both the big and little endian layouts (if
+   useful). */
 
 extern int gdbarch_float_bit (struct gdbarch *gdbarch);
 extern void set_gdbarch_float_bit (struct gdbarch *gdbarch, int float_bit);
@@ -152,8 +155,8 @@ extern void set_gdbarch_float_bit (struct gdbarch *gdbarch, int float_bit);
 #define TARGET_FLOAT_BIT (gdbarch_float_bit (current_gdbarch))
 #endif
 
-extern const struct floatformat * gdbarch_float_format (struct gdbarch *gdbarch);
-extern void set_gdbarch_float_format (struct gdbarch *gdbarch, const struct floatformat * float_format);
+extern const struct floatformat ** gdbarch_float_format (struct gdbarch *gdbarch);
+extern void set_gdbarch_float_format (struct gdbarch *gdbarch, const struct floatformat ** float_format);
 #if !defined (GDB_TM_FILE) && defined (TARGET_FLOAT_FORMAT)
 #error "Non multi-arch definition of TARGET_FLOAT_FORMAT"
 #endif
@@ -170,8 +173,8 @@ extern void set_gdbarch_double_bit (struct gdbarch *gdbarch, int double_bit);
 #define TARGET_DOUBLE_BIT (gdbarch_double_bit (current_gdbarch))
 #endif
 
-extern const struct floatformat * gdbarch_double_format (struct gdbarch *gdbarch);
-extern void set_gdbarch_double_format (struct gdbarch *gdbarch, const struct floatformat * double_format);
+extern const struct floatformat ** gdbarch_double_format (struct gdbarch *gdbarch);
+extern void set_gdbarch_double_format (struct gdbarch *gdbarch, const struct floatformat ** double_format);
 #if !defined (GDB_TM_FILE) && defined (TARGET_DOUBLE_FORMAT)
 #error "Non multi-arch definition of TARGET_DOUBLE_FORMAT"
 #endif
@@ -188,8 +191,8 @@ extern void set_gdbarch_long_double_bit (struct gdbarch *gdbarch, int long_doubl
 #define TARGET_LONG_DOUBLE_BIT (gdbarch_long_double_bit (current_gdbarch))
 #endif
 
-extern const struct floatformat * gdbarch_long_double_format (struct gdbarch *gdbarch);
-extern void set_gdbarch_long_double_format (struct gdbarch *gdbarch, const struct floatformat * long_double_format);
+extern const struct floatformat ** gdbarch_long_double_format (struct gdbarch *gdbarch);
+extern void set_gdbarch_long_double_format (struct gdbarch *gdbarch, const struct floatformat ** long_double_format);
 #if !defined (GDB_TM_FILE) && defined (TARGET_LONG_DOUBLE_FORMAT)
 #error "Non multi-arch definition of TARGET_LONG_DOUBLE_FORMAT"
 #endif
@@ -284,33 +287,6 @@ extern void set_gdbarch_write_pc (struct gdbarch *gdbarch, gdbarch_write_pc_ftyp
 #define TARGET_WRITE_PC(val, ptid) (gdbarch_write_pc (current_gdbarch, val, ptid))
 #endif
 
-/* UNWIND_SP is a direct replacement for TARGET_READ_SP. */
-
-#if defined (TARGET_READ_SP)
-/* Legacy for systems yet to multi-arch TARGET_READ_SP */
-#if !defined (TARGET_READ_SP_P)
-#define TARGET_READ_SP_P() (1)
-#endif
-#endif
-
-extern int gdbarch_read_sp_p (struct gdbarch *gdbarch);
-#if !defined (GDB_TM_FILE) && defined (TARGET_READ_SP_P)
-#error "Non multi-arch definition of TARGET_READ_SP"
-#endif
-#if !defined (TARGET_READ_SP_P)
-#define TARGET_READ_SP_P() (gdbarch_read_sp_p (current_gdbarch))
-#endif
-
-typedef CORE_ADDR (gdbarch_read_sp_ftype) (void);
-extern CORE_ADDR gdbarch_read_sp (struct gdbarch *gdbarch);
-extern void set_gdbarch_read_sp (struct gdbarch *gdbarch, gdbarch_read_sp_ftype *read_sp);
-#if !defined (GDB_TM_FILE) && defined (TARGET_READ_SP)
-#error "Non multi-arch definition of TARGET_READ_SP"
-#endif
-#if !defined (TARGET_READ_SP)
-#define TARGET_READ_SP() (gdbarch_read_sp (current_gdbarch))
-#endif
-
 /* Function for getting target's idea of a frame pointer.  FIXME: GDB's
    whole scheme for dealing with "frames" and "frame pointers" needs a
    serious shakedown. */
@@ -469,7 +445,9 @@ extern void set_gdbarch_register_name (struct gdbarch *gdbarch, gdbarch_register
 #define REGISTER_NAME(regnr) (gdbarch_register_name (current_gdbarch, regnr))
 #endif
 
-/* REGISTER_TYPE is a direct replacement for DEPRECATED_REGISTER_VIRTUAL_TYPE. */
+/* Return the type of a register specified by the architecture.  Only
+   the register cache should call this function directly; others should
+   use "register_type". */
 
 extern int gdbarch_register_type_p (struct gdbarch *gdbarch);
 
@@ -477,39 +455,6 @@ typedef struct type * (gdbarch_register_type_ftype) (struct gdbarch *gdbarch, in
 extern struct type * gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr);
 extern void set_gdbarch_register_type (struct gdbarch *gdbarch, gdbarch_register_type_ftype *register_type);
 
-/* If the value returned by DEPRECATED_REGISTER_BYTE agrees with the
-   register offsets computed using just REGISTER_TYPE, this can be
-   deleted.  See: maint print registers.  NOTE: cagney/2002-05-02: This
-   function with predicate has a valid (callable) initial value.  As a
-   consequence, even when the predicate is false, the corresponding
-   function works.  This simplifies the migration process - old code,
-   calling DEPRECATED_REGISTER_BYTE, doesn't need to be modified. */
-
-#if defined (DEPRECATED_REGISTER_BYTE)
-/* Legacy for systems yet to multi-arch DEPRECATED_REGISTER_BYTE */
-#if !defined (DEPRECATED_REGISTER_BYTE_P)
-#define DEPRECATED_REGISTER_BYTE_P() (1)
-#endif
-#endif
-
-extern int gdbarch_deprecated_register_byte_p (struct gdbarch *gdbarch);
-#if !defined (GDB_TM_FILE) && defined (DEPRECATED_REGISTER_BYTE_P)
-#error "Non multi-arch definition of DEPRECATED_REGISTER_BYTE"
-#endif
-#if !defined (DEPRECATED_REGISTER_BYTE_P)
-#define DEPRECATED_REGISTER_BYTE_P() (gdbarch_deprecated_register_byte_p (current_gdbarch))
-#endif
-
-typedef int (gdbarch_deprecated_register_byte_ftype) (int reg_nr);
-extern int gdbarch_deprecated_register_byte (struct gdbarch *gdbarch, int reg_nr);
-extern void set_gdbarch_deprecated_register_byte (struct gdbarch *gdbarch, gdbarch_deprecated_register_byte_ftype *deprecated_register_byte);
-#if !defined (GDB_TM_FILE) && defined (DEPRECATED_REGISTER_BYTE)
-#error "Non multi-arch definition of DEPRECATED_REGISTER_BYTE"
-#endif
-#if !defined (DEPRECATED_REGISTER_BYTE)
-#define DEPRECATED_REGISTER_BYTE(reg_nr) (gdbarch_deprecated_register_byte (current_gdbarch, reg_nr))
-#endif
-
 /* See gdbint.texinfo, and PUSH_DUMMY_CALL. */
 
 extern int gdbarch_unwind_dummy_id_p (struct gdbarch *gdbarch);
@@ -739,33 +684,6 @@ typedef CORE_ADDR (gdbarch_integer_to_address_ftype) (struct gdbarch *gdbarch, s
 extern CORE_ADDR gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, const gdb_byte *buf);
 extern void set_gdbarch_integer_to_address (struct gdbarch *gdbarch, gdbarch_integer_to_address_ftype *integer_to_address);
 
-/* NOTE: kettenis/2005-09-01: Replaced by PUSH_DUMMY_CALL. */
-
-#if defined (DEPRECATED_STORE_STRUCT_RETURN)
-/* Legacy for systems yet to multi-arch DEPRECATED_STORE_STRUCT_RETURN */
-#if !defined (DEPRECATED_STORE_STRUCT_RETURN_P)
-#define DEPRECATED_STORE_STRUCT_RETURN_P() (1)
-#endif
-#endif
-
-extern int gdbarch_deprecated_store_struct_return_p (struct gdbarch *gdbarch);
-#if !defined (GDB_TM_FILE) && defined (DEPRECATED_STORE_STRUCT_RETURN_P)
-#error "Non multi-arch definition of DEPRECATED_STORE_STRUCT_RETURN"
-#endif
-#if !defined (DEPRECATED_STORE_STRUCT_RETURN_P)
-#define DEPRECATED_STORE_STRUCT_RETURN_P() (gdbarch_deprecated_store_struct_return_p (current_gdbarch))
-#endif
-
-typedef void (gdbarch_deprecated_store_struct_return_ftype) (CORE_ADDR addr, CORE_ADDR sp);
-extern void gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp);
-extern void set_gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch, gdbarch_deprecated_store_struct_return_ftype *deprecated_store_struct_return);
-#if !defined (GDB_TM_FILE) && defined (DEPRECATED_STORE_STRUCT_RETURN)
-#error "Non multi-arch definition of DEPRECATED_STORE_STRUCT_RETURN"
-#endif
-#if !defined (DEPRECATED_STORE_STRUCT_RETURN)
-#define DEPRECATED_STORE_STRUCT_RETURN(addr, sp) (gdbarch_deprecated_store_struct_return (current_gdbarch, addr, sp))
-#endif
-
 /* It has been suggested that this, well actually its predecessor,
    should take the type/value of the function to be called and not the
    return type.  This is left as an exercise for the reader.
@@ -939,9 +857,12 @@ extern void set_gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarc
 #define DEPRECATED_FUNCTION_START_OFFSET (gdbarch_deprecated_function_start_offset (current_gdbarch))
 #endif
 
-typedef void (gdbarch_remote_translate_xfer_address_ftype) (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len);
-extern void gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len);
-extern void set_gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, gdbarch_remote_translate_xfer_address_ftype *remote_translate_xfer_address);
+/* Return the remote protocol register number associated with this
+   register.  Normally the identity mapping. */
+
+typedef int (gdbarch_remote_register_number_ftype) (struct gdbarch *gdbarch, int regno);
+extern int gdbarch_remote_register_number (struct gdbarch *gdbarch, int regno);
+extern void set_gdbarch_remote_register_number (struct gdbarch *gdbarch, gdbarch_remote_register_number_ftype *remote_register_number);
 
 /* Fetch the target specific address used to represent a load module. */
 
@@ -1133,14 +1054,19 @@ extern void set_gdbarch_smash_text_address (struct gdbarch *gdbarch, gdbarch_sma
 #define SMASH_TEXT_ADDRESS(addr) (gdbarch_smash_text_address (current_gdbarch, addr))
 #endif
 
-/* FIXME/cagney/2001-01-18: This should be split in two.  A target method that indicates if
-   the target needs software single step.  An ISA method to implement it.
+/* FIXME/cagney/2001-01-18: This should be split in two.  A target method that
+   indicates if the target needs software single step.  An ISA method to
+   implement it.
+  
+   FIXME/cagney/2001-01-18: This should be replaced with something that inserts
+   breakpoints using the breakpoint system instead of blatting memory directly
+   (as with rs6000).
   
-   FIXME/cagney/2001-01-18: This should be replaced with something that inserts breakpoints
-   using the breakpoint system instead of blatting memory directly (as with rs6000).
+   FIXME/cagney/2001-01-18: The logic is backwards.  It should be asking if the
+   target can single step.  If not, then implement single step using breakpoints.
   
-   FIXME/cagney/2001-01-18: The logic is backwards.  It should be asking if the target can
-   single step.  If not, then implement single step using breakpoints. */
+   A return value of 1 means that the software_single_step breakpoints
+   were inserted; 0 means they were not. */
 
 #if defined (SOFTWARE_SINGLE_STEP)
 /* Legacy for systems yet to multi-arch SOFTWARE_SINGLE_STEP */
@@ -1157,14 +1083,14 @@ extern int gdbarch_software_single_step_p (struct gdbarch *gdbarch);
 #define SOFTWARE_SINGLE_STEP_P() (gdbarch_software_single_step_p (current_gdbarch))
 #endif
 
-typedef void (gdbarch_software_single_step_ftype) (enum target_signal sig, int insert_breakpoints_p);
-extern void gdbarch_software_single_step (struct gdbarch *gdbarch, enum target_signal sig, int insert_breakpoints_p);
+typedef int (gdbarch_software_single_step_ftype) (struct regcache *regcache);
+extern int gdbarch_software_single_step (struct gdbarch *gdbarch, struct regcache *regcache);
 extern void set_gdbarch_software_single_step (struct gdbarch *gdbarch, gdbarch_software_single_step_ftype *software_single_step);
 #if !defined (GDB_TM_FILE) && defined (SOFTWARE_SINGLE_STEP)
 #error "Non multi-arch definition of SOFTWARE_SINGLE_STEP"
 #endif
 #if !defined (SOFTWARE_SINGLE_STEP)
-#define SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p) (gdbarch_software_single_step (current_gdbarch, sig, insert_breakpoints_p))
+#define SOFTWARE_SINGLE_STEP(regcache) (gdbarch_software_single_step (current_gdbarch, regcache))
 #endif
 
 /* Return non-zero if the processor is executing a delay slot and a
@@ -1385,6 +1311,22 @@ extern void set_gdbarch_vtable_function_descriptors (struct gdbarch *gdbarch, in
 extern int gdbarch_vbit_in_delta (struct gdbarch *gdbarch);
 extern void set_gdbarch_vbit_in_delta (struct gdbarch *gdbarch, int vbit_in_delta);
 
+/* Advance PC to next instruction in order to skip a permanent breakpoint. */
+
+extern int gdbarch_skip_permanent_breakpoint_p (struct gdbarch *gdbarch);
+
+typedef void (gdbarch_skip_permanent_breakpoint_ftype) (struct regcache *regcache);
+extern void gdbarch_skip_permanent_breakpoint (struct gdbarch *gdbarch, struct regcache *regcache);
+extern void set_gdbarch_skip_permanent_breakpoint (struct gdbarch *gdbarch, gdbarch_skip_permanent_breakpoint_ftype *skip_permanent_breakpoint);
+
+/* Refresh overlay mapped state for section OSECT. */
+
+extern int gdbarch_overlay_update_p (struct gdbarch *gdbarch);
+
+typedef void (gdbarch_overlay_update_ftype) (struct obj_section *osect);
+extern void gdbarch_overlay_update (struct gdbarch *gdbarch, struct obj_section *osect);
+extern void set_gdbarch_overlay_update (struct gdbarch *gdbarch, gdbarch_overlay_update_ftype *overlay_update);
+
 extern struct gdbarch_tdep *gdbarch_tdep (struct gdbarch *gdbarch);
 
 
This page took 0.037643 seconds and 4 git commands to generate.