Fix problems introduced with my last change.
[deliverable/binutils-gdb.git] / gdb / value.h
index 5a92882bc08f4ef28f5a95ca6a99345808880d08..57fd38cbaf5fbf67572b3c26371f8d4986bb7a82 100644 (file)
@@ -1,6 +1,5 @@
 /* Definitions for values of C expressions, for GDB.
-   Copyright 1986, 1987, 1989, 1992, 1993, 1994, 1995, 1996
-   Free Software Foundation, Inc.
+   Copyright 1986, 1987, 1989, 1992-1996, 2000 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -38,7 +37,9 @@ struct value
     /* Location of value (if lval).  */
     union
       {
-       /* Address in inferior or byte of registers structure.  */
+       /* If lval == lval_memory, this is the address in the inferior.
+          If lval == lval_register, this is the byte offset into the
+          registers structure.  */
        CORE_ADDR address;
        /* Pointer to internal variable.  */
        struct internalvar *internalvar;
@@ -48,8 +49,10 @@ struct value
       }
     location;
     /* Describes offset of a value within lval of a structure in bytes.
-       This is used in retrieving contents from target memory. [Note also
-       the member embedded_offset below.] */
+       If lval == lval_memory, this is an offset to the address.
+       If lval == lval_register, this is a further offset from
+          location.address within the registers structure.  
+       Note also the member embedded_offset below.  */
     int offset;
     /* Only used for bitfields; number of bits contained in them.  */
     int bitsize;
@@ -183,8 +186,8 @@ extern int value_fetch_lazy PARAMS ((value_ptr val));
 do { struct type *value_type_arg_tmp = check_typedef (VALUE_TYPE (arg));\
      if (TYPE_CODE (value_type_arg_tmp) == TYPE_CODE_REF)              \
         arg = value_at_lazy (TYPE_TARGET_TYPE (value_type_arg_tmp),    \
-                             unpack_long (VALUE_TYPE (arg),            \
-                                          VALUE_CONTENTS (arg)),       \
+                             unpack_pointer (VALUE_TYPE (arg),         \
+                                             VALUE_CONTENTS (arg)),    \
                              VALUE_BFD_SECTION (arg));                 \
     } while (0)
 
@@ -241,8 +244,7 @@ struct internalvar
 struct frame_info;
 struct fn_field;
 
-extern void
-print_address_demangle PARAMS ((CORE_ADDR, GDB_FILE *, int));
+extern void print_address_demangle (CORE_ADDR, struct ui_file *, int);
 
 extern LONGEST value_as_long PARAMS ((value_ptr val));
 
@@ -262,6 +264,8 @@ extern LONGEST unpack_field_as_long PARAMS ((struct type * type, char *valaddr,
 
 extern value_ptr value_from_longest PARAMS ((struct type * type, LONGEST num));
 
+extern value_ptr value_from_pointer (struct type *type, CORE_ADDR addr);
+
 extern value_ptr value_from_double PARAMS ((struct type * type, DOUBLEST num));
 
 extern value_ptr value_from_string PARAMS ((char *string));
@@ -460,6 +464,9 @@ extern void write_register_bytes PARAMS ((int regbyte, char *myaddr, int len));
 extern void
 read_register_gen PARAMS ((int regno, char *myaddr));
 
+extern void
+write_register_gen PARAMS ((int regno, char *myaddr));
+
 extern CORE_ADDR
   read_register PARAMS ((int regno));
 
@@ -483,47 +490,46 @@ extern void get_saved_register PARAMS ((char *raw_buffer, int *optimized,
 extern void
 modify_field PARAMS ((char *addr, LONGEST fieldval, int bitpos, int bitsize));
 
-extern void
-type_print PARAMS ((struct type * type, char *varstring, GDB_FILE * stream,
-                   int show));
+extern void type_print (struct type * type, char *varstring,
+                       struct ui_file * stream, int show);
 
 extern char *baseclass_addr PARAMS ((struct type * type, int index,
                                     char *valaddr,
                                     value_ptr * valuep, int *errp));
 
-extern void
-print_longest PARAMS ((GDB_FILE * stream, int format, int use_local,
-                      LONGEST val));
+extern void print_longest (struct ui_file * stream, int format,
+                          int use_local, LONGEST val);
 
-extern void
-print_floating PARAMS ((char *valaddr, struct type * type, GDB_FILE * stream));
+extern void print_floating (char *valaddr, struct type * type,
+                           struct ui_file * stream);
 
-extern int value_print PARAMS ((value_ptr val, GDB_FILE * stream, int format,
-                               enum val_prettyprint pretty));
+extern int value_print (value_ptr val, struct ui_file *stream, int format,
+                       enum val_prettyprint pretty);
 
-extern void
-value_print_array_elements PARAMS ((value_ptr val, GDB_FILE * stream,
-                                 int format, enum val_prettyprint pretty));
+extern void value_print_array_elements (value_ptr val,
+                                       struct ui_file *stream,
+                                       int format,
+                                       enum val_prettyprint pretty);
 
 extern value_ptr
   value_release_to_mark PARAMS ((value_ptr mark));
 
-extern int
-val_print PARAMS ((struct type * type, char *valaddr, int embedded_offset, CORE_ADDR address,
-                  GDB_FILE * stream, int format, int deref_ref,
-                  int recurse, enum val_prettyprint pretty));
+extern int val_print (struct type * type, char *valaddr,
+                     int embedded_offset, CORE_ADDR address,
+                     struct ui_file * stream, int format,
+                     int deref_ref, int recurse,
+                     enum val_prettyprint pretty);
 
-extern int
-val_print_string PARAMS ((CORE_ADDR addr, int len, int width, GDB_FILE * stream));
+extern int val_print_string (CORE_ADDR addr, int len, int width, struct ui_file *stream);
 
-extern void
-print_variable_value PARAMS ((struct symbol * var, struct frame_info * frame,
-                             GDB_FILE * stream));
+extern void print_variable_value (struct symbol * var,
+                                 struct frame_info * frame,
+                                 struct ui_file *stream);
 
 extern int check_field PARAMS ((value_ptr, const char *));
 
-extern void
-c_typedef_print PARAMS ((struct type * type, struct symbol * news, GDB_FILE * stream));
+extern void c_typedef_print (struct type * type, struct symbol * news,
+                            struct ui_file * stream);
 
 extern char *
   internalvar_name PARAMS ((struct internalvar * var));
@@ -548,6 +554,10 @@ extern value_ptr value_slice PARAMS ((value_ptr, int, int));
 
 extern value_ptr call_function_by_hand PARAMS ((value_ptr, int, value_ptr *));
 
+extern int default_coerce_float_to_double (struct type *, struct type *);
+
+extern int standard_coerce_float_to_double (struct type *, struct type *);
+
 extern value_ptr value_literal_complex PARAMS ((value_ptr, value_ptr, struct type *));
 
 extern void find_rt_vbase_offset PARAMS ((struct type *, struct type *, char *, int, int *, int *));
This page took 0.027562 seconds and 4 git commands to generate.