* corefile.c (write_memory): Remove unnecessary copying.
authorDoug Evans <dje@google.com>
Fri, 12 Sep 2008 20:40:57 +0000 (20:40 +0000)
committerDoug Evans <dje@google.com>
Fri, 12 Sep 2008 20:40:57 +0000 (20:40 +0000)
gdb/ChangeLog
gdb/corefile.c

index 86ba16ef6fb2502606bdee09031f1fa577fcf0e9..3a6dcea209aa7e0eb1c3bb6522ac670cd21d86dc 100644 (file)
@@ -1,5 +1,7 @@
 2008-09-12  Doug Evans  <dje@google.com>
 
+       * corefile.c (write_memory): Remove unnecessary copying.
+
        * sol-thread.c (_initialize_sol_thread): Add FIXME regarding
        order of _initialize_* fns.
 
index 726d9fcc5fabc5b25220ed02cd16de4ccbe8e2b3..2be4e260f5b90838f8a9b22d38b48495eeaf6d58 100644 (file)
@@ -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);
 }