2007-06-06 Markus Deuling <deuling@de.ibm.com>
authorUlrich Weigand <uweigand@de.ibm.com>
Wed, 6 Jun 2007 15:23:06 +0000 (15:23 +0000)
committerUlrich Weigand <uweigand@de.ibm.com>
Wed, 6 Jun 2007 15:23:06 +0000 (15:23 +0000)
* gdbarch.sh (ADDRESS_TO_POINTER): Replace by
gdbarch_address_to_pointer.
* findvar.c (store_typed_address): Likewise.
* gdbtypes.c (make_pointer_type): Likewise (comment).
* procfs.c (procfs_address_to_host_pointer): Likewise.
* std-regs.c (value_of_builtin_frame_reg): Likewise.
(value_of_builtin_frame_fp_reg): Likewise.
(value_of_builtin_frame_pc_reg): Likewise.
* utils.c (paddress): Likewise (comment).
* gdbarch.sh (POINTER_TO_ADDRESS): Replace by
gdbarch_pointer_to_address.
* findvar.c (extract_typed_address): Likewise.
* gdbtypes.c (make_pointer_type): Likewise (comment).
* valops.c (value_cast): Likewise (comment).
* gdbarch.c, gdbarch.h: Regenerate.

gdb/ChangeLog
gdb/findvar.c
gdb/gdbarch.c
gdb/gdbarch.h
gdb/gdbarch.sh
gdb/gdbtypes.c
gdb/procfs.c
gdb/std-regs.c
gdb/utils.c
gdb/valops.c

index 349bbfd22828f0ba6dcc20b4899b33cf1fe808e0..2034513c055151e7e76b4df2ef3b94e28410f8a9 100644 (file)
@@ -1,3 +1,21 @@
+2007-06-06  Markus Deuling  <deuling@de.ibm.com>
+
+       * gdbarch.sh (ADDRESS_TO_POINTER): Replace by
+       gdbarch_address_to_pointer.
+       * findvar.c (store_typed_address): Likewise.
+       * gdbtypes.c (make_pointer_type): Likewise (comment).
+       * procfs.c (procfs_address_to_host_pointer): Likewise.
+       * std-regs.c (value_of_builtin_frame_reg): Likewise.
+       (value_of_builtin_frame_fp_reg): Likewise.
+       (value_of_builtin_frame_pc_reg): Likewise.
+       * utils.c (paddress): Likewise (comment).
+       * gdbarch.sh (POINTER_TO_ADDRESS): Replace by
+       gdbarch_pointer_to_address.
+       * findvar.c (extract_typed_address): Likewise.
+       * gdbtypes.c (make_pointer_type): Likewise (comment).
+       * valops.c (value_cast): Likewise (comment).
+       * gdbarch.c, gdbarch.h: Regenerate.
+
 2007-06-06  Markus Deuling  <deuling@de.ibm.com>
 
        * gdbarch.sh (GET_LONGJMP_TARGET): Replace by gdbarch_get_longjmp_target.
index 437ec2d4b051f74cb3b3683771a229edd41a9d41..e3f9fd528fb925da8a9c79df5025173bcbba4955 100644 (file)
@@ -174,7 +174,7 @@ extract_typed_address (const gdb_byte *buf, struct type *type)
                    _("extract_typed_address: "
                    "type is not a pointer or reference"));
 
-  return POINTER_TO_ADDRESS (type, buf);
+  return gdbarch_pointer_to_address (current_gdbarch, type, buf);
 }
 
 
@@ -243,7 +243,7 @@ store_typed_address (gdb_byte *buf, struct type *type, CORE_ADDR addr)
                    _("store_typed_address: "
                    "type is not a pointer or reference"));
 
-  ADDRESS_TO_POINTER (type, buf, addr);
+  gdbarch_address_to_pointer (current_gdbarch, type, buf, addr);
 }
 
 
index 11957fe3d57892703ea02d118521a70c9194707f..5c95bbeb1556ed0f6a2753b81903e3213b4fe187 100644 (file)
@@ -703,12 +703,6 @@ gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file)
   fprintf_unfiltered (file,
                       "gdbarch_dump: address_class_type_flags_to_name = <0x%lx>\n",
                       (long) current_gdbarch->address_class_type_flags_to_name);
-#ifdef ADDRESS_TO_POINTER
-  fprintf_unfiltered (file,
-                      "gdbarch_dump: %s # %s\n",
-                      "ADDRESS_TO_POINTER(type, buf, addr)",
-                      XSTRING (ADDRESS_TO_POINTER (type, buf, addr)));
-#endif
   fprintf_unfiltered (file,
                       "gdbarch_dump: address_to_pointer = <0x%lx>\n",
                       (long) current_gdbarch->address_to_pointer);
