From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21862 invoked by alias); 6 Apr 2013 21:45: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 21844 invoked by uid 89); 6 Apr 2013 21:45:30 -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; Sat, 06 Apr 2013 21:45:28 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r36LjO4u016430 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 6 Apr 2013 17:45:25 -0400 Received: from valrhona.uglyboxes.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r36LjNFn008256 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sat, 6 Apr 2013 17:45:24 -0400 Message-ID: <51609773.9040009@redhat.com> Date: Mon, 08 Apr 2013 07:20:00 -0000 From: Keith Seitz User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4 MIME-Version: 1.0 To: Pedro Alves CC: Hui Zhu , 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> In-Reply-To: <515EF6A3.2080704@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2013-04/txt/msg00167.txt.bz2 On 04/05/2013 09:06 AM, Pedro Alves wrote: > Thanks for the help Keith. Much appreciated. I'm not exactly sure I would call this "helping." I think I created more work than I actually saved. My apologies for that. That certainly wasn't my intent. > I think we want this: > > static void > dprintf_re_set (struct breakpoint *b) > { > breakpoint_re_set_default (b); > > /* This breakpoint could have been pending, and be resolved now, and > if so, we should now have the extra string. If we don't, the > dprintf was malformed when created, but we couldn't tell because > we can't extract the extra string until the location is > resolved. */ > if (b->loc != NULL && b->extra_string == NULL) > error (_("Format string required")); > > if (b->extra_string != NULL) > update_dprintf_command_list (b); > } Yeah, that's good. Me likey. That was more like what I have in my sandbox. > You mean, only update the command list if there isn't one before > (because the breakpoint was pending before) ? Yeah, I did mean that. Thank you to both you and Hui for clarifying why this is necessary. Thank you for your review of my review, too! Keith