From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32284 invoked by alias); 15 Jan 2014 15:25:50 -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 32271 invoked by uid 89); 15 Jan 2014 15:25:50 -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; Wed, 15 Jan 2014 15:25:49 +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 s0FFPjrj030355 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 15 Jan 2014 10:25:45 -0500 Received: from barimba (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 s0FFPhBE020161 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Wed, 15 Jan 2014 10:25:44 -0500 From: Tom Tromey To: Pedro Alves Cc: Joel Brobecker , gdb-patches@sourceware.org Subject: Re: [RFC 03/32] introduce async_callback_ftype References: <1389640367-5571-1-git-send-email-tromey@redhat.com> <1389640367-5571-4-git-send-email-tromey@redhat.com> <52D512FB.7010006@redhat.com> <20140114105012.GF4762@adacore.com> <87a9eyy55d.fsf@fleche.redhat.com> <20140114171858.GG4762@adacore.com> <52D58239.8010502@redhat.com> <87d2juuz3r.fsf@fleche.redhat.com> Date: Wed, 15 Jan 2014 15:25:00 -0000 In-Reply-To: <87d2juuz3r.fsf@fleche.redhat.com> (Tom Tromey's message of "Tue, 14 Jan 2014 12:45:12 -0700") Message-ID: <8761pltgg8.fsf@fleche.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2014-01/txt/msg00506.txt.bz2 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 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 * target.h (async_callback_ftype): New typedef. (struct target_ops) : 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 + + * target.h (async_callback_ftype): New typedef. + (struct target_ops) : Use it. + 2014-01-15 Joel Brobecker * 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);