This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] New option "trust-readonly-sections"


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  <msnyder@redhat.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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]