From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9751 invoked by alias); 28 Mar 2013 12:29:14 -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 9734 invoked by uid 89); 28 Mar 2013 12:29:07 -0000 X-Spam-SWARE-Status: No, score=-7.6 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; Thu, 28 Mar 2013 12:29:05 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r2SCT22P022839 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 28 Mar 2013 08:29:02 -0400 Received: from valrhona.uglyboxes.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r2SCT1bK011654 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Thu, 28 Mar 2013 08:29:01 -0400 Message-ID: <5154378D.60302@redhat.com> Date: Thu, 28 Mar 2013 17:07:00 -0000 From: Keith Seitz User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120605 Thunderbird/13.0 MIME-Version: 1.0 To: Hui Zhu CC: 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> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2013-03/txt/msg01058.txt.bz2 On 03/25/2013 11:41 PM, Hui Zhu wrote: > --- a/gdb/breakpoint.c > +++ b/gdb/breakpoint.c > @@ -12963,6 +12963,15 @@ bkpt_re_set (struct breakpoint *b) > breakpoint_re_set_default (b); > } > > +static void > +dprintf_re_set (struct breakpoint *b) > +{ This function needs a comment, even if it just mentions that this function is the re_set method for dprintf breakpoints. > + breakpoint_re_set_default (b); > + > + if (b->extra_string != NULL) > + update_dprintf_command_list (b); > +} > + This will update the command list every time breakpoints are reset and could be limited to only those needing updating. Is there perhaps a reason to always do this? > --- /dev/null > +++ b/gdb/testsuite/gdb.base/dprintf-pending.c > @@ -0,0 +1,31 @@ > +/* This testcase is part of GDB, the GNU debugger. > + > + Copyright 2004-2013 Free Software Foundation, Inc. ^^^^^^^^^ I think you meant only 2013. :-) > --- /dev/null > +++ b/gdb/testsuite/gdb.base/dprintf-pending.exp > + > +if [get_compiler_info] { > + return -1 > +} Can you please add braces around the expression here? [Yeah, that's a nit, but it is one of my Tcl pet peeves, and this is a new file. Time to stomp out the old crud.] Keith