+2001-10-30 Keith Seitz <keiths@redhat.com>
+
+ * wrapper.h (gdb_value_struct_elt): New function.
+ * wrapper.c (gdb_value_struct_elt): Ditto.
+ (do_captured_value_struct_elt): Ditto.
+
2001-10-30 Andrew Cagney <ac131313@redhat.com>
* README, NEWS: Update for 5.1.
} args[10];
};
+struct captured_value_struct_elt_args
+{
+ struct value **argp;
+ struct value **args;
+ char *name;
+ int *static_memfuncp;
+ char *err;
+ struct value **result_ptr;
+};
+
static int wrap_parse_exp_1 (char *);
static int wrap_evaluate_expression (char *);
static int wrap_value_ind (char *opaque_arg);
+static int do_captured_value_struct_elt (struct ui_out *uiout, void *data);
+
static int wrap_parse_and_eval_type (char *);
int
return 1;
}
+
+enum gdb_rc
+gdb_value_struct_elt (struct ui_out *uiout, struct value **result, struct value **argp,
+ struct value **args, char *name, int *static_memfuncp,
+ char *err)
+{
+ struct captured_value_struct_elt_args cargs;
+ cargs.argp = argp;
+ cargs.args = args;
+ cargs.name = name;
+ cargs.static_memfuncp = static_memfuncp;
+ cargs.err = err;
+ cargs.result_ptr = result;
+ return catch_exceptions (uiout, do_captured_value_struct_elt, &cargs,
+ NULL, RETURN_MASK_ALL);
+}
+
+static int
+do_captured_value_struct_elt (struct ui_out *uiout, void *data)
+{
+ struct captured_value_struct_elt_args *cargs = data;
+ *cargs->result_ptr = value_struct_elt (cargs->argp, cargs->args, cargs->name,
+ cargs->static_memfuncp, cargs->err);
+ return GDB_RC_OK;
+}
+
#ifndef WRAPPER_H
#define WRAPPER_H 1
+#include "gdb.h"
struct value;
extern int gdb_value_subscript (struct value *, struct value *, struct value **);
+extern enum gdb_rc gdb_value_struct_elt (struct ui_out *uiout, struct value **result_ptr,
+ struct value **argp, struct value **args,
+ char *name, int *static_memfuncp, char *err);
+
extern int gdb_value_ind (struct value *val, struct value ** rval);
extern int gdb_parse_and_eval_type (char *, int, struct type **);