From: Keith Seitz <keiths@cygnus.com>
To: <gdb-patches@sources.redhat.com>
Subject: Re: [RFA] More wrappers in varobj
Date: Fri, 19 Oct 2001 11:41:00 -0000 [thread overview]
Message-ID: <Pine.GSO.4.33.0110191137220.18666-100000@makita.cygnus.com> (raw)
In-Reply-To: <3BCB4792.7020502@cygnus.com>
Sorry for the delay. I got a little caught up in debugging some
other stuff...
On Mon, 15 Oct 2001, Andrew Cagney wrote:
> have a look at breakpoint.c:gdb_breakpoint for a more robust / current
> way of implementing these wrappers.
Is this better?
Slightly off-topic: We are going to be calling externally visible
functions something like "gdb_FOO", right? Example: gdb_breakpoint and
gdb_breakpoint_query. How are we going to name internal functions? Leading
"_" or something?
I ask because I don't really want to have this patch introduce
internal variations of gdb functions into the "libgdb" namespace.
Keith
Index: wrapper.h
===================================================================
RCS file: /cvs/src/src/gdb/wrapper.h,v
retrieving revision 1.10
diff -u -p -r1.10 wrapper.h
--- wrapper.h 2001/03/06 08:21:18 1.10
+++ wrapper.h 2001/10/19 18:36:50
@@ -18,6 +18,7 @@
#ifndef WRAPPER_H
#define WRAPPER_H 1
+#include "gdb.h"
/* Use this struct to pass arguments to wrapper routines. */
struct gdb_wrapper_arguments;
@@ -36,6 +37,10 @@ extern int gdb_value_assign (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 enum gdb_rc gdb_value_struct_elt (struct ui_out *uiout, value_ptr *result_ptr,
+ value_ptr *argp, value_ptr *args,
+ char *name, int *static_memfuncp, char *err);
extern int gdb_parse_and_eval_type (char *, int, struct type **);
Index: wrapper.c
===================================================================
RCS file: /cvs/src/src/gdb/wrapper.c,v
retrieving revision 1.12
diff -u -p -r1.12 wrapper.c
--- wrapper.c 2001/03/27 20:36:24 1.12
+++ wrapper.c 2001/10/19 18:36:50
@@ -41,6 +41,16 @@ struct gdb_wrapper_arguments
} args[10];
};
+struct captured_value_struct_elt_args
+{
+ value_ptr *argp;
+ value_ptr *args;
+ char *name;
+ int *static_memfuncp;
+ char *err;
+ value_ptr *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
@@ -290,3 +302,29 @@ wrap_parse_and_eval_type (char *a)
return 1;
}
+
+enum gdb_rc
+gdb_value_struct_elt (struct ui_out *uiout, value_ptr *result, value_ptr *argp,
+ value_ptr *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;
+}
+
prev parent reply other threads:[~2001-10-19 11:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Pine.GSO.4.33.0110151245240.11434-100000@makita.cygnus.com>
2001-10-15 13:31 ` Andrew Cagney
2001-10-15 13:36 ` Keith Seitz
2001-10-15 15:42 ` Andrew Cagney
2001-10-19 11:41 ` Keith Seitz [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.GSO.4.33.0110191137220.18666-100000@makita.cygnus.com \
--to=keiths@cygnus.com \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox