From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6259 invoked by alias); 2 Apr 2013 18:05:56 -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 6212 invoked by uid 89); 2 Apr 2013 18:05:49 -0000 X-Spam-SWARE-Status: No, score=-8.2 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, 02 Apr 2013 18:05:47 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r32I5i1S029649 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 2 Apr 2013 14:05:44 -0400 Received: from valrhona.uglyboxes.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r32I5hs3016921 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 2 Apr 2013 14:05:43 -0400 Message-ID: <515B1DF7.3090705@redhat.com> Date: Wed, 03 Apr 2013 03:34: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> <5154378D.60302@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2013-04/txt/msg00064.txt.bz2 On 03/29/2013 12:42 AM, Hui Zhu wrote: >>> + 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? > > I think it need, because it need to generate different commands with > different status for example: > if (target_can_run_breakpoint_commands ()) > printf_line = xstrprintf ("agent-printf %s", dprintf_args); > I'm not understanding this example. How is this likely to change whenever breakpoints are reset? Is there perhaps a way to add a test to demonstrate this requirement? Otherwise, this patch looks good to me, and recommend that a maintainer give this a final review. Keith