Andrew Cagney wrote: > > > *************** do_xfer_memory (CORE_ADDR memaddr, char > > *** 857,862 **** > > --- 859,883 ---- > > 0. */ > > errno = 0; > > > > + if (!write && trust_readonly) > > + { > > + /* User-settable option, "trust-readonly". If true, then > > + memory from any SEC_READONLY bfd section may be read > > + directly from the bfd file. */ > > + > > + struct section_table *secp; > > + > > + for (secp = current_target.to_sections; > > + secp < current_target.to_sections_end; > > + secp++) > > + { > > + /* FIXME: take it only if it's entirely within the section. */ > > + if (memaddr >= secp->addr && memaddr + len <= secp->endaddr) > > + return xfer_memory (memaddr, myaddr, len, 0, > > + attrib, ¤t_target); > > My understanding of do_xfer_memory() is that it is allowed to do partial > transfers. Hence, here, if the data doesn't all lie in the section, it > is safe to truncate the transfer and return the number of bytes transfered. Thanks. Implementing both this suggestion and your other one about using "add_set_boolean_cmd", I have committed the patch in the new form attached below: Eli may now nag me for doco, and you may nag me for a NEWS entry. ;-)