@@ -1184,12 +1178,6 @@ gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file)
   fprintf_unfiltered (file,
                       "gdbarch_dump: pc_regnum = %s\n",
                       paddr_d (current_gdbarch->pc_regnum));
-#ifdef POINTER_TO_ADDRESS
-  fprintf_unfiltered (file,
-                      "gdbarch_dump: %s # %s\n",
-                      "POINTER_TO_ADDRESS(type, buf)",
-                      XSTRING (POINTER_TO_ADDRESS (type, buf)));
-#endif
   fprintf_unfiltered (file,
                       "gdbarch_dump: pointer_to_address = <0x%lx>\n",
                       (long) current_gdbarch->pointer_to_address);
index 9e1f700f68d39eed82fbd89468b5e0507d8d798c..42ef4b2b39884546bae71de412c5020ee89c2563 100644 (file)
@@ -194,7 +194,8 @@ extern void set_gdbarch_long_double_format (struct gdbarch *gdbarch, const struc
    / addr_bit will be set from it.
   
    If TARGET_PTR_BIT and TARGET_ADDR_BIT are different, you'll probably
-   also need to set POINTER_TO_ADDRESS and ADDRESS_TO_POINTER as well.
+   also need to set gdbarch_pointer_to_address and gdbarch_address_to_pointer
+   as well.
   
    ptr_bit is the size of a pointer on the target */
 
@@ -594,22 +595,10 @@ extern void set_gdbarch_value_from_register (struct gdbarch *gdbarch, gdbarch_va
 typedef CORE_ADDR (gdbarch_pointer_to_address_ftype) (struct type *type, const gdb_byte *buf);
 extern CORE_ADDR gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const gdb_byte *buf);
 extern void set_gdbarch_pointer_to_address (struct gdbarch *gdbarch, gdbarch_pointer_to_address_ftype *pointer_to_address);
-#if !defined (GDB_TM_FILE) && defined (POINTER_TO_ADDRESS)
-#error "Non multi-arch definition of POINTER_TO_ADDRESS"
-#endif
-#if !defined (POINTER_TO_ADDRESS)
-#define POINTER_TO_ADDRESS(type, buf) (gdbarch_pointer_to_address (current_gdbarch, type, buf))
-#endif
 
 typedef void (gdbarch_address_to_pointer_ftype) (struct type *type, gdb_byte *buf, CORE_ADDR addr);
 extern void gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, gdb_byte *buf, CORE_ADDR addr);
 extern void set_gdbarch_address_to_pointer (struct gdbarch *gdbarch, gdbarch_address_to_pointer_ftype *address_to_pointer);
-#if !defined (GDB_TM_FILE) && defined (ADDRESS_TO_POINTER)
-#error "Non multi-arch definition of ADDRESS_TO_POINTER"
-#endif
-#if !defined (ADDRESS_TO_POINTER)
-#define ADDRESS_TO_POINTER(type, buf, addr) (gdbarch_address_to_pointer (current_gdbarch, type, buf, addr))
-#endif
 
 extern int gdbarch_integer_to_address_p (struct gdbarch *gdbarch);
 
index d7cc4bedb2a4282293b8d267ff49bbd02c0d5672..774c8d64aba35a099a4969721467682da6a3dbc6 100755 (executable)
@@ -407,7 +407,8 @@ v:TARGET_LONG_DOUBLE_FORMAT:const struct floatformat **:long_double_format:::::f
 # / addr_bit will be set from it.
 #
 # If TARGET_PTR_BIT and TARGET_ADDR_BIT are different, you'll probably
-# also need to set POINTER_TO_ADDRESS and ADDRESS_TO_POINTER as well.
+# also need to set gdbarch_pointer_to_address and gdbarch_address_to_pointer
+# as well.
 #
 # ptr_bit is the size of a pointer on the target
 v:TARGET_PTR_BIT:int:ptr_bit:::8 * sizeof (void*):TARGET_INT_BIT::0
@@ -496,8 +497,8 @@ f:=:void:value_to_register:struct frame_info *frame, int regnum, struct type *ty
 # (but not the value contents) filled in.
 f::struct value *:value_from_register:struct type *type, int regnum, struct frame_info *frame:type, regnum, frame::default_value_from_register::0
 #
-f:=:CORE_ADDR:pointer_to_address:struct type *type, const gdb_byte *buf:type, buf::unsigned_pointer_to_address::0
-f:=:void:address_to_pointer:struct type *type, gdb_byte *buf, CORE_ADDR addr:type, buf, addr::unsigned_address_to_pointer::0
+f::CORE_ADDR:pointer_to_address:struct type *type, const gdb_byte *buf:type, buf::unsigned_pointer_to_address::0
+f::void:address_to_pointer:struct type *type, gdb_byte *buf, CORE_ADDR addr:type, buf, addr::unsigned_address_to_pointer::0
 M::CORE_ADDR:integer_to_address:struct type *type, const gdb_byte *buf:type, buf
 
 # It has been suggested that this, well actually its predecessor,
