From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1313 invoked by alias); 9 Apr 2013 12:03:36 -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 1298 invoked by uid 89); 9 Apr 2013 12:03:35 -0000 X-Spam-SWARE-Status: No, score=-8.9 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.1 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Tue, 09 Apr 2013 12:03:35 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r39C3WgN000315 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 9 Apr 2013 08:03:32 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r39C3U1U001342; Tue, 9 Apr 2013 08:03:30 -0400 Message-ID: <51640391.2040801@redhat.com> Date: Tue, 09 Apr 2013 15:28:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4 MIME-Version: 1.0 To: Hui Zhu CC: Keith Seitz , Hui Zhu , gdb-patches ml Subject: Re: [PATCH] Fix dprintf work not right if it is pending 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> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2013-04/txt/msg00219.txt.bz2 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] 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. Otherwise OK. Thanks, -- Pedro Alves