From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29933 invoked by alias); 31 Oct 2003 23:59:29 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 29924 invoked from network); 31 Oct 2003 23:59:28 -0000 Received: from unknown (HELO palrel11.hp.com) (156.153.255.246) by sources.redhat.com with SMTP; 31 Oct 2003 23:59:28 -0000 Received: from hplms2.hpl.hp.com (hplms2.hpl.hp.com [15.0.152.33]) by palrel11.hp.com (Postfix) with ESMTP id D4BFE1C00886; Fri, 31 Oct 2003 15:59:27 -0800 (PST) Received: from napali.hpl.hp.com (napali.hpl.hp.com [15.4.89.123]) by hplms2.hpl.hp.com (8.12.10/8.12.10/HPL-PA Hub) with ESMTP id h9VNxQRU011366; Fri, 31 Oct 2003 15:59:27 -0800 (PST) Received: from napali.hpl.hp.com (napali [127.0.0.1]) by napali.hpl.hp.com (8.12.3/8.12.3/Debian-6.6) with ESMTP id h9VNxQFO011081; Fri, 31 Oct 2003 15:59:26 -0800 Received: (from davidm@localhost) by napali.hpl.hp.com (8.12.3/8.12.3/Debian-6.6) id h9VNxQuH011077; Fri, 31 Oct 2003 15:59:26 -0800 From: David Mosberger MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16290.63325.998023.981181@napali.hpl.hp.com> Date: Fri, 31 Oct 2003 23:59:00 -0000 To: Andrew Cagney Cc: davidm@hpl.hp.com, Marcel Moolenaar , "J. Johnston" , gdb-patches@sources.redhat.com, Kevin Buettner Subject: Re: RFA: ia64 portion of libunwind patch In-Reply-To: <3FA2F37E.1020108@redhat.com> References: <3FA2B71A.3080905@redhat.com> <20031031213551.GA67387@dhcp01.pn.xcllnt.net> <16290.59792.76966.437973@napali.hpl.hp.com> <3FA2F37E.1020108@redhat.com> Reply-To: davidm@hpl.hp.com X-URL: http://www.hpl.hp.com/personal/David_Mosberger/ X-SW-Source: 2003-10/txt/msg00900.txt.bz2 >>>>> On Fri, 31 Oct 2003 18:42:54 -0500, Andrew Cagney said: >> On Fri, 31 Oct 2003 13:35:51 -0800, Marcel Moolenaar >> said: >> >> Marcel> Since libunwind already does its own caching, we may be Marcel> better off not caching in gdb. >> That's true. However, note that by default, caching is not >> enabled for remote unwinding (which is what gdb does). To enable >> caching, gdb would have to make a call of the form: >> >> unw_set_caching_policy(ADDR_SPACE, UNW_CACHE_GLOBAL); >> >> Also, whenever something changes in the target that could >> invalidate cached unwind info, gdb would have to call: >> >> unw_flush_cache(ADDR_SPACE, LO, HI); >> where LO and HI is the address range that was affected (or LO=0, >> HI=0 to flush the entire cache). Andrew> Just FYI, for GDB, it will be better to let the target stack Andrew> to do the cache management. That way the user can Andrew> set/override the policy. For instance, in the case in Andrew> question, the user would be inane to specify anything other Andrew> than: Andrew> (gdb) set trust-readonly-sections 1 Andrew> (which causes all read-only reads to be handled locally) Andrew> this is also why the issue isn't really that much of a Andrew> problem. Just for clarification: note that libunwind doesn't cache the raw bits. Instead, it caches the decoded unwind information, so it's really a higher-level cache. --david