index 159a5de0aed7e4d7fd8e08902c0fda2a70ea2390..9ea7b633fabee12ea13388cadbd4a52b05a2ec42 100644 (file)
@@ -317,8 +317,8 @@ make_pointer_type (struct type *type, struct type **typeptr)
   TYPE_CODE (ntype) = TYPE_CODE_PTR;
 
   /* Mark pointers as unsigned.  The target converts between pointers
-     and addresses (CORE_ADDRs) using POINTER_TO_ADDRESS() and
-     ADDRESS_TO_POINTER(). */
+     and addresses (CORE_ADDRs) using gdbarch_pointer_to_address and
+     gdbarch_address_to_pointer. */
   TYPE_FLAGS (ntype) |= TYPE_FLAG_UNSIGNED;
 
   if (!TYPE_POINTER_TYPE (type))       /* Remember it, if don't have one.  */
index 606466ec4ef8ae5c85a59e3db8e6e53c9b5174fd..10baaf9223b42a63394dbb4eed0502e092da7f05 100644 (file)
@@ -2847,7 +2847,8 @@ procfs_address_to_host_pointer (CORE_ADDR addr)
   void *ptr;
 
   gdb_assert (sizeof (ptr) == TYPE_LENGTH (builtin_type_void_data_ptr));
-  ADDRESS_TO_POINTER (builtin_type_void_data_ptr, &ptr, addr);
+  gdbarch_address_to_pointer (current_gdbarch, builtin_type_void_data_ptr,
+                             &ptr, addr);
   return ptr;
 }
 
index 2edcba8ac38545934071cb8058ac16a69e712c22..2aa5b36dfcd59db57b4d67f014fea2a7f83f333c 100644 (file)
@@ -64,8 +64,8 @@ value_of_builtin_frame_reg (struct frame_info *frame, const void *baton)
   memset (buf, 0, TYPE_LENGTH (value_type (val)));
   /* frame.base.  */
   if (frame != NULL)
-    ADDRESS_TO_POINTER (builtin_type_void_data_ptr, buf,
-                       get_frame_base (frame));
+    gdbarch_address_to_pointer (current_gdbarch, builtin_type_void_data_ptr,
+                               buf, get_frame_base (frame));
   buf += TYPE_LENGTH (builtin_type_void_data_ptr);
   /* frame.XXX.  */
   return val;
@@ -89,8 +89,8 @@ value_of_builtin_frame_fp_reg (struct frame_info *frame, const void *baton)
       if (frame == NULL)
        memset (buf, 0, TYPE_LENGTH (value_type (val)));
       else
-       ADDRESS_TO_POINTER (builtin_type_void_data_ptr, buf,
-                           get_frame_base_address (frame));
+       gdbarch_address_to_pointer (current_gdbarch, builtin_type_void_data_ptr,
+                                   buf, get_frame_base_address (frame));
       return val;
     }
 }
@@ -107,8 +107,8 @@ value_of_builtin_frame_pc_reg (struct frame_info *frame, const void *baton)
       if (frame == NULL)
        memset (buf, 0, TYPE_LENGTH (value_type (val)));
       else
-       ADDRESS_TO_POINTER (builtin_type_void_data_ptr, buf,
-                           get_frame_pc (frame));
+       gdbarch_address_to_pointer (current_gdbarch, builtin_type_void_data_ptr,
+                                    buf, get_frame_pc (frame));
       return val;
     }
 }
index f5325f692fbc3a9a0a1a88c26688859f7ac2051e..e1fb9ed48c416d9f4f6a5a70b72252cba6f7416d 100644 (file)
@@ -2559,7 +2559,7 @@ paddress (CORE_ADDR addr)
      when it won't occur. */
   /* NOTE: This assumes that the significant address information is
      kept in the least significant bits of ADDR - the upper bits were
-     either zero or sign extended.  Should ADDRESS_TO_POINTER() or
+     either zero or sign extended.  Should gdbarch_address_to_pointer or
      some ADDRESS_TO_PRINTABLE() be used to do the conversion?  */
 
   int addr_bit = TARGET_ADDR_BIT;
index b55f45fe95611e62deb98dc1e9098ebc467bfd93..d32bb0273a4face552dbda8375fe4a4e5ed207df 100644 (file)
@@ -374,7 +374,7 @@ value_cast (struct type *type, struct value *arg2)
       LONGEST longest;
 
       /* When we cast pointers to integers, we mustn't use
-         POINTER_TO_ADDRESS to find the address the pointer
+         gdbarch_pointer_to_address to find the address the pointer
          represents, as value_as_long would.  GDB should evaluate
          expressions just as the compiler would --- and the compiler
          sees a cast as a simple reinterpretation of the pointer's
This page took 0.034509 seconds and 4 git commands to generate.