From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1272 invoked by alias); 10 Nov 2011 14:54:34 -0000 Received: (qmail 1255 invoked by uid 22791); 10 Nov 2011 14:54:32 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 10 Nov 2011 14:54:18 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=EU1-MAIL.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1ROW1C-0005lR-3K from pedro_alves@mentor.com for gdb-patches@sourceware.org; Thu, 10 Nov 2011 06:54:18 -0800 Received: from scottsdale.localnet ([172.16.63.104]) by EU1-MAIL.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 10 Nov 2011 14:54:15 +0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: [patch 1/8] Download tracepoint on location level Date: Thu, 10 Nov 2011 14:54:00 -0000 User-Agent: KMail/1.13.6 (Linux/2.6.38-12-generic; KDE/4.7.2; x86_64; ; ) Cc: Yao Qi References: <4EB8C551.9090609@codesourcery.com> <4EB8C74B.8050702@codesourcery.com> <4EB9F4A9.90602@codesourcery.com> In-Reply-To: <4EB9F4A9.90602@codesourcery.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201111101454.13402.pedro@codesourcery.com> X-IsSubscribed: yes 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 X-SW-Source: 2011-11/txt/msg00270.txt.bz2 On Wednesday 09 November 2011 03:34:01, Yao Qi wrote: > --- a/gdb/target.c > +++ b/gdb/target.c > @@ -674,7 +674,7 @@ update_current_target (void) > INHERIT (to_supports_enable_disable_tracepoint, t); > INHERIT (to_supports_string_tracing, t); > INHERIT (to_trace_init, t); > - INHERIT (to_download_tracepoint, t); > + INHERIT (to_download_tracepoint_loc, t); Please drop the _loc from the function name. We don't have it in the other methods like to_enable_tracepoint/to_disable_tracepoint which take a location too, and others like to_insert_breakpoint aren't called to_insert_breakpoint_gdbarch_target_info either. > --- a/gdb/remote.c > +++ b/gdb/remote.c > @@ -9835,9 +9835,9 @@ remote_download_command_source (int num, ULONGEST addr, > } > > static void > -remote_download_tracepoint (struct breakpoint *b) > +remote_download_tracepoint_loc (struct bp_location *loc) > { Ditto. > --- a/gdb/target.h > +++ b/gdb/target.h > @@ -686,8 +686,10 @@ struct target_ops > /* Prepare the target for a tracing run. */ > void (*to_trace_init) (void); > > - /* Send full details of a tracepoint to the target. */ > - void (*to_download_tracepoint) (struct breakpoint *t); > + /* Send full details of a tracepoint location to the target. Target may > + install or not install tracepoint locations to inferior, which is > + determined by target's factors, such tracing state. */ This comment doesn't belong in this patch. And I think it only made sense on a previous version of the patch series. > + void (*to_download_tracepoint_loc) (struct bp_location *location); > > /* Send full details of a trace state variable to the target. */ > void (*to_download_trace_state_variable) (struct trace_state_variable *tsv); > @@ -1474,8 +1476,8 @@ extern int target_search_memory (CORE_ADDR start_addr, > #define target_trace_init() \ > (*current_target.to_trace_init) () > > -#define target_download_tracepoint(t) \ > - (*current_target.to_download_tracepoint) (t) > +#define target_download_tracepoint_loc(t) \ > + (*current_target.to_download_tracepoint_loc) (t) Drop _loc. Okay with those changes. -- Pedro Alves