From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9968 invoked by alias); 10 Apr 2013 04:41:35 -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 9956 invoked by uid 89); 10 Apr 2013 04:41:34 -0000 X-Spam-SWARE-Status: No, score=-4.7 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE autolearn=ham version=3.3.1 Received: from mail-oa0-f52.google.com (HELO mail-oa0-f52.google.com) (209.85.219.52) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Wed, 10 Apr 2013 04:41:33 +0000 Received: by mail-oa0-f52.google.com with SMTP id k14so53285oag.39 for ; Tue, 09 Apr 2013 21:41:32 -0700 (PDT) X-Received: by 10.60.96.162 with SMTP id dt2mr132825oeb.119.1365568892199; Tue, 09 Apr 2013 21:41:32 -0700 (PDT) MIME-Version: 1.0 Received: by 10.60.13.133 with HTTP; Tue, 9 Apr 2013 21:40:51 -0700 (PDT) In-Reply-To: <51640391.2040801@redhat.com> References: <514BF736.3070706@mentor.com> <514C3C85.4000704@codesourcery.com> <514EEBFF.8090705@redhat.com> <5154378D.60302@redhat.com> <515B1DF7.3090705@redhat.com> <515EF6A3.2080704@redhat.com> <5162D6A9.2070706@redhat.com> <51640391.2040801@redhat.com> From: Hui Zhu Date: Wed, 10 Apr 2013 15:57:00 -0000 Message-ID: Subject: Re: [PATCH] Fix dprintf work not right if it is pending To: Pedro Alves Cc: Keith Seitz , Hui Zhu , gdb-patches ml Content-Type: text/plain; charset=ISO-8859-1 X-SW-Source: 2013-04/txt/msg00269.txt.bz2 Hi Pedro, Thanks for your review. On Tue, Apr 9, 2013 at 8:03 PM, Pedro Alves wrote: > Hi Hui, > > On 04/09/2013 10:00 AM, Hui Zhu wrote: >> On Mon, Apr 8, 2013 at 10:39 PM, Pedro Alves wrote: >>> >>>> +set testfile "dprintf-pending" >>>> +set libfile "dprintf-pendshr" >>>> +set srcfile $testfile.c >>>> +set libsrc $srcdir/$subdir/$libfile.c >>>> +set binfile $objdir/$subdir/$testfile >>>> +set lib_sl $objdir/$subdir/$libfile.sl >>> >>> Please use standard_testfile/standard_output_file. >> >> Fixed. > > Close, but: > >> +standard_testfile .c >> +set libfile "dprintf-pendshr" >> +set libsrc $srcdir/$subdir/$libfile.c >> +set lib_sl $objdir/$subdir/$libfile.sl > > ".c" is not necessary. Do use standard_output_file please. > > Like so: > > standard_testfile > > set libfile "dprintf-pendshr" > set libsrc $srcdir/$subdir/$libfile.c > set lib_sl [standard_output_file $libfile.sl] Fixed. > > > Oh, > >> +++ b/gdb/breakpoint.c >> @@ -12963,6 +12963,35 @@ bkpt_re_set (struct breakpoint *b) >> breakpoint_re_set_default (b); >> } >> >> +/* Dprintf breakpoint_ops methods. */ >> + >> +static void >> +dprintf_re_set (struct breakpoint *b) >> +{ > ... >> +} >> + >> static int >> bkpt_insert_location (struct bp_location *bl) >> { > > I only now noticed you're putting the new dprintf_re_set > function right in the middle of the > > /* Default breakpoint_ops methods. */ > > bkpt_re_set (struct breakpoint *b) > ... > bkpt_insert_location (struct bp_location *bl) > ... > bkpt_remove_location (struct bp_location *bl) > ... > bkpt_breakpoint_hit (const struct bp_location *bl, > ... > bkpt_resources_needed (const struct bp_location *bl) > ... > bkpt_print_it (bpstat bs) > ... > bkpt_print_mention (struct breakpoint *b) > ... > bkpt_decode_linespec (struct breakpoint *b, char **s, > ... > > section. If you keep scrolling down, you'll notice that > we have a section/block/group of functions for each > breakpoint type. > > /* Virtual table for internal breakpoints. */ > /* Virtual table for momentary breakpoints */ > /* Specific methods for probe breakpoints. */ > /* The breakpoint_ops structure to be used in tracepoints. */ > > etc. for all other types. Please don't break this layout. Fixed. > > Otherwise OK. Commited in http://sourceware.org/ml/gdb-cvs/2013-04/msg00097.html Thanks, Hui > > Thanks, > -- > Pedro Alves >