/* Remote target communications for serial-line targets using SDS' protocol.
- Copyright 1997, 1998, 1999, 2000, 2001, 2002 Free Software
+ Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2004 Free Software
Foundation, Inc.
This file is part of GDB.
static void sds_mourn (void);
-static void sds_create_inferior (char *, char *, char **);
-
static void sds_load (char *, int);
static int getmessage (unsigned char *, int);
static void sds_kill (void);
-static int tohex (int);
-
static int fromhex (int);
static void sds_detach (char *, int);
/* Clean up connection to a remote debugger. */
-/* ARGSUSED */
static void
sds_close (int quitting)
{
error ("Reply contains invalid hex digit %d", a);
}
-/* Convert number NIB to a hex digit. */
-
-static int
-tohex (int nib)
-{
- if (nib < 10)
- return '0' + nib;
- else
- return 'a' + nib - 10;
-}
-
static int
tob64 (unsigned char *inbuf, char *outbuf, int len)
{
/* Read the remote registers into the block REGS. */
/* Currently we just read all the registers, so we don't use regno. */
-/* ARGSUSED */
static void
sds_fetch_registers (int regno)
{
unsigned char buf[PBUFSIZ];
int i, retlen;
- char regs[REGISTER_BYTES];
+ char *regs = alloca (DEPRECATED_REGISTER_BYTES);
/* Unimplemented registers read as all bits zero. */
- memset (regs, 0, REGISTER_BYTES);
+ memset (regs, 0, DEPRECATED_REGISTER_BYTES);
buf[0] = 18;
buf[1] = 1;
/* (should warn about reply too short) */
for (i = 0; i < NUM_REGS; i++)
- supply_register (i, ®s[REGISTER_BYTE (i)]);
+ supply_register (i, ®s[DEPRECATED_REGISTER_BYTE (i)]);
}
/* Prepare to store registers. Since we may send them all, we have to
sds_prepare_to_store (void)
{
/* Make sure the entire registers array is valid. */
- deprecated_read_register_bytes (0, (char *) NULL, REGISTER_BYTES);
+ deprecated_read_register_bytes (0, (char *) NULL, DEPRECATED_REGISTER_BYTES);
}
/* Store register REGNO, or all registers if REGNO == -1, from the contents
if SHOULD_WRITE is nonzero. Returns length of data written or
read; 0 for error. TARGET is unused. */
-/* ARGSUSED */
static int
sds_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int should_write,
struct mem_attrib *attrib, struct target_ops *target)
}
static void
-sds_create_inferior (char *exec_file, char *args, char **env)
+sds_create_inferior (char *exec_file, char *args, char **env, int from_tty)
{
inferior_ptid = pid_to_ptid (42000);