This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[patch] s/value_ptr/struct value */ to wrapper.[hc]
- To: gdb-patches at sources dot redhat dot com
- Subject: [patch] s/value_ptr/struct value */ to wrapper.[hc]
- From: ac131313 at localhost dot cygnus dot com (Andrew Cagney)
- Date: Sat, 20 Oct 2001 18:37:45 -0400 (EDT)
Hello,
The attached patch replaces value_ptr with ``struct value *'' in the files
wrapper.[hc]. I'm checking it in as obvious.
Andrew
PS: More will follow over the next few hours. If it does turn out that
I get one of these wrong prudent use of -D ... will let you narrow it down.
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 *''.
Index: wrapper.c
===================================================================
RCS file: /cvs/src/src/gdb/wrapper.c,v
retrieving revision 1.12
diff -p -r1.12 wrapper.c
*** wrapper.c 2001/03/27 20:36:24 1.12
--- wrapper.c 2001/10/20 22:18:04
*************** wrap_parse_exp_1 (char *argptr)
*** 90,96 ****
}
int
! gdb_evaluate_expression (struct expression *exp, value_ptr *value)
{
struct gdb_wrapper_arguments args;
args.args[0].pointer = exp;
--- 90,96 ----
}
int
! gdb_evaluate_expression (struct expression *exp, struct value **value)
{
struct gdb_wrapper_arguments args;
args.args[0].pointer = exp;
*************** gdb_evaluate_expression (struct expressi
*** 102,108 ****
return 0;
}
! *value = (value_ptr) args.result.pointer;
return 1;
}
--- 102,108 ----
return 0;
}
! *value = (struct value *) args.result.pointer;
return 1;
}
*************** wrap_evaluate_expression (char *a)
*** 117,123 ****
}
int
! gdb_value_fetch_lazy (value_ptr value)
{
struct gdb_wrapper_arguments args;
--- 117,123 ----
}
int
! gdb_value_fetch_lazy (struct value *value)
{
struct gdb_wrapper_arguments args;
*************** wrap_value_fetch_lazy (char *a)
*** 131,142 ****
{
struct gdb_wrapper_arguments *args = (struct gdb_wrapper_arguments *) a;
! value_fetch_lazy ((value_ptr) (args)->args[0].pointer);
return 1;
}
int
! gdb_value_equal (value_ptr val1, value_ptr val2, int *result)
{
struct gdb_wrapper_arguments args;
--- 131,142 ----
{
struct gdb_wrapper_arguments *args = (struct gdb_wrapper_arguments *) a;
! value_fetch_lazy ((struct value *) (args)->args[0].pointer);
return 1;
}
int
! gdb_value_equal (struct value *val1, struct value *val2, int *result)
{
struct gdb_wrapper_arguments args;
*************** static int
*** 158,174 ****
wrap_value_equal (char *a)
{
struct gdb_wrapper_arguments *args = (struct gdb_wrapper_arguments *) a;
! value_ptr val1, val2;
! val1 = (value_ptr) (args)->args[0].pointer;
! val2 = (value_ptr) (args)->args[1].pointer;
(args)->result.integer = value_equal (val1, val2);
return 1;
}
int
! gdb_value_assign (value_ptr val1, value_ptr val2, value_ptr *result)
{
struct gdb_wrapper_arguments args;
--- 158,175 ----
wrap_value_equal (char *a)
{
struct gdb_wrapper_arguments *args = (struct gdb_wrapper_arguments *) a;
! struct value *val1;
! struct value *val2;
! val1 = (struct value *) (args)->args[0].pointer;
! val2 = (struct value *) (args)->args[1].pointer;
(args)->result.integer = value_equal (val1, val2);
return 1;
}
int
! gdb_value_assign (struct value *val1, struct value *val2, struct value **result)
{
struct gdb_wrapper_arguments args;
*************** gdb_value_assign (value_ptr val1, value_
*** 182,188 ****
return 0;
}
! *result = (value_ptr) args.result.pointer;
return 1;
}
--- 183,189 ----
return 0;
}
! *result = (struct value *) args.result.pointer;
return 1;
}
*************** static int
*** 190,206 ****
wrap_value_assign (char *a)
{
struct gdb_wrapper_arguments *args = (struct gdb_wrapper_arguments *) a;
! value_ptr val1, val2;
! val1 = (value_ptr) (args)->args[0].pointer;
! val2 = (value_ptr) (args)->args[1].pointer;
(args)->result.pointer = value_assign (val1, val2);
return 1;
}
int
! gdb_value_subscript (value_ptr val1, value_ptr val2, value_ptr *rval)
{
struct gdb_wrapper_arguments args;
--- 191,208 ----
wrap_value_assign (char *a)
{
struct gdb_wrapper_arguments *args = (struct gdb_wrapper_arguments *) a;
! struct value *val1;
! struct value *val2;
! val1 = (struct value *) (args)->args[0].pointer;
! val2 = (struct value *) (args)->args[1].pointer;
(args)->result.pointer = value_assign (val1, val2);
return 1;
}
int
! gdb_value_subscript (struct value *val1, struct value *val2, struct value **rval)
{
struct gdb_wrapper_arguments args;
*************** gdb_value_subscript (value_ptr val1, val
*** 214,220 ****
return 0;
}
! *rval = (value_ptr) args.result.pointer;
return 1;
}
--- 216,222 ----
return 0;
}
! *rval = (struct value *) args.result.pointer;
return 1;
}
*************** static int
*** 222,238 ****
wrap_value_subscript (char *a)
{
struct gdb_wrapper_arguments *args = (struct gdb_wrapper_arguments *) a;
! value_ptr val1, val2;
! val1 = (value_ptr) (args)->args[0].pointer;
! val2 = (value_ptr) (args)->args[1].pointer;
(args)->result.pointer = value_subscript (val1, val2);
return 1;
}
int
! gdb_value_ind (value_ptr val, value_ptr *rval)
{
struct gdb_wrapper_arguments args;
--- 224,241 ----
wrap_value_subscript (char *a)
{
struct gdb_wrapper_arguments *args = (struct gdb_wrapper_arguments *) a;
! struct value *val1;
! struct value *val2;
! val1 = (struct value *) (args)->args[0].pointer;
! val2 = (struct value *) (args)->args[1].pointer;
(args)->result.pointer = value_subscript (val1, val2);
return 1;
}
int
! gdb_value_ind (struct value *val, struct value **rval)
{
struct gdb_wrapper_arguments args;
*************** gdb_value_ind (value_ptr val, value_ptr
*** 245,251 ****
return 0;
}
! *rval = (value_ptr) args.result.pointer;
return 1;
}
--- 248,254 ----
return 0;
}
! *rval = (struct value *) args.result.pointer;
return 1;
}
*************** static int
*** 253,261 ****
wrap_value_ind (char *opaque_arg)
{
struct gdb_wrapper_arguments *args = (struct gdb_wrapper_arguments *) opaque_arg;
! value_ptr val;
! val = (value_ptr) (args)->args[0].pointer;
(args)->result.pointer = value_ind (val);
return 1;
}
--- 256,264 ----
wrap_value_ind (char *opaque_arg)
{
struct gdb_wrapper_arguments *args = (struct gdb_wrapper_arguments *) opaque_arg;
! struct value *val;
! val = (struct value *) (args)->args[0].pointer;
(args)->result.pointer = value_ind (val);
return 1;
}
Index: wrapper.h
===================================================================
RCS file: /cvs/src/src/gdb/wrapper.h,v
retrieving revision 1.10
diff -p -r1.10 wrapper.h
*** wrapper.h 2001/03/06 08:21:18 1.10
--- wrapper.h 2001/10/20 22:18:04
***************
*** 19,41 ****
#ifndef WRAPPER_H
#define WRAPPER_H 1
/* Use this struct to pass arguments to wrapper routines. */
struct gdb_wrapper_arguments;
extern int gdb_parse_exp_1 (char **, struct block *,
int, struct expression **);
! extern int gdb_evaluate_expression (struct expression *, value_ptr *);
! extern int gdb_value_fetch_lazy (value_ptr);
! extern int gdb_value_equal (value_ptr, value_ptr, int *);
! extern int gdb_value_assign (value_ptr, value_ptr, value_ptr *);
! extern int gdb_value_subscript (value_ptr, value_ptr, value_ptr *);
! extern int gdb_value_ind (value_ptr val, value_ptr * rval);
extern int gdb_parse_and_eval_type (char *, int, struct type **);
--- 19,43 ----
#ifndef WRAPPER_H
#define WRAPPER_H 1
+ struct value;
+
/* Use this struct to pass arguments to wrapper routines. */
struct gdb_wrapper_arguments;
extern int gdb_parse_exp_1 (char **, struct block *,
int, struct expression **);
! extern int gdb_evaluate_expression (struct expression *, struct value **);
! extern int gdb_value_fetch_lazy (struct value *);
! extern int gdb_value_equal (struct value *, struct value *, int *);
! extern int gdb_value_assign (struct value *, struct value *, struct value **);
! extern int gdb_value_subscript (struct value *, struct value *, struct value **);
! extern int gdb_value_ind (struct value *val, struct value ** rval);
extern int gdb_parse_and_eval_type (char *, int, struct type **);