This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[RFC 03/32] introduce async_callback_ftype
- From: Tom Tromey <tromey at redhat dot com>
- To: gdb-patches at sourceware dot org
- Cc: Tom Tromey <tromey at redhat dot com>
- Date: Mon, 13 Jan 2014 12:12:18 -0700
- Subject: [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>
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-08 Tom Tromey <tromey@redhat.com>
* target.h (async_callback_ftype): New typedef.
(struct target_ops) <to_async>: Use it.
---
gdb/ChangeLog | 5 +++++
gdb/target.h | 7 +++++--
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/gdb/target.h b/gdb/target.h
index b219cff..78c9d34 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -341,6 +341,10 @@ 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, void *);
+
struct target_ops
{
struct target_ops *beneath; /* To the target under this one. */
@@ -484,8 +488,7 @@ struct target_ops
/* ASYNC target controls */
int (*to_can_async_p) (struct target_ops *);
int (*to_is_async_p) (struct target_ops *);
- void (*to_async) (struct target_ops *,
- void (*) (enum inferior_event_type, void *), void *);
+ void (*to_async) (struct target_ops *, 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);
--
1.8.1.4