From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 117428 invoked by alias); 30 Jun 2015 14:27: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 117377 invoked by uid 89); 30 Jun 2015 14:27:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 30 Jun 2015 14:27:35 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id E53D92CD828; Tue, 30 Jun 2015 14:27:33 +0000 (UTC) Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t5UERVN0002734; Tue, 30 Jun 2015 10:27:32 -0400 Message-ID: <5592A753.4030004@redhat.com> Date: Tue, 30 Jun 2015 14:27:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Patrick Palka , gdb-patches@sourceware.org Subject: Re: [PATCH] Be lazy about refreshing the windows in tui_show_frame_info (PR tui/13378) References: <1435372525-1374-2-git-send-email-patrick@parcs.ath.cx> <1435631532-32504-1-git-send-email-patrick@parcs.ath.cx> In-Reply-To: <1435631532-32504-1-git-send-email-patrick@parcs.ath.cx> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2015-06/txt/msg00636.txt.bz2 On 06/30/2015 03:32 AM, Patrick Palka wrote: > This revised patch makes sure that tui_set_locator_info returns 1 when the > locator is first constructed, just in case none of the later checks trigger > for some reason. I have a couple questions below, but I'm fine with this approach. > @@ -302,21 +306,36 @@ tui_set_locator_info (struct gdbarch *gdbarch, > { > struct tui_gen_win_info *locator = tui_locator_win_info_ptr (); > struct tui_locator_element *element; > + int locator_changed_p = 0; > > /* Allocate the locator content if necessary. */ > if (locator->content_size <= 0) > { > locator->content = tui_alloc_content (1, LOCATOR_WIN); > locator->content_size = 1; > + locator_changed_p = 1; > } > > element = &locator->content[0]->which_element.locator; > + > + if (procname != NULL) > + locator_changed_p |= strncmp (element->proc_name, procname, > + MAX_LOCATOR_ELEMENT_LEN) != 0; Can't element->proc_name be NULL here? For the string fields, do we also need to compare whether we go from NULL <-> non-NULL ? locator_changed_p |= ((fullname == NULL) != (element->full_name == NULL)); etc.? Thanks, Pedro Alves