2007-06-19 Markus Deuling <deuling@de.ibm.com>
[deliverable/binutils-gdb.git] / gdb / findvar.c
index 437ec2d4b051f74cb3b3683771a229edd41a9d41..839e988ccf30ded8ba27eeeb1a7fa659c65c7dca 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);
 }
 
 
@@ -624,20 +624,21 @@ value_from_register (struct type *type, int regnum, struct frame_info *frame)
   struct type *type1 = check_typedef (type);
   struct value *v;
 
-  if (CONVERT_REGISTER_P (regnum, type1))
+  if (gdbarch_convert_register_p (current_gdbarch, regnum, type1))
     {
       /* The ISA/ABI need to something weird when obtaining the
          specified value from this register.  It might need to
          re-order non-adjacent, starting with REGNUM (see MIPS and
          i386).  It might need to convert the [float] register into
          the corresponding [integer] type (see Alpha).  The assumption
-         is that REGISTER_TO_VALUE populates the entire value
+         is that gdbarch_register_to_value populates the entire value
          including the location.  */
       v = allocate_value (type);
       VALUE_LVAL (v) = lval_register;
       VALUE_FRAME_ID (v) = get_frame_id (frame);
       VALUE_REGNUM (v) = regnum;
-      REGISTER_TO_VALUE (frame, regnum, type1, value_contents_raw (v));
+      gdbarch_register_to_value (current_gdbarch,
+                                frame, regnum, type1, value_contents_raw (v));
     }
   else
     {
@@ -708,12 +709,14 @@ locate_var_value (struct symbol *var, struct frame_info *frame)
   switch (VALUE_LVAL (lazy_value))
     {
     case lval_register:
-      gdb_assert (REGISTER_NAME (VALUE_REGNUM (lazy_value)) != NULL
-                 && *REGISTER_NAME (VALUE_REGNUM (lazy_value)) != '\0');
+      gdb_assert (gdbarch_register_name
+                  (current_gdbarch, VALUE_REGNUM (lazy_value)) != NULL
+                 && *gdbarch_register_name
+                   (current_gdbarch, VALUE_REGNUM (lazy_value)) != '\0');
       error (_("Address requested for identifier "
               "\"%s\" which is in register $%s"),
             SYMBOL_PRINT_NAME (var), 
-           REGISTER_NAME (VALUE_REGNUM (lazy_value)));
+           gdbarch_register_name (current_gdbarch, VALUE_REGNUM (lazy_value)));
       break;
 
     default:
This page took 0.024133 seconds and 4 git commands to generate.