From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13493 invoked by alias); 19 Nov 2013 13:12:16 -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 13481 invoked by uid 89); 19 Nov 2013 13:12:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=3.1 required=5.0 tests=AWL,BAYES_50,GARBLED_BODY,RDNS_NONE autolearn=no version=3.3.2 X-HELO: relay1.mentorg.com Received: from Unknown (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 19 Nov 2013 13:12:14 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1Vil5w-00008q-RG from Yao_Qi@mentor.com ; Tue, 19 Nov 2013 05:11:56 -0800 Received: from SVR-ORW-FEM-02.mgc.mentorg.com ([147.34.96.206]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Tue, 19 Nov 2013 05:11:56 -0800 Received: from qiyao.dyndns.org (147.34.91.1) by svr-orw-fem-02.mgc.mentorg.com (147.34.96.168) with Microsoft SMTP Server id 14.2.247.3; Tue, 19 Nov 2013 05:11:55 -0800 Message-ID: <528B633D.7030407@codesourcery.com> Date: Tue, 19 Nov 2013 14:06:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: Pedro Alves CC: Doug Evans , gdb-patches Subject: Re: [PATCH 08/10] Don't invalidate dcache when option stack-cache is changed References: <1383458049-20893-1-git-send-email-yao@codesourcery.com> <1383458049-20893-9-git-send-email-yao@codesourcery.com> <528B50E1.4030505@redhat.com> In-Reply-To: <528B50E1.4030505@redhat.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2013-11/txt/msg00533.txt.bz2 On 11/19/2013 07:52 PM, Pedro Alves wrote: > @@ -1593,14 +1593,14 @@ memory_xfer_partial_1 (struct target_ops *ops, enum target_object object, > > /* Make sure the cache gets updated no matter what - if we are writing > to the stack. Even if this write is not tagged as such, we still need > - to update the cache. */ > + to update the cache. Update the cache to keep it in sync if it > + has been initialized. */ > > if (res > 0 > && inf != NULL > && writebuf != NULL > && target_dcache_init_p () > && !region->attrib.cache > - && stack_cache_enabled () > && object != TARGET_OBJECT_STACK_MEMORY) > { > > ... we don't update the cache. We do update the cache. When we do "set variable foo = 1" (foo is a local variable), OBJECT is TARGET_OBJECT_MEMORY, so the condition above is true and cache is updated then. -- Yao (齐尧)