summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2001-11-10 21:34:56 +0000
committerAndrew Cagney <cagney@redhat.com>2001-11-10 21:34:56 +0000
commit81a78e46ed096779ad2e440e9ad0ef68a36aa21e (patch)
treee4ef54f7dc4f536603ccae644e7f9131c26f1d2f
parent409c3a54148befd6e9e031dd0a969becf5bbdb94 (diff)
downloadgdb-81a78e46ed096779ad2e440e9ad0ef68a36aa21e.tar.gz
s/value_ptr/struct value */
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/c-valprint.c10
-rw-r--r--gdb/ch-lang.c37
-rw-r--r--gdb/ch-valprint.c8
-rw-r--r--gdb/cp-valprint.c18
-rw-r--r--gdb/expprint.c2
-rw-r--r--gdb/findvar.c22
-rw-r--r--gdb/gnu-nat.c6
-rw-r--r--gdb/infcmd.c2
-rw-r--r--gdb/language.c10
-rw-r--r--gdb/linespec.c2
-rw-r--r--gdb/p-valprint.c22
-rw-r--r--gdb/printcmd.c20
-rw-r--r--gdb/scm-exp.c2
-rw-r--r--gdb/scm-lang.c20
-rw-r--r--gdb/scm-valprint.c5
-rw-r--r--gdb/stack.c4
-rw-r--r--gdb/top.c4
-rw-r--r--gdb/typeprint.c6
-rw-r--r--gdb/valprint.c2
20 files changed, 109 insertions, 99 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index b22c7a2bb93..97fc046f944 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,11 @@
2001-11-10 Andrew Cagney <ac131313@redhat.com>
+ * printcmd.c, valprint.c, language.c, linespec.c, infcmd.c,
+ gnu-nat.c, findvar.c, expprint.c, typeprint.c, stack.c, top.c:
+ Replace value_ptr with struct value.
+
+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.
diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c
index 315d03479de..c9109f0fb80 100644
--- a/gdb/c-valprint.c
+++ b/gdb/c-valprint.c
@@ -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,
}
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;
diff --git a/gdb/ch-lang.c b/gdb/ch-lang.c
index fb6dc419e83..ec3a76e928c 100644
--- a/gdb/ch-lang.c
+++ b/gdb/ch-lang.c
@@ -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.
@@ -31,15 +31,14 @@
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);
diff --git a/gdb/ch-valprint.c b/gdb/ch-valprint.c
index 0a893eb79d6..77109b5713b 100644
--- a/gdb/ch-valprint.c
+++ b/gdb/ch-valprint.c
@@ -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,
}
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);
diff --git a/gdb/cp-valprint.c b/gdb/cp-valprint.c
index 6b01e0c60e6..a4f81061bf3 100644
--- a/gdb/cp-valprint.c
+++ b/gdb/cp-valprint.c
@@ -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 */
diff --git a/gdb/expprint.c b/gdb/expprint.c
index 0603dddbbdb..cb617113971 100644
--- a/gdb/expprint.c
+++ b/gdb/expprint.c
@@ -62,7 +62,7 @@ print_subexp (register struct expression *exp, register int *pos,
enum precedence myprec = PREC_NULL;
/* Set to 1 for a right-associative operator. */
int assoc = 0;
- value_ptr val;
+ struct value *val;
char *tempstr = NULL;
op_print_tab = exp->language_defn->la_op_print_tab;
diff --git a/gdb/findvar.c b/gdb/findvar.c
index 43e4b60a796..b9b9be47b36 100644
--- a/gdb/findvar.c
+++ b/gdb/findvar.c
@@ -295,12 +295,12 @@ store_typed_address (void *buf, struct type *type, CORE_ADDR addr)
NOTE: returns NULL if register value is not available.
Caller will check return value or die! */
-value_ptr
+struct value *
value_of_register (int regnum)
{
CORE_ADDR addr;
int optim;
- register value_ptr reg_val;
+ struct value *reg_val;
char *raw_buffer = (char*) alloca (MAX_REGISTER_RAW_SIZE);
enum lval_type lval;
@@ -412,10 +412,10 @@ symbol_read_needs_frame (struct symbol *sym)
If the variable cannot be found, return a zero pointer.
If FRAME is NULL, use the selected_frame. */
-value_ptr
+struct value *
read_var_value (register struct symbol *var, struct frame_info *frame)
{
- register value_ptr v;
+ register struct value *v;
struct type *type = SYMBOL_TYPE (var);
CORE_ADDR addr;
register int len;
@@ -523,7 +523,7 @@ addresses have not been bound by the dynamic loader. Try again when executable i
case LOC_BASEREG_ARG:
case LOC_THREAD_LOCAL_STATIC:
{
- value_ptr regval;
+ struct value *regval;
regval = value_from_register (lookup_pointer_type (type),
SYMBOL_BASEREG (var), frame);
@@ -552,7 +552,7 @@ addresses have not been bound by the dynamic loader. Try again when executable i
{
struct block *b;
int regno = SYMBOL_VALUE (var);
- value_ptr regval;
+ struct value *regval;
if (frame == NULL)
return 0;
@@ -617,13 +617,13 @@ addresses have not been bound by the dynamic loader. Try again when executable i
NOTE: returns NULL if register value is not available.
Caller will check return value or die! */
-value_ptr
+struct value *
value_from_register (struct type *type, int regnum, struct frame_info *frame)
{
char *raw_buffer = (char*) alloca (MAX_REGISTER_RAW_SIZE);
CORE_ADDR addr;
int optim;
- value_ptr v = allocate_value (type);
+ struct value *v = allocate_value (type);
char *value_bytes = 0;
int value_bytes_copied = 0;
int num_storage_locs;
@@ -840,12 +840,12 @@ value_from_register (struct type *type, int regnum, struct frame_info *frame)
return a (pointer to a) struct value containing the properly typed
address. */
-value_ptr
+struct value *
locate_var_value (register struct symbol *var, struct frame_info *frame)
{
CORE_ADDR addr = 0;
struct type *type = SYMBOL_TYPE (var);
- value_ptr lazy_value;
+ struct value *lazy_value;
/* Evaluate it first; if the result is a memory address, we're fine.
Lazy evaluation pays off here. */
@@ -857,7 +857,7 @@ locate_var_value (register struct symbol *var, struct frame_info *frame)
if (VALUE_LAZY (lazy_value)
|| TYPE_CODE (type) == TYPE_CODE_FUNC)
{
- value_ptr val;
+ struct value *val;
addr = VALUE_ADDRESS (lazy_value);
val = value_from_pointer (lookup_pointer_type (type), addr);
diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c
index 0e584e9fc5d..fb020b15695 100644
--- a/gdb/gnu-nat.c
+++ b/gdb/gnu-nat.c
@@ -1,5 +1,5 @@
/* Interface GDB to the GNU Hurd.
- Copyright 1992, 1995, 1996, 1997, 1998, 1999, 2000
+ Copyright 1992, 1995, 1996, 1997, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
This file is part of GDB.
@@ -2957,14 +2957,14 @@ static void
info_port_rights (char *args, mach_port_type_t only)
{
struct inf *inf = active_inf ();
- value_ptr vmark = value_mark ();
+ struct value *vmark = value_mark ();
if (args)
/* Explicit list of port rights. */
{
while (*args)
{
- value_ptr val = parse_to_comma_and_eval (&args);
+ struct value *val = parse_to_comma_and_eval (&args);
long right = value_as_long (val);
error_t err =
print_port_info (right, 0, inf->task->port, PORTINFO_DETAILS,
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index 482db0f26a4..67c57d0373b 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -1023,7 +1023,7 @@ until_command (char *arg, int from_tty)
static void
print_return_value (int structure_return, struct type *value_type)
{
- register value_ptr value;
+ struct value *value;
#ifdef UI_OUT
static struct ui_stream *stb = NULL;
#endif /* UI_OUT */
diff --git a/gdb/language.c b/gdb/language.c
index 117bd2e608f..a183aa55a9c 100644
--- a/gdb/language.c
+++ b/gdb/language.c
@@ -96,7 +96,7 @@ static int unk_lang_val_print (struct type *, char *, int, CORE_ADDR,
struct ui_file *, int, int, int,
enum val_prettyprint);
-static int unk_lang_value_print (value_ptr, struct ui_file *, int, enum val_prettyprint);
+static int unk_lang_value_print (struct value *, struct ui_file *, int, enum val_prettyprint);
/* Forward declaration */
extern const struct language_defn unknown_language_defn;
@@ -537,7 +537,7 @@ language_info (int quietly)
#if 0 /* Currently unused */
struct type *
-binop_result_type (value_ptr v1, value_ptr v2)
+binop_result_type (struct value *v1, struct value *v2)
{
int size, uns;
struct type *t1 = check_typedef (VALUE_TYPE (v1));
@@ -1049,7 +1049,7 @@ lang_bool_type (void)
/* Returns non-zero if the value VAL represents a true value. */
int
-value_true (value_ptr val)
+value_true (struct value *val)
{
/* It is possible that we should have some sort of error if a non-boolean
value is used in this context. Possibly dependent on some kind of
@@ -1066,7 +1066,7 @@ value_true (value_ptr val)
#if 0 /* Currently unused */
void
-binop_type_check (value_ptr arg1, value_ptr arg2, int op)
+binop_type_check (struct value *arg1, struct value *arg2, int op)
{
struct type *t1, *t2;
@@ -1457,7 +1457,7 @@ unk_lang_val_print (struct type *type, char *valaddr, int embedded_offset,
}
static int
-unk_lang_value_print (value_ptr val, struct ui_file *stream, int format,
+unk_lang_value_print (struct value *val, struct ui_file *stream, int format,
enum val_prettyprint pretty)
{
error ("internal error - unimplemented function unk_lang_value_print called.");
diff --git a/gdb/linespec.c b/gdb/linespec.c
index e23479035d3..3f7f5a5c721 100644
--- a/gdb/linespec.c
+++ b/gdb/linespec.c
@@ -1082,7 +1082,7 @@ decode_line_1 (char **argptr, int funfirstline, struct symtab *default_symtab,
if (*copy == '$')
{
- value_ptr valx;
+ struct value *valx;
int index = 0;
int need_canonical = 0;
diff --git a/gdb/p-valprint.c b/gdb/p-valprint.c
index 78b941a4754..29503a093e0 100644
--- a/gdb/p-valprint.c
+++ b/gdb/p-valprint.c
@@ -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,
}
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)
{
diff --git a/gdb/printcmd.c b/gdb/printcmd.c
index c798767c85d..2486ba7fa95 100644
--- a/gdb/printcmd.c
+++ b/gdb/printcmd.c
@@ -75,7 +75,7 @@ static CORE_ADDR last_examine_address;
/* Contents of last address examined.
This is not valid past the end of the `x' command! */
-static value_ptr last_examine_value;
+static struct value *last_examine_value;
/* Largest offset between a symbolic value and an address, that will be
printed as `0x1234 <symbol+offset>'. */
@@ -172,7 +172,7 @@ static void validate_format (struct format_data, char *);
static void do_examine (struct format_data, CORE_ADDR addr,
asection * section);
-static void print_formatted (value_ptr, int, int, struct ui_file *);
+static void print_formatted (struct value *, int, int, struct ui_file *);
static struct format_data decode_format (char **, int, int);
@@ -280,7 +280,7 @@ decode_format (char **string_ptr, int oformat, int osize)
This is used to pad hex numbers so they line up. */
static void
-print_formatted (register value_ptr val, register int format, int size,
+print_formatted (struct value *val, register int format, int size,
struct ui_file *stream)
{
struct type *type = check_typedef (VALUE_TYPE (val));
@@ -894,7 +894,7 @@ print_command_1 (char *exp, int inspect, int voidprint)
struct expression *expr;
register struct cleanup *old_chain = 0;
register char format = 0;
- register value_ptr val;
+ struct value *val;
struct format_data fmt;
int cleanup = 0;
@@ -932,7 +932,7 @@ print_command_1 (char *exp, int inspect, int voidprint)
&& (TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_STRUCT
|| TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_UNION))
{
- value_ptr v;
+ struct value *v;
v = value_from_vtable_info (val, TYPE_TARGET_TYPE (type));
if (v != 0)
@@ -1012,7 +1012,7 @@ output_command (char *exp, int from_tty)
struct expression *expr;
register struct cleanup *old_chain;
register char format = 0;
- register value_ptr val;
+ struct value *val;
struct format_data fmt;
if (exp && *exp == '/')
@@ -1563,7 +1563,7 @@ do_one_display (struct display *d)
if (d->format.size)
{
CORE_ADDR addr;
- value_ptr val;
+ struct value *val;
annotate_display_format ();
@@ -1765,7 +1765,7 @@ void
print_variable_value (struct symbol *var, struct frame_info *frame,
struct ui_file *stream)
{
- value_ptr val = read_var_value (var, frame);
+ struct value *val = read_var_value (var, frame);
value_print (val, stream, 0, Val_pretty_default);
}
@@ -1786,7 +1786,7 @@ print_frame_args (struct symbol *func, struct frame_info *fi, int num,
int first = 1;
register int i;
register struct symbol *sym;
- register value_ptr val;
+ struct value *val;
/* Offset of next stack argument beyond the one we have seen that is
at the highest offset.
-1 if we haven't come to a stack argument yet. */
@@ -2036,7 +2036,7 @@ printf_command (char *arg, int from_tty)
register char *f = NULL;
register char *s = arg;
char *string = NULL;
- value_ptr *val_args;
+ struct value **val_args;
char *substrings;
char *current_substring;
int nargs = 0;
diff --git a/gdb/scm-exp.c b/gdb/scm-exp.c
index 14aeabd1a45..7464ecfc6bf 100644
--- a/gdb/scm-exp.c
+++ b/gdb/scm-exp.c
@@ -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),
diff --git a/gdb/scm-lang.c b/gdb/scm-lang.c
index 6a023146d62..ab71c831b0d 100644
--- a/gdb/scm-lang.c
+++ b/gdb/scm-lang.c
@@ -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)
{
diff --git a/gdb/scm-valprint.c b/gdb/scm-valprint.c
index 14103dc28b8..737bafab01f 100644
--- a/gdb/scm-valprint.c
+++ b/gdb/scm-valprint.c
@@ -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,
diff --git a/gdb/stack.c b/gdb/stack.c
index d7808547342..8300c65e249 100644
--- a/gdb/stack.c
+++ b/gdb/stack.c
@@ -695,7 +695,7 @@ parse_frame_specification (char *frame_exp)
addr_string = savestring (frame_exp, p - frame_exp);
{
- value_ptr vp;
+ struct value *vp;
tmp_cleanup = make_cleanup (xfree, addr_string);
@@ -1757,7 +1757,7 @@ return_command (char *retval_exp, int from_tty)
CORE_ADDR selected_frame_addr;
CORE_ADDR selected_frame_pc;
struct frame_info *frame;
- value_ptr return_value = NULL;
+ struct value *return_value = NULL;
if (selected_frame == NULL)
error ("No selected frame.");
diff --git a/gdb/top.c b/gdb/top.c
index 3798a3b7ce9..dfb33a94255 100644
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -1339,7 +1339,7 @@ get_prompt_1 (void *data)
/* formatted prompt */
{
char fmt[40], *promptp, *outp, *tmp;
- value_ptr arg_val;
+ struct value *arg_val;
DOUBLEST doubleval;
LONGEST longval;
CORE_ADDR addrval;
@@ -1621,7 +1621,7 @@ quit_force (char *args, int from_tty)
value of that expression. */
if (args)
{
- value_ptr val = parse_and_eval (args);
+ struct value *val = parse_and_eval (args);
exit_code = (int) value_as_long (val);
}
diff --git a/gdb/typeprint.c b/gdb/typeprint.c
index 7ea7098c819..b56610d3ac0 100644
--- a/gdb/typeprint.c
+++ b/gdb/typeprint.c
@@ -1,6 +1,6 @@
/* Language independent support for printing types for GDB, the GNU debugger.
Copyright 1986, 1988, 1989, 1991, 1992, 1993, 1994, 1995, 1998, 1999,
- 2000 Free Software Foundation, Inc.
+ 2000, 2001 Free Software Foundation, Inc.
This file is part of GDB.
@@ -126,7 +126,7 @@ static void
whatis_exp (char *exp, int show)
{
struct expression *expr;
- register value_ptr val;
+ struct value *val;
register struct cleanup *old_chain = NULL;
struct type *real_type = NULL;
struct type *type;
@@ -333,7 +333,7 @@ print_type_scalar (struct type *type, LONGEST val, struct ui_file *stream)
void
maintenance_print_type (char *typename, int from_tty)
{
- register value_ptr val;
+ struct value *val;
register struct type *type;
register struct cleanup *old_chain;
struct expression *expr;
diff --git a/gdb/valprint.c b/gdb/valprint.c
index 3feb91564d0..21f681d43d7 100644
--- a/gdb/valprint.c
+++ b/gdb/valprint.c
@@ -159,7 +159,7 @@ val_print (struct type *type, char *valaddr, int embedded_offset,
the number of string bytes printed. */
int
-value_print (value_ptr val, struct ui_file *stream, int format,
+value_print (struct value *val, struct ui_file *stream, int format,
enum val_prettyprint pretty)
{
if (val == 0)