From patchwork Fri May 8 20:21:21 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kratochvil X-Patchwork-Id: 6641 Received: (qmail 75610 invoked by alias); 8 May 2015 20:21:26 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 75597 invoked by uid 89); 8 May 2015 20:21:25 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.8 required=5.0 tests=AWL, BAYES_00, SPF_HELO_PASS, SPF_PASS, T_RP_MATCHES_RCVD 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 (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 08 May 2015 20:21:24 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id A553CC40AE for ; Fri, 8 May 2015 20:21:23 +0000 (UTC) Received: from host1.jankratochvil.net (ovpn-116-27.ams2.redhat.com [10.36.116.27]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t48KLMYs016313 for ; Fri, 8 May 2015 16:21:22 -0400 Subject: [PATCH 1/6] dummy_frame_dtor_ftype vs. call_function_by_hand_dummy_dtor_ftype cleanup From: Jan Kratochvil To: gdb-patches@sourceware.org Date: Fri, 08 May 2015 22:21:21 +0200 Message-ID: <20150508202119.15830.18218.stgit@host1.jankratochvil.net> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-IsSubscribed: yes Hi, both dummy_frame_dtor_ftype and call_function_by_hand_dummy_dtor_ftype represent the same type, there was some mistake/duplication during check-in. Jan gdb/ChangeLog 2015-05-08 Jan Kratochvil * dummy-frame.c (struct dummy_frame): Use proper typedef for dtor. * dummy-frame.h (dummy_frame_dtor_ftype): Add its comment. * infcall.c (call_function_by_hand_dummy): Use proper typedef for dummy_dtor parameter. * infcall.h: Include dummy-frame.h. (call_function_by_hand_dummy_dtor_ftype): Remove. (call_function_by_hand_dummy): Use proper typedef for dummy_dtor parameter. --- gdb/dummy-frame.c | 2 +- gdb/dummy-frame.h | 4 +++- gdb/infcall.c | 2 +- gdb/infcall.h | 5 +++-- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/gdb/dummy-frame.c b/gdb/dummy-frame.c index 0fbbeb1..f193289 100644 --- a/gdb/dummy-frame.c +++ b/gdb/dummy-frame.c @@ -64,7 +64,7 @@ struct dummy_frame /* If non-NULL, a destructor that is run when this dummy frame is popped. */ - void (*dtor) (void *data); + dummy_frame_dtor_ftype *dtor; /* Arbitrary data that is passed to DTOR. */ void *dtor_data; diff --git a/gdb/dummy-frame.h b/gdb/dummy-frame.h index bdc406a..ffd3b0a 100644 --- a/gdb/dummy-frame.h +++ b/gdb/dummy-frame.h @@ -54,10 +54,12 @@ extern void dummy_frame_discard (struct frame_id dummy_id, ptid_t ptid); extern const struct frame_unwind dummy_frame_unwind; +/* Destructor for dummy_frame. DATA is supplied by registrant. */ +typedef void (dummy_frame_dtor_ftype) (void *data); + /* Call DTOR with DTOR_DATA when DUMMY_ID frame of thread PTID gets discarded. Dummy frame with DUMMY_ID must exist. There must be no other call of register_dummy_frame_dtor for that dummy frame. */ -typedef void (dummy_frame_dtor_ftype) (void *data); extern void register_dummy_frame_dtor (struct frame_id dummy_id, ptid_t ptid, dummy_frame_dtor_ftype *dtor, void *dtor_data); diff --git a/gdb/infcall.c b/gdb/infcall.c index 26c64f6..cef6b91 100644 --- a/gdb/infcall.c +++ b/gdb/infcall.c @@ -490,7 +490,7 @@ call_function_by_hand (struct value *function, int nargs, struct value **args) struct value * call_function_by_hand_dummy (struct value *function, int nargs, struct value **args, - call_function_by_hand_dummy_dtor_ftype *dummy_dtor, + dummy_frame_dtor_ftype *dummy_dtor, void *dummy_dtor_data) { CORE_ADDR sp; diff --git a/gdb/infcall.h b/gdb/infcall.h index d038b6a..77c5101 100644 --- a/gdb/infcall.h +++ b/gdb/infcall.h @@ -20,6 +20,8 @@ #ifndef INFCALL_H #define INFCALL_H +#include "dummy-frame.h" + struct value; struct type; @@ -42,11 +44,10 @@ extern struct value *call_function_by_hand (struct value *function, int nargs, register_dummy_frame_dtor with DUMMY_DTOR and DUMMY_DTOR_DATA for the created inferior call dummy frame. */ -typedef void (call_function_by_hand_dummy_dtor_ftype) (void *data); extern struct value * call_function_by_hand_dummy (struct value *function, int nargs, struct value **args, - call_function_by_hand_dummy_dtor_ftype *dummy_dtor, + dummy_frame_dtor_ftype *dummy_dtor, void *dummy_dtor_data); #endif