From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12318 invoked by alias); 26 Oct 2013 13:24:50 -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 12306 invoked by uid 89); 26 Oct 2013 13:24:49 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.3 required=5.0 tests=AWL,BAYES_00,GARBLED_BODY autolearn=no version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 26 Oct 2013 13:24:48 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1Va3rB-0000Fo-2a from Yao_Qi@mentor.com ; Sat, 26 Oct 2013 06:24:45 -0700 Received: from SVR-ORW-FEM-03.mgc.mentorg.com ([147.34.97.39]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Sat, 26 Oct 2013 06:24:44 -0700 Received: from qiyao.dyndns.org (147.34.91.1) by svr-orw-fem-03.mgc.mentorg.com (147.34.97.39) with Microsoft SMTP Server id 14.2.247.3; Sat, 26 Oct 2013 06:24:37 -0700 Message-ID: <526BC220.80702@codesourcery.com> Date: Sat, 26 Oct 2013 13:24: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: Doug Evans CC: gdb-patches Subject: Re: [PATCH 3/5] set/show code-cache References: <1382516855-32218-1-git-send-email-yao@codesourcery.com> <1382516855-32218-4-git-send-email-yao@codesourcery.com> <526A8164.7040509@codesourcery.com> In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2013-10/txt/msg00841.txt.bz2 On 10/25/2013 11:57 PM, Doug Evans wrote: >> At the very beginning, I use single dcache for both stack access and code >> >access. However, it is odd that command "set stack-cache off" invalidates >> >code caches, so I decide to add a new cache dedicated to code access. > If it's just that "set stack-cache off" flushed the cache (as opposed > to disabling/breaking all future use) I think that's ok. How often > will it get turned on and off? > It is confusing if command "set stack-cache off" flushes both stack cache and code cache. I'd like to have separate stack cache and code cache, so that GDB can control them independently. GDB invalidates stack cache when GDB resumes inferior, but GDB doesn't have to invalidate code cache, unless the program is self-modified. If we obsolete command "set stack-cache" and replace it with command "set target-cache", I agree that we can use single cache for stack and code. WDYT? >>> >>If I do x/10x $addr and then x/10i $addr will both caches get populated? >> > >> > >> >No, "x/10i $addr" gets code cache populated, while "x/10x $addr" doesn't get >> >"general" or "stack" cache populated, unless I set memory attribute cache >> >for this area. > Sorry, I left the assumption that caching is turned on via memory > attributes as implicit. > To be explicit: "If I turn on caching by memory attributes, and then > do x/10x $addr and then x/10i $addr, will both caches get populated?" > :) Yes, both caches get populated. -- Yao (齐尧)