2003-05-23 Andrew Cagney <cagney@redhat.com>
[deliverable/binutils-gdb.git] / gdb / findvar.c
index beab9fb8fe5fb7977956abc7dfc36c3c9e8ec7d2..5d975e43c855ea54171681f2d46c08cb019be77e 100644 (file)
@@ -252,24 +252,6 @@ store_unsigned_integer (void *addr, int len, ULONGEST val)
     }
 }
 
-/* Store the address VAL as a LEN-byte value in target byte order at
-   ADDR.  ADDR is a buffer in the GDB process, not in the inferior.
-
-   This function should only be used by target-specific code.  It
-   assumes that a pointer has the same representation as that thing's
-   address represented as an integer.  Some machines use word
-   addresses, or similarly munged things, for certain types of
-   pointers, so that assumption doesn't hold everywhere.
-
-   Common code should use store_typed_address instead, or something else
-   based on ADDRESS_TO_POINTER.  */
-void
-store_address (void *addr, int len, LONGEST val)
-{
-  store_unsigned_integer (addr, len, val);
-}
-
-
 /* Store the address ADDR as a pointer of type TYPE at BUF, in target
    form.  */
 void
@@ -300,7 +282,7 @@ value_of_register (int regnum, struct frame_info *frame)
   int optim;
   struct value *reg_val;
   int realnum;
-  char *raw_buffer = (char*) alloca (MAX_REGISTER_RAW_SIZE);
+  char raw_buffer[MAX_REGISTER_SIZE];
   enum lval_type lval;
 
   /* Builtin registers lie completly outside of the range of normal
@@ -351,7 +333,7 @@ value_of_register (int regnum, struct frame_info *frame)
 CORE_ADDR
 unsigned_pointer_to_address (struct type *type, const void *buf)
 {
-  return extract_address (buf, TYPE_LENGTH (type));
+  return extract_unsigned_integer (buf, TYPE_LENGTH (type));
 }
 
 CORE_ADDR
@@ -365,7 +347,7 @@ signed_pointer_to_address (struct type *type, const void *buf)
 void
 unsigned_address_to_pointer (struct type *type, void *buf, CORE_ADDR addr)
 {
-  store_address (buf, TYPE_LENGTH (type), addr);
+  store_unsigned_integer (buf, TYPE_LENGTH (type), addr);
 }
 
 void
@@ -664,7 +646,7 @@ addresses have not been bound by the dynamic loader. Try again when executable i
 struct value *
 value_from_register (struct type *type, int regnum, struct frame_info *frame)
 {
-  char *raw_buffer = (char*) alloca (MAX_REGISTER_RAW_SIZE);
+  char raw_buffer[MAX_REGISTER_SIZE];
   CORE_ADDR addr;
   int optim;
   struct value *v = allocate_value (type);
@@ -699,7 +681,7 @@ value_from_register (struct type *type, int regnum, struct frame_info *frame)
       CORE_ADDR last_addr = 0;
       CORE_ADDR first_addr = 0;
 
-      value_bytes = (char *) alloca (len + MAX_REGISTER_RAW_SIZE);
+      value_bytes = (char *) alloca (len + MAX_REGISTER_SIZE);
 
       /* Copy all of the data out, whereever it may be.  */
 
This page took 0.052173 seconds and 4 git commands to generate.