aboutsummaryrefslogtreecommitdiff
path: root/gdb/wrapper.c
diff options
context:
space:
mode:
authorKeith Seitz <keiths@redhat.com>2001-10-31 03:16:04 +0000
committerKeith Seitz <keiths@redhat.com>2001-10-31 03:16:04 +0000
commitddc5429238ae0aded9207981b02d65c6e954f2fa (patch)
treeb4500aef203ce9194a18033c53acd2a40e819e42 /gdb/wrapper.c
parented73733d7dce5f67ad44acf6bb1573cbadcbd4f9 (diff)
downloadgdb-ddc5429238ae0aded9207981b02d65c6e954f2fa.zip
gdb-ddc5429238ae0aded9207981b02d65c6e954f2fa.tar.gz
gdb-ddc5429238ae0aded9207981b02d65c6e954f2fa.tar.bz2
* wrapper.h (gdb_value_struct_elt): New function.
* wrapper.c (gdb_value_struct_elt): Ditto. (do_captured_value_struct_elt): Ditto.
Diffstat (limited to 'gdb/wrapper.c')
-rw-r--r--gdb/wrapper.c38
1 files changed, 38 insertions, 0 deletions
diff --git a/gdb/wrapper.c b/gdb/wrapper.c
index e99378f..6c9c6d6 100644
--- a/gdb/wrapper.c
+++ b/gdb/wrapper.c
@@ -41,6 +41,16 @@ struct gdb_wrapper_arguments
} 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 *);
@@ -55,6 +65,8 @@ static int wrap_value_subscript (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
@@ -293,3 +305,29 @@ wrap_parse_and_eval_type (char *a)
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;
+}
+