* mmix.h (R_MMIX_PUSHJ_STUBBABLE): New reloc number.
[deliverable/binutils-gdb.git] / gdb / findvar.c
index 933146a78bc646194ef621cc6a2f26c3e998a91b..34b4a5b50e604e40f1e2fb7da23148e97485c8d2 100644 (file)
@@ -34,7 +34,7 @@
 #include "floatformat.h"
 #include "symfile.h"           /* for overlay functions */
 #include "regcache.h"
-#include "builtin-regs.h"
+#include "user-regs.h"
 #include "block.h"
 
 /* Basic byte-swapping routines.  GDB has needed these for a long time...
@@ -263,10 +263,10 @@ value_of_register (int regnum, struct frame_info *frame)
   char raw_buffer[MAX_REGISTER_SIZE];
   enum lval_type lval;
 
-  /* Builtin registers lie completly outside of the range of normal
+  /* User registers lie completly outside of the range of normal
      registers.  Catch them early so that the target never sees them.  */
   if (regnum >= NUM_REGS + NUM_PSEUDO_REGS)
-    return value_of_builtin_reg (regnum, frame);
+    return value_of_user_reg (regnum, frame);
 
   frame_register (frame, regnum, &optim, &lval, &addr, &realnum, raw_buffer);
 
@@ -289,16 +289,16 @@ value_of_register (int regnum, struct frame_info *frame)
       DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL (regnum, register_type (current_gdbarch, regnum),
                                              raw_buffer, VALUE_CONTENTS_RAW (reg_val));
     }
-  else if (REGISTER_RAW_SIZE (regnum) == REGISTER_VIRTUAL_SIZE (regnum))
+  else if (DEPRECATED_REGISTER_RAW_SIZE (regnum) == DEPRECATED_REGISTER_VIRTUAL_SIZE (regnum))
     memcpy (VALUE_CONTENTS_RAW (reg_val), raw_buffer,
-           REGISTER_RAW_SIZE (regnum));
+           DEPRECATED_REGISTER_RAW_SIZE (regnum));
   else
     internal_error (__FILE__, __LINE__,
                    "Register \"%s\" (%d) has conflicting raw (%d) and virtual (%d) size",
                    REGISTER_NAME (regnum),
                    regnum,
-                   REGISTER_RAW_SIZE (regnum),
-                   REGISTER_VIRTUAL_SIZE (regnum));
+                   DEPRECATED_REGISTER_RAW_SIZE (regnum),
+                   DEPRECATED_REGISTER_VIRTUAL_SIZE (regnum));
   VALUE_LVAL (reg_val) = lval;
   VALUE_ADDRESS (reg_val) = addr;
   VALUE_REGNO (reg_val) = regnum;
@@ -391,12 +391,12 @@ symbol_read_needs_frame (struct symbol *sym)
    If FRAME is NULL, use the deprecated_selected_frame.  */
 
 struct value *
-read_var_value (register struct symbol *var, struct frame_info *frame)
+read_var_value (struct symbol *var, struct frame_info *frame)
 {
-  register struct value *v;
+  struct value *v;
   struct type *type = SYMBOL_TYPE (var);
   CORE_ADDR addr;
-  register int len;
+  int len;
 
   v = allocate_value (type);
   VALUE_LVAL (v) = lval_memory;        /* The most likely possibility.  */
@@ -404,8 +404,11 @@ read_var_value (register struct symbol *var, struct frame_info *frame)
 
   len = TYPE_LENGTH (type);
 
+
+  /* FIXME drow/2003-09-06: this call to the selected frame should be
+     pushed upwards to the callers.  */
   if (frame == NULL)
-    frame = deprecated_selected_frame;
+    frame = deprecated_safe_get_selected_frame ();
 
   switch (SYMBOL_CLASS (var))
     {
@@ -512,20 +515,6 @@ addresses have not been bound by the dynamic loader. Try again when executable i
        break;
       }
 
-    case LOC_THREAD_LOCAL_STATIC:
-      {
-        if (target_get_thread_local_address_p ())
-          addr = target_get_thread_local_address (inferior_ptid,
-                                                  SYMBOL_OBJFILE (var),
-                                                  SYMBOL_VALUE_ADDRESS (var));
-        /* It wouldn't be wrong here to try a gdbarch method, too;
-           finding TLS is an ABI-specific thing.  But we don't do that
-           yet.  */
-        else
-          error ("Cannot find thread-local variables on this target");
-        break;
-      }
-
     case LOC_TYPEDEF:
       error ("Cannot look up value of a typedef");
       break;
@@ -658,7 +647,7 @@ value_from_register (struct type *type, int regnum, struct frame_info *frame)
       /* Copy all of the data out, whereever it may be.  */
       for (local_regnum = regnum, value_bytes_copied = 0;
           value_bytes_copied < len;
-          (value_bytes_copied += REGISTER_RAW_SIZE (local_regnum),
+          (value_bytes_copied += DEPRECATED_REGISTER_RAW_SIZE (local_regnum),
            ++local_regnum))
        {
          int realnum;
@@ -724,9 +713,9 @@ value_from_register (struct type *type, int regnum, struct frame_info *frame)
          some fiddling with the last register copied here for little
          endian machines.  */
       if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG
-         && len < REGISTER_RAW_SIZE (regnum))
+         && len < DEPRECATED_REGISTER_RAW_SIZE (regnum))
        /* Big-endian, and we want less than full size.  */
-       VALUE_OFFSET (v) = REGISTER_RAW_SIZE (regnum) - len;
+       VALUE_OFFSET (v) = DEPRECATED_REGISTER_RAW_SIZE (regnum) - len;
       else
        VALUE_OFFSET (v) = 0;
       memcpy (VALUE_CONTENTS_RAW (v), value_bytes + VALUE_OFFSET (v), len);
@@ -741,7 +730,7 @@ value_from_register (struct type *type, int regnum, struct frame_info *frame)
    address.  */
 
 struct value *
-locate_var_value (register struct symbol *var, struct frame_info *frame)
+locate_var_value (struct symbol *var, struct frame_info *frame)
 {
   CORE_ADDR addr = 0;
   struct type *type = SYMBOL_TYPE (var);
This page took 0.026057 seconds and 4 git commands to generate.