From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5498 invoked by alias); 23 Sep 2008 18:41:40 -0000 Received: (qmail 5488 invoked by uid 22791); 23 Sep 2008 18:41:40 -0000 X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.33.17) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 23 Sep 2008 18:41:03 +0000 Received: from zps76.corp.google.com (zps76.corp.google.com [172.25.146.76]) by smtp-out.google.com with ESMTP id m8NIemcm005719 for ; Tue, 23 Sep 2008 19:40:48 +0100 Received: from yw-out-1718.google.com (ywa6.prod.google.com [10.192.1.6]) by zps76.corp.google.com with ESMTP id m8NIdnXZ006809 for ; Tue, 23 Sep 2008 11:40:46 -0700 Received: by yw-out-1718.google.com with SMTP id 6so364093ywa.84 for ; Tue, 23 Sep 2008 11:40:46 -0700 (PDT) Received: by 10.90.96.15 with SMTP id t15mr6876633agb.14.1222195246276; Tue, 23 Sep 2008 11:40:46 -0700 (PDT) Received: by 10.90.117.16 with HTTP; Tue, 23 Sep 2008 11:40:44 -0700 (PDT) Message-ID: Date: Tue, 23 Sep 2008 18:41:00 -0000 From: "Doug Evans" To: gdb-patches@sourceware.org Subject: Re: [RFA] dcache.c cleanup In-Reply-To: <20080918220427.GA1691@caradoc.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080917214444.625B81C777F@localhost> <20080918220427.GA1691@caradoc.them.org> X-GMailtapped-By: 172.25.146.76 X-IsSubscribed: yes 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 X-SW-Source: 2008-09/txt/msg00481.txt.bz2 On Thu, Sep 18, 2008 at 3:04 PM, Daniel Jacobowitz wrote: > On Wed, Sep 17, 2008 at 02:44:44PM -0700, Doug Evans wrote: >> IIRC, "set remotecache" isn't being removed to avoid breaking existing >> scripts. It's not used for anything, so this patch marks it as deprecated, >> and hopefully in a future release we can delete it. >> [If folks want I can instead submit a patch that makes it useful again - >> e.g. as an escape hatch in case caching isn't working, it would globally >> override the mem attribute settings.] > > Just my two cents, but I think that the command is useful (even if > currently broken) - before deprecating it we should have a good idea > of what to replace it with. Maybe a non-target-specific command > and make this a deprecated alias to it. > > Should we come up with a coherent picture of the different kinds of > memory accesses GDB needs? This is something I've been thinking about > on and off. Particular ideas: > > - When we are doing prologue analysis, we use symbols from the > executable (either minimal or full symbols) to find function > boundaries. Then we analyze forwards from there. In every case I can > think of, this means that we should use the code as present in the > executable. It's like trust-readonly-sections, but for only > prologue analysis reads; the manual disassemble command would still > show if any code had been corrupted. > > - When reading data from the stack for unwinding, we can reliably > assume that the data is thread-specific and not volatile. So we > should be able to cache it automatically, even without user > instruction, until that thread resumes. This is like memory > attributes, but only for stack unwinding. > > - If we have memory region descriptions, it's probably safe to assume > that we have the stack described as RAM. This is like "set mem > inaccessible-by-default", but only for stack unwinding. > > WDYT - do those make sense? Sure. > >> 2008-09-17 Doug Evans >> >> * dcache.c (state_chars): New static global. >> (ENTRY_INVALID,ENTRY_VALID): Renamed from ENTRY_BAD,ENTRY_OK. >> All uses updated. >> (dcache_info): Print cache state as mnemonically useful letters instead >> of magic numbers. >> (_initialize_dcache): Mark "set remotecache" as deprecated. >> * doc/gdb.texinfo (info dcache): Update. > > The changes other than to "set remotecache" look OK to me (remember > that doc has its own ChangeLog). Checked in (w/o remotecache). Thanks. IWBN to still at least add a comment or some such to the code so the next person won't look at it and waste time trying errant fixes.