/* Memory-access and commands for remote VxWorks processes, for GDB.
- Copyright (C) 1990-1991 Free Software Foundation, Inc.
+ Copyright 1990, 1991, 1992 Free Software Foundation, Inc.
Contributed by Wind River Systems and Cygnus Support.
This file is part of GDB.
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "defs.h"
-#include "param.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 "xdr_rdb.h"
#include "dbgRpcLib.h"
-/* get rid of value.h if possible */
-#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 */
push_target (&vx_run_ops);
inferior_pid = taskStart.pid;
-#if defined (START_INFERIOR_HOOK)
- START_INFERIOR_HOOK ();
-#endif
-
/* We will get a trace trap after one instruction.
Insert breakpoints and continue. */
/* Install inferior's terminal modes. */
target_terminal_inferior ();
- /* remote_start(args); */
- /* trap_expected = 0; */
stop_soon_quietly = 1;
wait_for_inferior (); /* Get the task spawn event */
stop_soon_quietly = 0;
void
vx_run_files_info ()
{
- printf ("\tRunning %s VxWorks process 0x%x",
+ printf ("\tRunning %s VxWorks process %s",
vx_running? "child": "attached",
- inferior_pid);
+ local_hex_string(inferior_pid));
if (vx_running)
printf (", function `%s'", vx_running);
printf(".\n");
immediate_quit--;
/* FIXME, for now we ignore data_addr and bss_addr. */
- symbol_file_add (arg_string, from_tty, text_addr, 0);
+ (void) symbol_file_add (arg_string, from_tty, text_addr, 0, 0);
}
#ifdef FIXME /* Not ready for prime time */
sleep_ms (200); /* FIXME Don't kill the network too badly */
}
else if (pid != inferior_pid)
- fatal ("Bad pid for debugged task: 0x%x\n", pid);
+ fatal ("Bad pid for debugged task: %s\n", local_hex_string(pid));
} while (pid == 0);
/* FIXME, eventually do more then SIGTRAP on everything... */
case EVENT_ZERO_DIV: /* Division by zero */
WSETSTOP (w, SIGFPE); /* Like Unix, call it a float exception. */
+ break;
case EVENT_SIGNAL:
/* The target is not running Unix, and its
struct ldfile *pLoadFile = (struct ldfile *)arg;
printf("\t%s: ", pLoadFile->name);
- symbol_file_add (pLoadFile->name, 0, pLoadFile->txt_addr, 0);
+ (void) symbol_file_add (pLoadFile->name, 0, pLoadFile->txt_addr, 0, 0);
printf ("ok\n");
return 1;
}
error ("Invalid process-id -- give a single number in decimal or 0xhex");
if (from_tty)
- printf ("Attaching pid 0x%x.\n", pid);
+ printf ("Attaching pid %s.\n", local_hex_string(pid));
bzero ((char *)&ptrace_in, sizeof (ptrace_in));
bzero ((char *)&ptrace_out, sizeof (ptrace_out));
inferior_pid = pid;
vx_running = 0;
-#if defined (START_INFERIOR_HOOK)
- START_INFERIOR_HOOK ();
-#endif
-
mark_breakpoints_out ();
/* Set up the "saved terminal modes" of the inferior
error ("Argument given to VxWorks \"detach\".");
if (from_tty)
- printf ("Detaching pid 0x%x.\n", inferior_pid);
+ printf ("Detaching pid %s.\n", local_hex_string(inferior_pid));
if (args) /* FIXME, should be possible to leave suspended */
signal = atoi (args);
error ("Argument given to VxWorks \"kill\".");
if (from_tty)
- printf ("Killing pid 0x%x.\n", inferior_pid);
+ printf ("Killing pid %s.\n", local_hex_string(inferior_pid));
bzero ((char *)&ptrace_in, sizeof (ptrace_in));
bzero ((char *)&ptrace_out, sizeof (ptrace_out));
0, 0, 0, 0, 0, /* terminal stuff */
0, /* vx_kill, */
vx_load_command,
- 0, /* call_function */
vx_lookup_symbol,
vx_create_inferior, 0, /* mourn_inferior */
core_stratum, 0, /* next */
0, 0, 0, 0, 0, /* terminal stuff */
vx_kill,
vx_load_command,
- call_function_by_hand, /* FIXME, calling fns is maybe botched? */
vx_lookup_symbol,
0, vx_mourn_inferior,
process_stratum, 0, /* next */