summaryrefslogtreecommitdiff
path: root/gdb/corefile.c
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2008-09-12 20:40:57 +0000
committerDoug Evans <dje@google.com>2008-09-12 20:40:57 +0000
commit7934c8abce6e34af06267734e84682eaec32cc2a (patch)
treee3cba6514216c3e8615cc9a89d3b5af2b0ec8062 /gdb/corefile.c
parent6b92174395ff1ee393cd718a2d58a9c8b5eee87e (diff)
downloadgdb-7934c8abce6e34af06267734e84682eaec32cc2a.tar.gz
* corefile.c (write_memory): Remove unnecessary copying.
Diffstat (limited to 'gdb/corefile.c')
-rw-r--r--gdb/corefile.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/gdb/corefile.c b/gdb/corefile.c
index 726d9fcc5fa..2be4e260f5b 100644
--- a/gdb/corefile.c
+++ b/gdb/corefile.c
@@ -350,10 +350,7 @@ void
write_memory (CORE_ADDR memaddr, const bfd_byte *myaddr, int len)
{
int status;
- gdb_byte *bytes = alloca (len);
-
- memcpy (bytes, myaddr, len);
- status = target_write_memory (memaddr, bytes, len);
+ status = target_write_memory (memaddr, myaddr, len);
if (status != 0)
memory_error (status, memaddr);
}