From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11537 invoked by alias); 10 Apr 2013 04:44:30 -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 11527 invoked by uid 89); 10 Apr 2013 04:44:29 -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-f48.google.com (HELO mail-oa0-f48.google.com) (209.85.219.48) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Wed, 10 Apr 2013 04:44:27 +0000 Received: by mail-oa0-f48.google.com with SMTP id j1so57636oag.7 for ; Tue, 09 Apr 2013 21:44:26 -0700 (PDT) X-Received: by 10.182.144.42 with SMTP id sj10mr149559obb.66.1365569066246; Tue, 09 Apr 2013 21:44:26 -0700 (PDT) MIME-Version: 1.0 Received: by 10.60.13.133 with HTTP; Tue, 9 Apr 2013 21:43:46 -0700 (PDT) In-Reply-To: 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 16:12:00 -0000 Message-ID: Subject: Re: [PATCH] Fix dprintf work not right if it is pending To: Joel Brobecker Cc: Keith Seitz , Hui Zhu , gdb-patches ml , Pedro Alves Content-Type: text/plain; charset=ISO-8859-1 X-SW-Source: 2013-04/txt/msg00270.txt.bz2 Hi Joel, http://sourceware.org/ml/gdb-cvs/2013-04/msg00097.html This is a bug fix. Can I check it in to 7.6 branch? Thanks, Hui On Wed, Apr 10, 2013 at 12:40 PM, Hui Zhu wrote: > 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 >>