/* Memory-access and commands for remote VxWorks processes, for GDB.
- Copyright (C) 1990 Free Software Foundation, Inc.
+ Copyright 1990, 1991 Free Software Foundation, Inc.
Contributed by Wind River Systems and Cygnus Support.
This file is part of GDB.
-GDB is free software; you can redistribute it and/or modify
+This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 1, or (at your option)
-any later version.
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
-GDB is distributed in the hope that it will be useful,
+This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
-along with GDB; see the file COPYING. If not, write to
-the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+#define TM_FILE_OVERRIDE
#include "defs.h"
#include "tm-vxworks68.h"
-#include "param-no-tm.h"
#include "frame.h"
#include "inferior.h"
#include "wait.h"
#include "symtab.h"
#include "symfile.h" /* for struct complaint */
-#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <signal.h>
#include <value.h>
#include <symtab.h>
-extern value call_function_by_hand ();
extern void symbol_file_command ();
extern int stop_soon_quietly; /* for wait_for_inferior */
#ifdef FIXME
/* FIXME, function calls are really fried. GO back to manual method. */
value
-vx_call_function (function, nargs, args)
+call_function (function, nargs, args)
value function;
int nargs;
value *args;
start_sp = text_end;
errcode = target_write_memory (start_sp, dummy1, sizeof dummy);
if (errcode != 0)
- error ("Cannot write text segment -- call_function failed");
+ error ("Cannot write text segment -- vx_call_function failed");
}
#endif /* After text_end. */
#endif /* Not on stack. */
to the structure, not the structure itself. */
if (REG_STRUCT_HAS_ADDR (using_gcc))
for (i = nargs - 1; i >= 0; i--)
- if (TYPE_CODE (VALUE_TYPE (args[i])) == TYPE_CODE_STRUCT)
+ if ( TYPE_CODE (VALUE_TYPE (args[i])) == TYPE_CODE_STRUCT
+ || TYPE_CODE (VALUE_TYPE (args[i])) == TYPE_CODE_UNION)
{
CORE_ADDR addr;
#if !(1 INNER_THAN 2)
if (!args)
error_no_arg ("target machine name");
+ target_preopen ();
+
printf ("Attaching remote machine across net...\n");
fflush (stdout);
return status;
}
+/* A vxprocess target should be started via "run" not "target". */
+/*ARGSUSED*/
+static void
+vx_proc_open (name, from_tty)
+ char *name;
+ int from_tty;
+{
+ error ("Use the \"run\" command to start a VxWorks process.");
+}
+
/* Target ops structure for accessing memory and such over the net */
struct target_ops vx_ops = {
"vxworks", "VxWorks target memory via RPC over TCP/IP",
+ "Use VxWorks target memory. \n\
+Specify the name of the machine to connect to.",
vx_open, 0, /* vx_detach, */
0, 0, /* resume, wait */
0, 0, /* read_reg, write_reg */
0, 0, 0, 0, 0, /* terminal stuff */
0, /* vx_kill, */
vx_add_file_command,
- call_function_by_hand, /* FIXME, calling fns is maybe botched? */
vx_lookup_symbol,
vx_create_inferior, 0, /* mourn_inferior */
core_stratum, 0, /* next */
struct target_ops vx_run_ops = {
"vxprocess", "VxWorks process",
- vx_open, 0, /* vx_detach, */
+ "VxWorks process, started by the \"run\" command.",
+ vx_proc_open, 0, /* vx_detach, */
vx_resume, vx_wait,
vx_read_register, vx_write_register,
vx_prepare_to_store, vx_convert_to_virtual, vx_convert_from_virtual,
0, 0, 0, 0, 0, /* terminal stuff */
0, /* vx_kill, */
vx_add_file_command,
- call_function_by_hand, /* FIXME, calling fns is maybe botched? */
vx_lookup_symbol,
vx_create_inferior, vx_mourn_inferior,
process_stratum, 0, /* next */