diff options
Diffstat (limited to 'gdb/target.c')
-rw-r--r-- | gdb/target.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gdb/target.c b/gdb/target.c index 95ec4ef..529291f 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -871,9 +871,11 @@ do_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write, 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); } } |