From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21823 invoked by alias); 24 Jan 2002 05:45:45 -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 21506 invoked from network); 24 Jan 2002 05:44:28 -0000 Received: from unknown (HELO nevyn.them.org) (128.2.145.6) by sources.redhat.com with SMTP; 24 Jan 2002 05:44:28 -0000 Received: from drow by nevyn.them.org with local (Exim 3.33 #1 (Debian)) id 16Tcgd-00033O-00; Thu, 24 Jan 2002 00:44:35 -0500 Date: Wed, 23 Jan 2002 21:45:00 -0000 From: Daniel Jacobowitz To: Michael Snyder Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] New option "trust-readonly-sections" Message-ID: <20020124004435.A11710@nevyn.them.org> Mail-Followup-To: Michael Snyder , gdb-patches@sources.redhat.com References: <200201240323.g0O3NI905339@reddwarf.cygnus.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200201240323.g0O3NI905339@reddwarf.cygnus.com> User-Agent: Mutt/1.3.23i X-SW-Source: 2002-01/txt/msg00715.txt.bz2 On Wed, Jan 23, 2002 at 07:23:18PM -0800, Michael Snyder wrote: > > This is an optimization mainly for remote debugging, or any > context where reading from the child's memory is expensive. > > In a nutshell, if you trust that read-only sections will really > not be modified, you can advise GDB of this fact, and GDB will > then satisfy all memory reads from read-only sections by reading > from the object file, instead of from the child/target. > > Naturally it defaults to 'off'. > > On targets that do a lot of prologue analysis (which > involves lots of reads from the text section), this can > be a huge speed win. > > 2002-01-15 Michael Snyder > > * target.c: New command, "set trust-readonly on". > (do_xfer_memory): Honor the suggestion to trust readonly sections > by reading them from the object file instead of from the target. I'd rather see this default to on. If you give GDB a binary, it's reasonable that GDB read from it - I though it did in a lot of cases, but maybe I was mistaken. If you know it will be modified, then documenting that you must tell GDB that is reasonable. IMHO. -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer