From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31466 invoked by alias); 13 Jan 2014 19:12:58 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 31355 invoked by uid 89); 13 Jan 2014 19:12:58 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.1 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 13 Jan 2014 19:12:56 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s0DJCs1I029774 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 13 Jan 2014 14:12:54 -0500 Received: from barimba.redhat.com (ovpn-113-85.phx2.redhat.com [10.3.113.85]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s0DJCpt9016701; Mon, 13 Jan 2014 14:12:53 -0500 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [RFC 03/32] introduce async_callback_ftype Date: Mon, 13 Jan 2014 19:12:00 -0000 Message-Id: <1389640367-5571-4-git-send-email-tromey@redhat.com> In-Reply-To: <1389640367-5571-1-git-send-email-tromey@redhat.com> References: <1389640367-5571-1-git-send-email-tromey@redhat.com> X-SW-Source: 2014-01/txt/msg00334.txt.bz2 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 * target.h (async_callback_ftype): New typedef. (struct target_ops) : 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