From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 39759 invoked by alias); 23 Nov 2016 20:07:59 -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 39720 invoked by uid 89); 23 Nov 2016 20:07:58 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.1 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_SOFTFAIL autolearn=no version=3.3.2 spammy=baldwin, Baldwin, HX-Greylist:EST, HX-Greylist:0500 X-HELO: mail.baldwin.cx Received: from bigwig.baldwin.cx (HELO mail.baldwin.cx) (96.47.65.170) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 23 Nov 2016 20:07:48 +0000 Received: from ralph.com (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id B766910AA56 for ; Wed, 23 Nov 2016 15:07:46 -0500 (EST) From: John Baldwin To: gdb-patches@sourceware.org Subject: [PATCH 1/3] Fix mismatched struct vs class tags. Date: Wed, 23 Nov 2016 20:08:00 -0000 Message-Id: <20161123200652.89209-2-jhb@FreeBSD.org> In-Reply-To: <20161123200652.89209-1-jhb@FreeBSD.org> References: <20161123200652.89209-1-jhb@FreeBSD.org> X-IsSubscribed: yes X-SW-Source: 2016-11/txt/msg00684.txt.bz2 The 'collection_list' and 'number_or_range_parser' types were converted from structs to classes, but some code still used 'struct'. Fix all references to use 'class' which fixes -Wmismatched-tags warnings issued by clang. gdb/ChangeLog: * breakpoint.h (class number_or_range_parser): Use 'class' instead of 'struct'. * mi/mi-main.c (mi_cmd_trace_frame_collected): Use 'class collection_list' instead of 'struct collection_list'. * tracepoint.c (class collection_list): Likewise. (collection_list::collect_symbol): Likewise. (encode_actions_1): Likewise. (encode_actions_rsp): Likewise. * tracepoint.h (encode_actions): Likewise. --- gdb/ChangeLog | 12 ++++++++++++ gdb/breakpoint.h | 2 +- gdb/mi/mi-main.c | 4 ++-- gdb/tracepoint.c | 14 +++++++------- gdb/tracepoint.h | 4 ++-- 5 files changed, 24 insertions(+), 12 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index a2a11e2..9e8fb4f 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,15 @@ +2016-11-23 John Baldwin + + * breakpoint.h (class number_or_range_parser): Use 'class' instead of + 'struct'. + * mi/mi-main.c (mi_cmd_trace_frame_collected): Use + 'class collection_list' instead of 'struct collection_list'. + * tracepoint.c (class collection_list): Likewise. + (collection_list::collect_symbol): Likewise. + (encode_actions_1): Likewise. + (encode_actions_rsp): Likewise. + * tracepoint.h (encode_actions): Likewise. + 2016-11-23 Pedro Alves * Makefile.in (SFILES): Add common/run-time-clock.c. diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h index 99133a2..111e37a 100644 --- a/gdb/breakpoint.h +++ b/gdb/breakpoint.h @@ -32,7 +32,7 @@ struct value; struct block; struct gdbpy_breakpoint_object; struct gdbscm_breakpoint_object; -struct number_or_range_parser; +class number_or_range_parser; struct thread_info; struct bpstats; struct bp_location; diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c index 4d276c8..edc1857 100644 --- a/gdb/mi/mi-main.c +++ b/gdb/mi/mi-main.c @@ -2763,8 +2763,8 @@ mi_cmd_trace_frame_collected (char *command, char **argv, int argc) struct cleanup *old_chain; struct bp_location *tloc; int stepping_frame; - struct collection_list *clist; - struct collection_list tracepoint_list, stepping_list; + class collection_list *clist; + class collection_list tracepoint_list, stepping_list; struct traceframe_info *tinfo; int oind = 0; enum print_values var_print_values = PRINT_ALL_VALUES; diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c index 7435380..0827f92 100644 --- a/gdb/tracepoint.c +++ b/gdb/tracepoint.c @@ -180,7 +180,7 @@ static void trace_dump_command (char *, int); /* support routines */ -struct collection_list; +class collection_list; static char *mem2hex (gdb_byte *, char *, int); static struct command_line * @@ -1079,7 +1079,7 @@ collection_list::collect_symbol (struct symbol *sym, struct add_local_symbols_data { - struct collection_list *collect; + class collection_list *collect; struct gdbarch *gdbarch; CORE_ADDR pc; long frame_regno; @@ -1323,8 +1323,8 @@ encode_actions_1 (struct command_line *action, struct bp_location *tloc, int frame_reg, LONGEST frame_offset, - struct collection_list *collect, - struct collection_list *stepping_list) + class collection_list *collect, + class collection_list *stepping_list) { const char *action_exp; int i; @@ -1553,8 +1553,8 @@ encode_actions_1 (struct command_line *action, void encode_actions (struct bp_location *tloc, - struct collection_list *tracepoint_list, - struct collection_list *stepping_list) + class collection_list *tracepoint_list, + class collection_list *stepping_list) { struct command_line *actions; int frame_reg; @@ -1578,7 +1578,7 @@ void encode_actions_rsp (struct bp_location *tloc, char ***tdp_actions, char ***stepping_actions) { - struct collection_list tracepoint_list, stepping_list; + class collection_list tracepoint_list, stepping_list; *tdp_actions = NULL; *stepping_actions = NULL; diff --git a/gdb/tracepoint.h b/gdb/tracepoint.h index 36eeee6..dfb85c8 100644 --- a/gdb/tracepoint.h +++ b/gdb/tracepoint.h @@ -323,8 +323,8 @@ void free_actions (struct breakpoint *); extern const char *decode_agent_options (const char *exp, int *trace_string); extern void encode_actions (struct bp_location *tloc, - struct collection_list *tracepoint_list, - struct collection_list *stepping_list); + class collection_list *tracepoint_list, + class collection_list *stepping_list); extern void encode_actions_rsp (struct bp_location *tloc, char ***tdp_actions, char ***stepping_actions); -- 2.9.2