From: Doug Evans Date: Fri, 12 Sep 2008 20:40:57 +0000 (+0000) Subject: * corefile.c (write_memory): Remove unnecessary copying. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=00630ca836f7d3fcf90d78084cae1310c6fba854;p=binutils-gdb.git * corefile.c (write_memory): Remove unnecessary copying. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 86ba16ef6fb..3a6dcea209a 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,7 @@ 2008-09-12 Doug Evans + * corefile.c (write_memory): Remove unnecessary copying. + * sol-thread.c (_initialize_sol_thread): Add FIXME regarding order of _initialize_* fns. 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); }