This is the mail archive of the
mailing list for the GDB project.
Re: [RFA] New option "trust-readonly-sections"
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: Michael Snyder <msnyder at cygnus dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Thu, 24 Jan 2002 00:44:35 -0500
- Subject: Re: [RFA] New option "trust-readonly-sections"
- References: <200201240323.g0O3NI905339@reddwarf.cygnus.com>
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 <email@example.com>
> * 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.
<asbestos suit on>
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