Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Keith Seitz <keiths@cygnus.com>
To: <gdb-patches@sources.redhat.com>
Subject: Re: [RFA] Wrappers again.
Date: Tue, 30 Oct 2001 19:16:00 -0000	[thread overview]
Message-ID: <Pine.GSO.4.33.0110301914160.20538-100000@makita.cygnus.com> (raw)
In-Reply-To: <3BDF5D43.6050809@cygnus.com>

On Tue, 30 Oct 2001, Andrew Cagney wrote:

> Keith wrote:
> >
> > Is this better?
>
> Yes, much better - no casts.  Thanks for the effort.

Committed.

Thank you for reviewing this code, Andrew.
Keith

For the record:

ChangeLog
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.

Patch
Index: wrapper.c
===================================================================
RCS file: /cvs/src/src/gdb/wrapper.c,v
retrieving revision 1.13
diff -u -p -r1.13 wrapper.c
--- wrapper.c	2001/10/20 22:43:26	1.13
+++ wrapper.c	2001/10/31 03:14:04
@@ -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;
+}
+
Index: wrapper.h
===================================================================
RCS file: /cvs/src/src/gdb/wrapper.h,v
retrieving revision 1.11
diff -u -p -r1.11 wrapper.h
--- wrapper.h	2001/10/20 22:43:26	1.11
+++ wrapper.h	2001/10/31 03:14:04
@@ -18,6 +18,7 @@

 #ifndef WRAPPER_H
 #define WRAPPER_H 1
+#include "gdb.h"

 struct value;

@@ -36,6 +37,10 @@ extern int gdb_value_equal (struct value
 extern int gdb_value_assign (struct value *, struct value *, 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);



      reply	other threads:[~2001-10-30 19:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.GSO.4.33.0110252354180.23990-100000@makita.cygnus.com>
2001-10-30 18:10 ` Andrew Cagney
2001-10-30 19:16   ` 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.0110301914160.20538-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