gas/
[deliverable/binutils-gdb.git] / gdb / valops.c
index 658f2a9e76acc50970d293dd1ae7a1455daaa5fe..e86b532e40be696a6630a2fc8d81c38fa29e8d1a 100644 (file)
@@ -1,6 +1,6 @@
 /* Perform non-arithmetic operations on values, for GDB.
 
-   Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
+   Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
    1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
    Free Software Foundation, Inc.
 
@@ -18,8 +18,8 @@
 
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.  */
+   Foundation, Inc., 51 Franklin Street, Fifth Floor,
+   Boston, MA 02110-1301, USA.  */
 
 #include "defs.h"
 #include "symtab.h"
@@ -569,7 +569,7 @@ value_assign (struct value *toval, struct value *fromval)
        const gdb_byte *dest_buffer;
        CORE_ADDR changed_addr;
        int changed_len;
-        char buffer[sizeof (LONGEST)];
+        gdb_byte buffer[sizeof (LONGEST)];
 
        if (value_bitsize (toval))
          {
@@ -631,7 +631,7 @@ value_assign (struct value *toval, struct value *fromval)
               modify it, and copy it back in.  */
            int amount_copied;
            int amount_to_copy;
-           char *buffer;
+           gdb_byte *buffer;
            int reg_offset;
            int byte_offset;
            int regno;
@@ -655,7 +655,7 @@ value_assign (struct value *toval, struct value *fromval)
              amount_to_copy = byte_offset + TYPE_LENGTH (type);
            
            /* And a bounce buffer.  Be slightly over generous.  */
-           buffer = (char *) alloca (amount_to_copy + MAX_REGISTER_SIZE);
+           buffer = alloca (amount_to_copy + MAX_REGISTER_SIZE);
 
            /* Copy it in.  */
            for (regno = reg_offset, amount_copied = 0;
@@ -933,54 +933,6 @@ value_ind (struct value *arg1)
   return 0;                    /* For lint -- never reached */
 }
 \f
-/* Pushing small parts of stack frames.  */
-
-/* Push one word (the size of object that a register holds).  */
-
-CORE_ADDR
-push_word (CORE_ADDR sp, ULONGEST word)
-{
-  int len = DEPRECATED_REGISTER_SIZE;
-  char buffer[MAX_REGISTER_SIZE];
-
-  store_unsigned_integer (buffer, len, word);
-  if (INNER_THAN (1, 2))
-    {
-      /* stack grows downward */
-      sp -= len;
-      write_memory (sp, buffer, len);
-    }
-  else
-    {
-      /* stack grows upward */
-      write_memory (sp, buffer, len);
-      sp += len;
-    }
-
-  return sp;
-}
-
-/* Push LEN bytes with data at BUFFER.  */
-
-CORE_ADDR
-push_bytes (CORE_ADDR sp, char *buffer, int len)
-{
-  if (INNER_THAN (1, 2))
-    {
-      /* stack grows downward */
-      sp -= len;
-      write_memory (sp, buffer, len);
-    }
-  else
-    {
-      /* stack grows upward */
-      write_memory (sp, buffer, len);
-      sp += len;
-    }
-
-  return sp;
-}
-
 /* Create a value for an array by allocating space in the inferior, copying
    the data into that space, and then setting up an array value.
 
@@ -1087,7 +1039,7 @@ value_string (char *ptr, int len)
      copy LEN bytes from PTR in gdb to that address in the inferior. */
 
   addr = allocate_space_in_inferior (len);
-  write_memory (addr, ptr, len);
+  write_memory (addr, (gdb_byte *) ptr, len);
 
   val = value_at_lazy (stringtype, addr);
   return (val);
@@ -1635,7 +1587,7 @@ value_struct_elt (struct value **argp, struct value **args,
       v = search_struct_method (name, argp, args, 0, static_memfuncp, t);
 
       if (v == (struct value *) - 1)
-       error (_("Cannot take address of a method"));
+       error (_("Cannot take address of method %s."), name);
       else if (v == 0)
        {
          if (TYPE_NFN_FIELDS (t))
@@ -2317,7 +2269,7 @@ check_field_in (struct type *type, const char *name)
    target structure/union is defined, otherwise, return 0.  */
 
 int
-check_field (struct value *arg1, const gdb_byte *name)
+check_field (struct value *arg1, const char *name)
 {
   struct type *t;
 
This page took 0.025433 seconds and 4 git commands to generate.