OSDN Git Service

s/value_ptr/struct value */
authorcagney <cagney>
Sat, 10 Nov 2001 20:44:37 +0000 (20:44 +0000)
committercagney <cagney>
Sat, 10 Nov 2001 20:44:37 +0000 (20:44 +0000)
gdb/ChangeLog
gdb/c-valprint.c
gdb/ch-lang.c
gdb/ch-valprint.c
gdb/cp-valprint.c
gdb/p-valprint.c
gdb/scm-exp.c
gdb/scm-lang.c
gdb/scm-valprint.c

index 53980ef..b22c7a2 100644 (file)
@@ -1,5 +1,11 @@
 2001-11-10  Andrew Cagney  <ac131313@redhat.com>
 
+       * c-valprint.c, ch-lang.c, ch-valprint.c, cp-valprint.c,
+       p-valprint.c, scm-exp.c, scm-lang.c, scm-valprint.c: Replace
+       value_ptr with struct value.
+       
+2001-11-10  Andrew Cagney  <ac131313@redhat.com>
+
        * eval.c: Replace most occurances of value_ptr with struct value.
 
 2001-11-09  Jim Blandy  <jimb@redhat.com>
index 315d034..c9109f0 100644 (file)
@@ -1,6 +1,6 @@
 /* Support for printing C values for GDB, the GNU debugger.
    Copyright 1986, 1988, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
-   1998, 1999, 2000
+   1998, 1999, 2000, 2001
    Free Software Foundation, Inc.
 
    This file is part of GDB.
@@ -209,7 +209,7 @@ c_val_print (struct type *type, char *valaddr, int embedded_offset,
                }
              if (vt_address && vtblprint)
                {
-                 value_ptr vt_val;
+                 struct value *vt_val;
                  struct symbol *wsym = (struct symbol *) NULL;
                  struct type *wtype;
                  struct symtab *s;
@@ -274,7 +274,7 @@ c_val_print (struct type *type, char *valaddr, int embedded_offset,
        {
          if (TYPE_CODE (elttype) != TYPE_CODE_UNDEF)
            {
-             value_ptr deref_val =
+             struct value *deref_val =
              value_at
              (TYPE_TARGET_TYPE (type),
               unpack_pointer (lookup_pointer_type (builtin_type_void),
@@ -467,7 +467,7 @@ c_val_print (struct type *type, char *valaddr, int embedded_offset,
 }
 \f
 int
-c_value_print (value_ptr val, struct ui_file *stream, int format,
+c_value_print (struct value *val, struct ui_file *stream, int format,
               enum val_prettyprint pretty)
 {
   struct type *type = VALUE_TYPE (val);
@@ -500,7 +500,7 @@ c_value_print (value_ptr val, struct ui_file *stream, int format,
              /* Copy value, change to pointer, so we don't get an
               * error about a non-pointer type in value_rtti_target_type
               */
-             value_ptr temparg;
+             struct value *temparg;
              temparg=value_copy(val);
              VALUE_TYPE (temparg) = lookup_pointer_type(TYPE_TARGET_TYPE(type));
              val=temparg;
index fb6dc41..ec3a76e 100644 (file)
@@ -1,5 +1,5 @@
 /* Chill language support routines for GDB, the GNU debugger.
-   Copyright 1992, 1993, 1994, 1995, 1996, 2000
+   Copyright 1992, 1993, 1994, 1995, 1996, 2000, 2001
    Free Software Foundation, Inc.
 
    This file is part of GDB.
 
 extern void _initialize_chill_language (void);
 
-static value_ptr
-evaluate_subexp_chill (struct type *, struct expression *, int *,
-                      enum noside);
+static struct value *evaluate_subexp_chill (struct type *, struct expression *,
+                                           int *, enum noside);
 
-static value_ptr value_chill_max_min (enum exp_opcode, value_ptr);
+static struct value *value_chill_max_min (enum exp_opcode, struct value *);
 
-static value_ptr value_chill_card (value_ptr);
+static struct value *value_chill_card (struct value *);
 
-static value_ptr value_chill_length (value_ptr);
+static struct value *value_chill_length (struct value *);
 
 static struct type *chill_create_fundamental_type (struct objfile *, int);
 
@@ -389,8 +388,8 @@ type_lower_upper (enum exp_opcode op,       /* Either UNOP_LOWER or UNOP_UPPER */
   error ("unknown mode for LOWER/UPPER builtin");
 }
 
-static value_ptr
-value_chill_length (value_ptr val)
+static struct value *
+value_chill_length (struct value *val)
 {
   LONGEST tmp;
   struct type *type = VALUE_TYPE (val);
@@ -417,8 +416,8 @@ value_chill_length (value_ptr val)
   return value_from_longest (builtin_type_int, tmp);
 }
 
