summaryrefslogtreecommitdiff
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
commita82bd2c566d082a54227f6ccc26cf934741b722b (patch)
tree8868267d61a5bdb4c46f36fbabe2908855dd4fc8 /gdb/wrapper.c
parenteb0ce533e2af5d8b006be6953a89be16379f9735 (diff)
downloadgdb-a82bd2c566d082a54227f6ccc26cf934741b722b.tar.gz
* 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 e99378fbdba..6c9c6d60cef 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;
+}
+