s/value_ptr/struct value */

This commit is contained in:
Andrew Cagney 2001-10-20 22:43:26 +00:00
parent 8420dfca80
commit c984738146
3 changed files with 39 additions and 28 deletions

View File

@ -1,3 +1,9 @@
2001-10-20 Andrew Cagney <ac131313@redhat.com>
* wrapper.h (struct value): Add opaque declaration. Replace
value_ptr with ``struct value *''.
* wrapper.c: Replace value_ptr with ``struct value *''.
2001-10-20 Andrew Cagney <ac131313@redhat.com> 2001-10-20 Andrew Cagney <ac131313@redhat.com>
* alpha-nat.c: Include <alpha/coreregs.h> instead of * alpha-nat.c: Include <alpha/coreregs.h> instead of

View File

@ -90,7 +90,7 @@ wrap_parse_exp_1 (char *argptr)
} }
int int
gdb_evaluate_expression (struct expression *exp, value_ptr *value) gdb_evaluate_expression (struct expression *exp, struct value **value)
{ {
struct gdb_wrapper_arguments args; struct gdb_wrapper_arguments args;
args.args[0].pointer = exp; args.args[0].pointer = exp;
@ -102,7 +102,7 @@ gdb_evaluate_expression (struct expression *exp, value_ptr *value)
return 0; return 0;
} }
*value = (value_ptr) args.result.pointer; *value = (struct value *) args.result.pointer;
return 1; return 1;
} }
@ -117,7 +117,7 @@ wrap_evaluate_expression (char *a)
} }
int int
gdb_value_fetch_lazy (value_ptr value) gdb_value_fetch_lazy (struct value *value)
{ {
struct gdb_wrapper_arguments args; struct gdb_wrapper_arguments args;
@ -131,12 +131,12 @@ wrap_value_fetch_lazy (char *a)
{ {
struct gdb_wrapper_arguments *args = (struct gdb_wrapper_arguments *) a; struct gdb_wrapper_arguments *args = (struct gdb_wrapper_arguments *) a;
value_fetch_lazy ((value_ptr) (args)->args[0].pointer); value_fetch_lazy ((struct value *) (args)->args[0].pointer);
return 1; return 1;
} }
int int
gdb_value_equal (value_ptr val1, value_ptr val2, int *result) gdb_value_equal (struct value *val1, struct value *val2, int *result)
{ {
struct gdb_wrapper_arguments args; struct gdb_wrapper_arguments args;
@ -158,17 +158,18 @@ static int
wrap_value_equal (char *a) wrap_value_equal (char *a)
{ {
struct gdb_wrapper_arguments *args = (struct gdb_wrapper_arguments *) a; struct gdb_wrapper_arguments *args = (struct gdb_wrapper_arguments *) a;
value_ptr val1, val2; struct value *val1;
struct value *val2;
val1 = (value_ptr) (args)->args[0].pointer; val1 = (struct value *) (args)->args[0].pointer;
val2 = (value_ptr) (args)->args[1].pointer; val2 = (struct value *) (args)->args[1].pointer;
(args)->result.integer = value_equal (val1, val2); (args)->result.integer = value_equal (val1, val2);
return 1; return 1;
} }
int int
gdb_value_assign (value_ptr val1, value_ptr val2, value_ptr *result) gdb_value_assign (struct value *val1, struct value *val2, struct value **result)
{ {
struct gdb_wrapper_arguments args; struct gdb_wrapper_arguments args;
@ -182,7 +183,7 @@ gdb_value_assign (value_ptr val1, value_ptr val2, value_ptr *result)
return 0; return 0;
} }
*result = (value_ptr) args.result.pointer; *result = (struct value *) args.result.pointer;
return 1; return 1;
} }
@ -190,17 +191,18 @@ static int
wrap_value_assign (char *a) wrap_value_assign (char *a)
{ {
struct gdb_wrapper_arguments *args = (struct gdb_wrapper_arguments *) a; struct gdb_wrapper_arguments *args = (struct gdb_wrapper_arguments *) a;
value_ptr val1, val2; struct value *val1;
struct value *val2;
val1 = (value_ptr) (args)->args[0].pointer; val1 = (struct value *) (args)->args[0].pointer;
val2 = (value_ptr) (args)->args[1].pointer; val2 = (struct value *) (args)->args[1].pointer;
(args)->result.pointer = value_assign (val1, val2); (args)->result.pointer = value_assign (val1, val2);
return 1; return 1;
} }
int int
gdb_value_subscript (value_ptr val1, value_ptr val2, value_ptr *rval) gdb_value_subscript (struct value *val1, struct value *val2, struct value **rval)
{ {
struct gdb_wrapper_arguments args; struct gdb_wrapper_arguments args;
@ -214,7 +216,7 @@ gdb_value_subscript (value_ptr val1, value_ptr val2, value_ptr *rval)
return 0; return 0;
} }
*rval = (value_ptr) args.result.pointer; *rval = (struct value *) args.result.pointer;
return 1; return 1;
} }
@ -222,17 +224,18 @@ static int
wrap_value_subscript (char *a) wrap_value_subscript (char *a)
{ {
struct gdb_wrapper_arguments *args = (struct gdb_wrapper_arguments *) a; struct gdb_wrapper_arguments *args = (struct gdb_wrapper_arguments *) a;
value_ptr val1, val2; struct value *val1;
struct value *val2;
val1 = (value_ptr) (args)->args[0].pointer; val1 = (struct value *) (args)->args[0].pointer;
val2 = (value_ptr) (args)->args[1].pointer; val2 = (struct value *) (args)->args[1].pointer;
(args)->result.pointer = value_subscript (val1, val2); (args)->result.pointer = value_subscript (val1, val2);
return 1; return 1;
} }
int int
gdb_value_ind (value_ptr val, value_ptr *rval) gdb_value_ind (struct value *val, struct value **rval)
{ {
struct gdb_wrapper_arguments args; struct gdb_wrapper_arguments args;
@ -245,7 +248,7 @@ gdb_value_ind (value_ptr val, value_ptr *rval)
return 0; return 0;
} }
*rval = (value_ptr) args.result.pointer; *rval = (struct value *) args.result.pointer;
return 1; return 1;
} }
@ -253,9 +256,9 @@ static int
wrap_value_ind (char *opaque_arg) wrap_value_ind (char *opaque_arg)
{ {
struct gdb_wrapper_arguments *args = (struct gdb_wrapper_arguments *) opaque_arg; struct gdb_wrapper_arguments *args = (struct gdb_wrapper_arguments *) opaque_arg;
value_ptr val; struct value *val;
val = (value_ptr) (args)->args[0].pointer; val = (struct value *) (args)->args[0].pointer;
(args)->result.pointer = value_ind (val); (args)->result.pointer = value_ind (val);
return 1; return 1;
} }

