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. */
+ /* User-settable option, "trust-readonly-sections". If true,
+ then memory from any SEC_READONLY bfd section may be read
+ directly from the bfd file. */
struct section_table *secp;
secp < current_target.to_sections_end;
secp++)
{
- if (memaddr >= secp->addr && memaddr < secp->endaddr)
- return xfer_memory (memaddr, myaddr, len, 0,
- attrib, ¤t_target);
+ if (bfd_get_section_flags (secp->bfd, secp->the_bfd_section)
+ & SEC_READONLY)
+ if (memaddr >= secp->addr && memaddr < secp->endaddr)
+ return xfer_memory (memaddr, myaddr, len, 0,
+ attrib, ¤t_target);
}
}
while (reg_len > 0)
{
if (region->attrib.cache)
- res = dcache_xfer_memory(target_dcache, memaddr, myaddr,
+ res = dcache_xfer_memory (target_dcache, memaddr, myaddr,
reg_len, write);
else
- res = do_xfer_memory(memaddr, myaddr, reg_len, write,
+ res = do_xfer_memory (memaddr, myaddr, reg_len, write,
®ion->attrib);
if (res <= 0)
add_com ("monitor", class_obscure, do_monitor_command,
"Send a command to the remote monitor (remote targets only).");
- target_dcache = dcache_init();
+ target_dcache = dcache_init ();
}