-static value_ptr
-value_chill_card (value_ptr val)
+static struct value *
+value_chill_card (struct value *val)
 {
   LONGEST tmp = 0;
   struct type *type = VALUE_TYPE (val);
@@ -441,8 +440,8 @@ value_chill_card (value_ptr val)
   return value_from_longest (builtin_type_int, tmp);
 }
 
-static value_ptr
-value_chill_max_min (enum exp_opcode op, value_ptr val)
+static struct value *
+value_chill_max_min (enum exp_opcode op, struct value *val)
 {
   LONGEST tmp = 0;
   struct type *type = VALUE_TYPE (val);
@@ -494,7 +493,7 @@ value_chill_max_min (enum exp_opcode op, value_ptr val)
                             tmp);
 }
 
-static value_ptr
+static struct value *
 evaluate_subexp_chill (struct type *expect_type,
                       register struct expression *exp, register int *pos,
                       enum noside noside)
@@ -502,8 +501,8 @@ evaluate_subexp_chill (struct type *expect_type,
   int pc = *pos;
   struct type *type;
   int tem, nargs;
-  value_ptr arg1;
-  value_ptr *argvec;
+  struct value *arg1;
+  struct value **argvec;
   enum exp_opcode op = exp->elts[*pos].opcode;
   switch (op)
     {
@@ -518,7 +517,8 @@ evaluate_subexp_chill (struct type *expect_type,
       if (nargs == 1 && TYPE_CODE (type) == TYPE_CODE_INT)
        {
          /* Looks like string repetition. */
-         value_ptr string = evaluate_subexp_with_coercion (exp, pos, noside);
+         struct value *string = evaluate_subexp_with_coercion (exp, pos,
+                                                               noside);
          return value_concat (arg1, string);
        }
 
@@ -556,7 +556,8 @@ evaluate_subexp_chill (struct type *expect_type,
 
       while (nargs-- > 0)
        {
-         value_ptr index = evaluate_subexp_with_coercion (exp, pos, noside);
+         struct value *index = evaluate_subexp_with_coercion (exp, pos,
+                                                              noside);
          arg1 = value_subscript (arg1, index);
        }
       return (arg1);
index 0a893eb..77109b5 100644 (file)
@@ -1,6 +1,6 @@
 /* Support for printing Chill values for GDB, the GNU debugger.
    Copyright 1986, 1988, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
-   1998, 2000
+   1998, 2000, 2001
    Free Software Foundation, Inc.
 
    This file is part of GDB.
@@ -445,7 +445,7 @@ chill_val_print (struct type *type, char *valaddr, int embedded_offset,
        {
          if (TYPE_CODE (TYPE_TARGET_TYPE (type)) != TYPE_CODE_UNDEF)
            {
-             value_ptr deref_val =
+             struct value *deref_val =
              value_at
              (TYPE_TARGET_TYPE (type),
               unpack_pointer (lookup_pointer_type (builtin_type_void),
@@ -537,7 +537,7 @@ chill_print_value_fields (struct type *type, char *valaddr,
          fputs_filtered (": ", stream);
          if (TYPE_FIELD_PACKED (type, i))
            {
-             value_ptr v;
+             struct value *v;
 
              /* Bitfields require special handling, especially due to byte
                 order problems.  */
@@ -564,7 +564,7 @@ chill_print_value_fields (struct type *type, char *valaddr,
 }
 \f
 int
-chill_value_print (value_ptr val, struct ui_file *stream, int format,
+chill_value_print (struct value *val, struct ui_file *stream, int format,
                   enum val_prettyprint pretty)
 {
   struct type *type = VALUE_TYPE (val);
index 6b01e0c..a4f8106 100644 (file)
@@ -1,6 +1,6 @@
 /* Support for printing C++ values for GDB, the GNU debugger.
    Copyright 1986, 1988, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
-   2000
+   2000, 2001
    Free Software Foundation, Inc.
 
    This file is part of GDB.
@@ -48,7 +48,7 @@ static struct obstack dont_print_statmem_obstack;
 
 extern void _initialize_cp_valprint (void);
 
-static void cp_print_static_field (struct type *, value_ptr,
+static void cp_print_static_field (struct type *, struct value *,
                                   struct ui_file *, int, int,
                                   enum val_prettyprint);
 
@@ -57,7 +57,7 @@ static void cp_print_value (struct type *, struct type *, char *, int,
                            enum val_prettyprint, struct type **);
 
 static void cp_print_hpacc_virtual_table_entries (struct type *, int *,
-                                                 value_ptr,
+                                                 struct value *,
                                                  struct ui_file *, int,
                                                  int,
                                                  enum val_prettyprint);
@@ -348,7 +348,7 @@ cp_print_value_fields (struct type *type, struct type *real_type, char *valaddr,
 
          if (!TYPE_FIELD_STATIC (type, i) && TYPE_FIELD_PACKED (type, i))
            {
-             value_ptr v;
+             struct value *v;
 
              /* Bitfields require special handling, especially due to byte
                 order problems.  */
@@ -374,7 +374,7 @@ cp_print_value_fields (struct type *type, struct type *real_type, char *valaddr,
                }
              else if (TYPE_FIELD_STATIC (type, i))
                {
-                 value_ptr v = value_static_field (type, i);
+                 struct value *v = value_static_field (type, i);
                  if (v == NULL)
                    fputs_filtered ("<optimized out>", stream);
                  else
@@ -413,7 +413,7 @@ cp_print_value_fields (struct type *type, struct type *real_type, char *valaddr,
                 hpacc_vtbl_ptr_name, 
                 5))
     {
-      value_ptr v;
+      struct value *v;
       /* First get the virtual table pointer and print it out */
 
 #if 0
@@ -627,7 +627,7 @@ cp_print_value (struct type *type, struct type *real_type, char *valaddr,
 
 static void
 cp_print_static_field (struct type *type,
-                      value_ptr val,
+                      struct value *val,
                       struct ui_file *stream,
                       int format,
                       int recurse,
@@ -745,7 +745,7 @@ cp_print_class_member (char *valaddr, struct type *domain,
 
 static void
 cp_print_hpacc_virtual_table_entries (struct type *type, int *vfuncs,
-                                     value_ptr v, struct ui_file *stream,
+                                     struct value *v, struct ui_file *stream,
                                      int format, int recurse,
                                      enum val_prettyprint pretty)
 {
@@ -774,7 +774,7 @@ cp_print_hpacc_virtual_table_entries (struct type *type, int *vfuncs,
                    - 1);
 
          /* Get the address of the vfunction entry */
-         value_ptr vf = value_copy (v);
+         struct value *vf = value_copy (v);
          if (VALUE_LAZY (vf))
            (void) value_fetch_lazy (vf);
          /* adjust by offset */
index 78b941a..29503a0 100644 (file)
@@ -1,5 +1,5 @@
 /* Support for printing Pascal values for GDB, the GNU debugger.
-   Copyright 2000
+   Copyright 2000, 2001
    Free Software Foundation, Inc.
 
    This file is part of GDB.
@@ -217,7 +217,7 @@ pascal_val_print (struct type *type, char *valaddr, int embedded_offset,
                }
              if (vt_address && vtblprint)
                {
-                 value_ptr vt_val;
+                 struct value *vt_val;
                  struct symbol *wsym = (struct symbol *) NULL;
                  struct type *wtype;
                  struct symtab *s;
@@ -282,7 +282,7 @@ pascal_val_print (struct type *type, char *valaddr, int embedded_offset,
        {
          if (TYPE_CODE (elttype) != TYPE_CODE_UNDEF)
            {
-             value_ptr deref_val =
+             struct value *deref_val =
              value_at
              (TYPE_TARGET_TYPE (type),
               unpack_pointer (lookup_pointer_type (builtin_type_void),
@@ -531,7 +531,7 @@ pascal_val_print (struct type *type, char *valaddr, int embedded_offset,
 }
 \f
 int
-pascal_value_print (value_ptr val, struct ui_file *stream, int format,
+pascal_value_print (struct value *val, struct ui_file *stream, int format,
                    enum val_prettyprint pretty)
 {
   struct type *type = VALUE_TYPE (val);
@@ -579,9 +579,9 @@ static int pascal_static_field_print;       /* Controls printing of static fields. */
 static struct obstack dont_print_vb_obstack;
 static struct obstack dont_print_statmem_obstack;
 
-static void
-  pascal_object_print_static_field (struct type *, value_ptr, struct ui_file *, int, int,
-                                   enum val_prettyprint);
+static void pascal_object_print_static_field (struct type *, struct value *,
+                                             struct ui_file *, int, int,
+                                             enum val_prettyprint);
 
 static void
   pascal_object_print_value (struct type *, char *, CORE_ADDR, struct ui_file *,
@@ -834,7 +834,7 @@ pascal_object_print_value_fields (struct type *type, char *valaddr,
 
          if (!TYPE_FIELD_STATIC (type, i) && TYPE_FIELD_PACKED (type, i))
            {
-             value_ptr v;
+             struct value *v;
 
              /* Bitfields require special handling, especially due to byte
                 order problems.  */
@@ -859,8 +859,8 @@ pascal_object_print_value_fields (struct type *type, char *valaddr,
                }
              else if (TYPE_FIELD_STATIC (type, i))
                {
-                 /* value_ptr v = value_static_field (type, i); v4.17 specific */
-                 value_ptr v;
+                 /* struct value *v = value_static_field (type, i); v4.17 specific */
+                 struct value *v;
                  v = value_from_longest (TYPE_FIELD_TYPE (type, i),
                                   unpack_field_as_long (type, valaddr, i));
 
@@ -1011,7 +1011,7 @@ pascal_object_print_value (struct type *type, char *valaddr, CORE_ADDR address,
    have the same meanings as in c_val_print.  */
 
 static void
-pascal_object_print_static_field (struct type *type, value_ptr val,
+pascal_object_print_static_field (struct type *type, struct value *val,
                                  struct ui_file *stream, int format,
                                  int recurse, enum val_prettyprint pretty)
 {
index 14aeabd..7464ecf 100644 (file)
@@ -308,7 +308,7 @@ tryagain:
       scm_lreadr (skipping);
       if (!skipping)
        {
-         value_ptr val = scm_evaluate_string (str.ptr, lexptr - str.ptr);
+         struct value *val = scm_evaluate_string (str.ptr, lexptr - str.ptr);
          if (!is_scmvalue_type (VALUE_TYPE (val)))
            error ("quoted scm form yields non-SCM value");
          svalue = extract_signed_integer (VALUE_CONTENTS (val),
index 6a02314..ab71c83 100644 (file)
@@ -1,5 +1,6 @@
 /* Scheme/Guile language support routines for GDB, the GNU debugger.
-   Copyright 1995, 1996, 1998, 2000 Free Software Foundation, Inc.
+   Copyright 1995, 1996, 1998, 2000, 2001
+   Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -32,9 +33,9 @@
 #include "gdbcore.h"
 
 extern void _initialize_scheme_language (void);
-static value_ptr evaluate_subexp_scm (struct type *, struct expression *,
+static struct value *evaluate_subexp_scm (struct type *, struct expression *,
                                      int *, enum noside);
-static value_ptr scm_lookup_name (char *);
+static struct value *scm_lookup_name (char *);
 static int in_eval_c (void);
 static void scm_printstr (struct ui_file * stream, char *string,
                          unsigned int length, int width,
@@ -146,12 +147,13 @@ in_eval_c (void)
    First lookup in Scheme context (using the scm_lookup_cstr inferior
    function), then try lookup_symbol for compiled variables. */
 
-static value_ptr
+static struct value *
 scm_lookup_name (char *str)
 {
   value_ptr args[3];
   int len = strlen (str);
-  value_ptr func, val;
+  struct value *func;
+  struct value *val;
   struct symbol *sym;
   args[0] = value_allocate_space_in_inferior (len);
   args[1] = value_from_longest (builtin_type_int, len);
@@ -181,11 +183,11 @@ scm_lookup_name (char *str)
   error ("No symbol \"%s\" in current context.");
 }
 
-value_ptr
+struct value *
 scm_evaluate_string (char *str, int len)
 {
-  value_ptr func;
-  value_ptr addr = value_allocate_space_in_inferior (len + 1);
+  struct value *func;
+  struct value *addr = value_allocate_space_in_inferior (len + 1);
   LONGEST iaddr = value_as_long (addr);
   write_memory (iaddr, str, len);
   /* FIXME - should find and pass env */
@@ -194,7 +196,7 @@ scm_evaluate_string (char *str, int len)
   return call_function_by_hand (func, 1, &addr);
 }
 
-static value_ptr
+static struct value *
 evaluate_subexp_scm (struct type *expect_type, register struct expression *exp,
                     register int *pos, enum noside noside)
 {
index 14103dc..737bafa 100644 (file)
@@ -1,5 +1,6 @@
 /* Scheme/Guile language support routines for GDB, the GNU debugger.
-   Copyright 1995, 1996, 1998, 1999, 2000 Free Software Foundation, Inc.
+   Copyright 1995, 1996, 1998, 1999, 2000, 2001
+   Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -386,7 +387,7 @@ scm_val_print (struct type *type, char *valaddr, int embedded_offset,
 }
 
 int
-scm_value_print (value_ptr val, struct ui_file *stream, int format,
+scm_value_print (struct value *val, struct ui_file *stream, int format,
                 enum val_prettyprint pretty)
 {
   return (val_print (VALUE_TYPE (val), VALUE_CONTENTS (val), 0,