View File

@ -19,23 +19,25 @@
#ifndef WRAPPER_H #ifndef WRAPPER_H
#define WRAPPER_H 1 #define WRAPPER_H 1
struct value;
/* Use this struct to pass arguments to wrapper routines. */ /* Use this struct to pass arguments to wrapper routines. */
struct gdb_wrapper_arguments; struct gdb_wrapper_arguments;
extern int gdb_parse_exp_1 (char **, struct block *, extern int gdb_parse_exp_1 (char **, struct block *,
int, struct expression **); int, struct expression **);
extern int gdb_evaluate_expression (struct expression *, value_ptr *); extern int gdb_evaluate_expression (struct expression *, struct value **);
extern int gdb_value_fetch_lazy (value_ptr); extern int gdb_value_fetch_lazy (struct value *);
extern int gdb_value_equal (value_ptr, value_ptr, int *); extern int gdb_value_equal (struct value *, struct value *, int *);
extern int gdb_value_assign (value_ptr, value_ptr, value_ptr *); extern int gdb_value_assign (struct value *, struct value *, struct value **);
extern int gdb_value_subscript (value_ptr, value_ptr, value_ptr *); extern int gdb_value_subscript (struct value *, struct value *, struct value **);
extern int gdb_value_ind (value_ptr val, value_ptr * rval); extern int gdb_value_ind (struct value *val, struct value ** rval);
extern int gdb_parse_and_eval_type (char *, int, struct type **); extern int gdb_parse_and_eval_type (char *, int, struct type **);