daily update
[external/binutils.git] / gdb / value.h
index bbf662d..6086917 100644 (file)
@@ -1,14 +1,14 @@
 /* Definitions for values of C expressions, for GDB.
 
    Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995,
-   1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
-   Free Software Foundation, Inc.
+   1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+   2008 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
+   the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
@@ -17,9 +17,7 @@
    GNU General Public License for more details.
 
    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., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.  */
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #if !defined (VALUE_H)
 #define VALUE_H 1
@@ -64,8 +62,8 @@ extern int value_bitsize (struct value *);
 extern void set_value_bitsize (struct value *, int bit);
 
 /* Only used for bitfields; position of start of field.  For
-   BITS_BIG_ENDIAN=0 targets, it is the position of the LSB.  For
-   BITS_BIG_ENDIAN=1 targets, it is the position of the MSB.  */
+   gdbarch_bits_big_endian=0 targets, it is the position of the LSB.  For
+   gdbarch_bits_big_endian=1 targets, it is the position of the MSB.  */
 
 extern int value_bitpos (struct value *);
 extern void set_value_bitpos (struct value *, int bit);
@@ -193,6 +191,12 @@ extern int value_contents_equal (struct value *val1, struct value *val2);
 extern int value_optimized_out (struct value *value);
 extern void set_value_optimized_out (struct value *value, int val);
 
+/* Set or return field indicating whether a variable is initialized or
+   not, based on debugging information supplied by the compiler. 
+   1 = initialized; 0 = uninitialized.  */
+extern int value_initialized (struct value *);
+extern void set_value_initialized (struct value *, int);
+
 /* While the following fields are per- VALUE .CONTENT .PIECE (i.e., a
    single value might have multiple LVALs), this hacked interface is
    limited to just the first PIECE.  Expect further change.  */
@@ -276,6 +280,8 @@ extern void pack_long (gdb_byte *buf, struct type *type, LONGEST num);
 extern struct value *value_from_longest (struct type *type, LONGEST num);
 extern struct value *value_from_pointer (struct type *type, CORE_ADDR addr);
 extern struct value *value_from_double (struct type *type, DOUBLEST num);
+extern struct value *value_from_decfloat (struct type *type,
+                                         const gdb_byte *decbytes);
 extern struct value *value_from_string (char *string);
 
 extern struct value *value_at (struct type *type, CORE_ADDR addr);
@@ -398,7 +404,7 @@ extern struct value *value_in (struct value *element, struct value *set);
 extern int value_bit_index (struct type *type, const gdb_byte *addr,
                            int index);
 
-extern int using_struct_return (struct type *value_type, int gcc_p);
+extern int using_struct_return (struct type *value_type);
 
 extern struct value *evaluate_expression (struct expression *exp);
 
@@ -430,6 +436,10 @@ extern void set_internalvar_component (struct internalvar *var,
                                       int bitpos, int bitsize,
                                       struct value *newvalue);
 
+extern struct internalvar *lookup_only_internalvar (char *name);
+
+extern struct internalvar *create_internalvar (char *name);
+
 extern struct internalvar *lookup_internalvar (char *name);
 
 extern int value_equal (struct value *arg1, struct value *arg2);
@@ -484,6 +494,9 @@ extern void print_longest (struct ui_file *stream, int format,
 extern void print_floating (const gdb_byte *valaddr, struct type *type,
                            struct ui_file *stream);
 
+extern void print_decimal_floating (const gdb_byte *valaddr, struct type *type,
+                                   struct ui_file *stream);
+
 extern int value_print (struct value *val, struct ui_file *stream, int format,
                        enum val_prettyprint pretty);
 
@@ -533,9 +546,6 @@ extern struct value *value_slice (struct value *, int, int);
 extern struct value *value_literal_complex (struct value *, struct value *,
                                            struct type *);
 
-extern void find_rt_vbase_offset (struct type *, struct type *,
-                                 const gdb_byte *, int, int *, int *);
-
 extern struct value *find_function_in_inferior (const char *);
 
 extern struct value *value_allocate_space_in_inferior (int);