You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "defs.h"
#include "frame.h"
#include "objfiles.h"
#include "gdb-stabs.h"
-#include <string.h>
+#include "gdb_string.h"
#include <errno.h>
#include <signal.h>
#include <fcntl.h>
/* Read a register or registers from the remote system. */
-static void
+void
net_read_registers (reg_buf, len, procnum)
char *reg_buf;
int len;
C_bytes out_data;
char message[100];
- bzero ((char *) &ptrace_in, sizeof (ptrace_in));
- bzero ((char *) &ptrace_out, sizeof (ptrace_out));
+ memset ((char *) &ptrace_in, '\0', sizeof (ptrace_in));
+ memset ((char *) &ptrace_out, '\0', sizeof (ptrace_out));
/* Initialize RPC input argument structure. */
error (rpcerr);
if (ptrace_out.status == -1)
{
- errno = ptrace_out.errno_val;
+ errno = ptrace_out.errno;
sprintf (message, "reading %s registers", (procnum == PTRACE_GETREGS)
? "general-purpose"
: "floating-point");
C_bytes in_data;
char message[100];
- bzero ((char *) &ptrace_in, sizeof (ptrace_in));
- bzero ((char *) &ptrace_out, sizeof (ptrace_out));
+ memset ((char *) &ptrace_in, '\0', sizeof (ptrace_in));
+ memset ((char *) &ptrace_out, '\0', sizeof (ptrace_out));
/* Initialize RPC input argument structure. */
error (rpcerr);
if (ptrace_out.status == -1)
{
- errno = ptrace_out.errno_val;
+ errno = ptrace_out.errno;
sprintf (message, "writing %s registers", (procnum == PTRACE_SETREGS)
? "general-purpose"
: "floating-point");
Ptrace_return ptrace_out;
C_bytes data;
enum ptracereq request;
+ int nleft, nxfer;
memset ((char *) &ptrace_in, '\0', sizeof (ptrace_in));
memset ((char *) &ptrace_out, '\0', sizeof (ptrace_out));
code chosen by the target so that a later perror () will
say something meaningful. */
- errno = ptrace_out.errno_val;
+ errno = ptrace_out.errno;
}
}
ANOFFSET (offs, SECT_OFF_DATA) = data_addr - ss.data_start;
ANOFFSET (offs, SECT_OFF_BSS) = bss_addr - ss.bss_start;
objfile_relocate (objfile, offs);
-
- /* Need to do this *after* things are relocated. */
- breakpoint_re_set ();
}
/* This function allows the addition of incrementally linked object files. */
}
/* It worked... */
- push_target (&vx_run_ops);
- /* The unsigned long pid will get turned into a signed int here,
- but it doesn't seem to matter. inferior_pid must be signed
- in order for other parts of GDB to work correctly. */
- 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
- based on what modes we are starting it with. */
-
- target_terminal_init ();
-
- /* Install inferior's terminal modes. */
-
- target_terminal_inferior ();
- /* We will get a task spawn event immediately. */
+ inferior_pid = pid;
+ push_target (&vx_run_ops);
- init_wait_for_inferior ();
- clear_proceed_status ();
- stop_soon_quietly = 1;
- wait_for_inferior ();
- stop_soon_quietly = 0;
- normal_stop ();
+ if (vx_running)
+ free (vx_running);
+ vx_running = 0;
}
-
/* detach_command --
takes a program previously attached to and detaches it.
The program resumes execution and will no longer stop
vx_create_inferior, 0, /* mourn_inferior */
0, /* can_run */
0, /* notice_signals */
+ 0, /* thread_alive */
0, /* to_stop */
core_stratum, 0, /* next */
1, 1, 0, 0, 0, /* all mem, mem, stack, regs, exec */
0, vx_mourn_inferior,
0, /* can_run */
0, /* notice_signals */
+ 0, /* thread_alive */
0, /* to_stop */
process_stratum, 0, /* next */
0, /* all_mem--off to avoid spurious msg in "i files" */