This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC 03/32] introduce async_callback_ftype
- From: Tom Tromey <tromey at redhat dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: Joel Brobecker <brobecker at adacore dot com>, gdb-patches at sourceware dot org
- Date: Wed, 15 Jan 2014 08:25:43 -0700
- Subject: Re: [RFC 03/32] introduce async_callback_ftype
- Authentication-results: sourceware.org; auth=none
- References: <1389640367-5571-1-git-send-email-tromey at redhat dot com> <1389640367-5571-4-git-send-email-tromey at redhat dot com> <52D512FB dot 7010006 at redhat dot com> <20140114105012 dot GF4762 at adacore dot com> <87a9eyy55d dot fsf at fleche dot redhat dot com> <20140114171858 dot GG4762 at adacore dot com> <52D58239 dot 8010502 at redhat dot com> <87d2juuz3r dot fsf at fleche dot redhat dot com>
Pedro> I'd suggest just going ahead and pushing this change in.
Tom> I'll push it tomorrow morning.
Here is the version I am checking it. It differs slightly from the
patch in the series because it does not include the "self" argument. I
tested it by rebuilding.
Tom
commit b0a16e66b0391025b04acb79af36d4618379cb14
Author: Tom Tromey <tromey@redhat.com>
Date: Thu Dec 19 14:33:07 2013 -0700
introduce async_callback_ftype
This introduces async_callback_ftype. This is needed for
make-target-delegates to work properly, as it doesn't implement a real
parser. I think it's also an ok cleanup in its own right.
2014-01-15 Tom Tromey <tromey@redhat.com>
* target.h (async_callback_ftype): New typedef.
(struct target_ops) <to_async>: Use it.
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index e752dd0..e3b3eaa 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2014-01-15 Tom Tromey <tromey@redhat.com>
+
+ * target.h (async_callback_ftype): New typedef.
+ (struct target_ops) <to_async>: Use it.
+
2014-01-15 Joel Brobecker <brobecker@adacore.com>
* python/py-value.c (get_field_type): Remove unnecessary curly
diff --git a/gdb/target.h b/gdb/target.h
index 9a39839..37ca302 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -345,6 +345,11 @@ extern ULONGEST get_target_memory_unsigned (struct target_ops *ops,
struct thread_info; /* fwd decl for parameter list below: */
+/* The type of the callback to the to_async method. */
+
+typedef void async_callback_ftype (enum inferior_event_type event_type,
+ void *context);
+
struct target_ops
{
struct target_ops *beneath; /* To the target under this one. */
@@ -486,7 +491,7 @@ struct target_ops
/* ASYNC target controls */
int (*to_can_async_p) (void);
int (*to_is_async_p) (void);
- void (*to_async) (void (*) (enum inferior_event_type, void *), void *);
+ void (*to_async) (async_callback_ftype *, void *);
int (*to_supports_non_stop) (void);
/* find_memory_regions support method for gcore */
int (*to_find_memory_regions) (find_memory_region_ftype func, void *data);