aboutsummaryrefslogtreecommitdiff
path: root/gdb/target.c
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2002-02-01 00:49:53 +0000
committerMichael Snyder <msnyder@vmware.com>2002-02-01 00:49:53 +0000
commit405f26e62fac15d3bb255ebe9dfe1fbff4950f2b (patch)
tree0fe87a10a0501e189625fdd129fcb402f18bcec2 /gdb/target.c
parent7805f93af748c57b77f6f40c892a4763c9dda8e0 (diff)
downloadgdb-405f26e62fac15d3bb255ebe9dfe1fbff4950f2b.zip
gdb-405f26e62fac15d3bb255ebe9dfe1fbff4950f2b.tar.gz
gdb-405f26e62fac15d3bb255ebe9dfe1fbff4950f2b.tar.bz2
2002-01-31 Michael Snyder <msnyder@redhat.com>
* target.c (do_xfer_memory): Add missing line to trust-readonly code: check bfd SEC_READONLY flag for section.
Diffstat (limited to 'gdb/target.c')
-rw-r--r--gdb/target.c8
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, &current_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, &current_target);
}
}