t = find_core_target ();
if (t == NULL)
- error ("GDB can't read core files on this machine.");
+ error (_("GDB can't read core files on this machine."));
if (!filename)
(t->to_detach) (filename, from_tty);
}
\f
-/* If there are two or more functions that wish to hook into exec_file_command,
- * this function will call all of the hook functions. */
+/* If there are two or more functions that wish to hook into
+ exec_file_command, this function will call all of the hook
+ functions. */
static void
call_extra_exec_file_hooks (char *filename)
* and the subsequent hooks called. */
if (exec_file_hook_count == 0)
{
- /* If this is the first extra hook, initialize the hook array. */
+ /* If this is the first extra hook, initialize the hook array. */
exec_file_extra_hooks = (hook_type *) xmalloc (sizeof (hook_type));
exec_file_extra_hooks[0] = deprecated_exec_file_display_hook;
deprecated_exec_file_display_hook = call_extra_exec_file_hooks;
if (exec_bfd && core_bfd)
{
if (!core_file_matches_executable_p (core_bfd, exec_bfd))
- warning ("core file may not match specified executable file.");
+ warning (_("core file may not match specified executable file."));
else if (bfd_get_mtime (exec_bfd) > bfd_get_mtime (core_bfd))
- warning ("exec file is newer than core file.");
+ warning (_("exec file is newer than core file."));
}
}
if (!err)
return NULL;
- error ("No executable file specified.\n\
-Use the \"file\" or \"exec-file\" command.");
+ error (_("No executable file specified.\n\
+Use the \"file\" or \"exec-file\" command."));
return NULL;
}
\f
/* Same as target_write_memory, but report an error if can't write. */
void
-write_memory (CORE_ADDR memaddr, char *myaddr, int len)
+write_memory (CORE_ADDR memaddr, const bfd_byte *myaddr, int len)
{
int status;
-
- status = target_write_memory (memaddr, myaddr, len);
+ bfd_byte *bytes = alloca (len);
+
+ memcpy (bytes, myaddr, len);
+ status = target_write_memory (memaddr, bytes, len);
if (status != 0)
memory_error (status, memaddr);
}