/* Remote target communications for serial-line targets in custom GDB protocol
- Copyright 1988, 91, 92, 93, 94, 95, 96, 97, 98, 1999
- Free Software Foundation, Inc.
+ Copyright 1988, 1991-2000 Free Software Foundation, Inc.
This file is part of GDB.
#include "bfd.h"
#include "symfile.h"
#include "target.h"
-#include "wait.h"
+#include "gdb_wait.h"
/*#include "terminal.h" */
#include "gdbcmd.h"
#include "objfiles.h"
/* Prototypes for local functions */
static void cleanup_sigint_signal_handler (void *dummy);
static void initialize_sigint_signal_handler (void);
+static int getpkt_sane (char *buf, long sizeof_buf, int forever);
static void handle_remote_sigint PARAMS ((int));
static void handle_remote_sigint_twice PARAMS ((int));
static void remote_mourn_1 PARAMS ((struct target_ops *));
-static void remote_send PARAMS ((char *buf));
+static void remote_send (char *buf, long sizeof_buf);
static int readchar PARAMS ((int timeout));
static void get_offsets PARAMS ((void));
-static int read_frame PARAMS ((char *));
+static long read_frame (char *buf, long sizeof_buf);
static int remote_insert_breakpoint PARAMS ((CORE_ADDR, char *));
static struct target_ops extended_async_remote_ops;
-/* This was 5 seconds, which is a long time to sit and wait.
- Unless this is going though some terminal server or multiplexer or
- other form of hairy serial connection, I would think 2 seconds would
- be plenty. */
-
-/* Changed to allow option to set timeout value.
- was static int remote_timeout = 2; */
-extern int remote_timeout;
-
/* FIXME: cagney/1999-09-23: Even though getpkt was called with
``forever'' still use the normal timeout mechanism. This is
currently used by the ASYNC code to guarentee that target reads
static void
build_remote_packet_sizes (void)
{
- /* Maximum number of characters in a packet. This default m68k-stub.c and
- i386-stub.c stubs. */
- remote_packet_size = 400;
+ /* Default maximum number of characters in a packet body. Many
+ remote stubs have a hardwired buffer size of 400 bytes
+ (c.f. BUFMAX in m68k-stub.c and i386-stub.c). BUFMAX-1 is used
+ as the maximum packet-size to ensure that the packet and an extra
+ NUL character can always fit in the buffer. This stops GDB
+ trashing stubs that try to squeeze an extra NUL into what is
+ already a full buffer (As of 1999-12-04 that was most stubs. */
+ remote_packet_size = 400 - 1;
/* Should REGISTER_BYTES needs more space than the default, adjust
the size accordingly. Remember that each byte is encoded as two
characters. 32 is the overhead for the packet header /
if (!in_thread_list (currthread))
{
add_thread (currthread);
+#ifdef UI_OUT
+ ui_out_text (uiout, "[New ");
+ ui_out_text (uiout, target_pid_to_str (currthread));
+ ui_out_text (uiout, "]\n");
+#else
printf_filtered ("[New %s]\n", target_pid_to_str (currthread));
+#endif
}
}
else
sprintf (&buf[2], "%x", th);
putpkt (buf);
- getpkt (buf, 0);
+ getpkt (buf, PBUFSIZ, 0);
if (gen)
general_thread = th;
else
else
sprintf (buf, "T%08x", tid);
putpkt (buf);
- getpkt (buf, 0);
+ getpkt (buf, sizeof (buf), 0);
return (buf[0] == 'O' && buf[1] == 'K');
}
pack_threadinfo_request (threadinfo_pkt, fieldset, threadid);
putpkt (threadinfo_pkt);
- getpkt (threadinfo_pkt, 0);
+ getpkt (threadinfo_pkt, PBUFSIZ, 0);
result = remote_unpack_thread_info_response (threadinfo_pkt + 2, threadid,
info);
return result;
pack_threadlist_request (threadlist_packet,
startflag, result_limit, nextthread);
putpkt (threadlist_packet);
- getpkt (t_response, 0);
+ getpkt (t_response, PBUFSIZ, 0);
*result_count =
parse_threadlist_response (t_response + 2, result_limit, &echo_nextthread,
char *buf = alloca (PBUFSIZ);
putpkt ("qC");
- getpkt (buf, 0);
+ getpkt (buf, PBUFSIZ, 0);
if (buf[0] == 'Q' && buf[1] == 'C')
return strtol (&buf[2], NULL, 16);
else
error ("Command can only be used when connected to the remote target.");
putpkt ("qfThreadInfo");
- getpkt (bufp = buf, 0);
+ bufp = buf;
+ getpkt (bufp, PBUFSIZ, 0);
if (bufp[0] == '\0') /* q packet not recognized! */
{ /* try old jmetzler method */
remote_find_new_threads ();
}
while (*bufp++ == ','); /* comma-separated list */
putpkt ("qsThreadInfo");
- getpkt (bufp = buf, 0);
+ bufp = buf;
+ getpkt (bufp, PBUFSIZ, 0);
}
}
\f
/* Now query for status so this looks just like we restarted
gdbserver from scratch. */
putpkt ("?");
- getpkt (buf, 0);
+ getpkt (buf, PBUFSIZ, 0);
}
\f
/* Clean up connection to a remote debugger. */
putpkt ("qOffsets");
- getpkt (buf, 0);
+ getpkt (buf, PBUFSIZ, 0);
if (buf[0] == '\000')
return; /* Return silently. Stub doesn't support
*/
static int
-remote_cisco_section_offsets (text_addr, data_addr, bss_addr,
- text_offs, data_offs, bss_offs)
- bfd_vma text_addr;
- bfd_vma data_addr;
- bfd_vma bss_addr;
- bfd_signed_vma *text_offs;
- bfd_signed_vma *data_offs;
- bfd_signed_vma *bss_offs;
+remote_cisco_section_offsets (bfd_vma text_addr,
+ bfd_vma data_addr,
+ bfd_vma bss_addr,
+ bfd_signed_vma *text_offs,
+ bfd_signed_vma *data_offs,
+ bfd_signed_vma *bss_offs)
{
bfd_vma text_base, data_base, bss_base;
struct minimal_symbol *start;
/* Stub for catch_errors. */
static int
-remote_start_remote_dummy (dummy)
- char *dummy;
+remote_start_remote_dummy (void *dummy)
{
start_remote (); /* Initialize gdb process mechanisms */
return 1;
{
if (name == 0)
error ("To open a remote debug connection, you need to specify what\n\
-serial device is attached to the remote system (e.g. /dev/ttya).");
+serial device is attached to the remote system\n\
+(e.g. /dev/ttyS0, /dev/ttya, COM1, etc.).");
/* See FIXME above */
wait_forever_enabled_p = 1;
/* tell the remote that we're using the extended protocol. */
char *buf = alloca (PBUFSIZ);
putpkt ("!");
- getpkt (buf, 0);
+ getpkt (buf, PBUFSIZ, 0);
}
}
{
if (name == 0)
error ("To open a remote debug connection, you need to specify what\n\
-serial device is attached to the remote system (e.g. /dev/ttya).");
+serial device is attached to the remote system\n\
+(e.g. /dev/ttyS0, /dev/ttya, COM1, etc.).");
target_preopen (from_tty);
/* tell the remote that we're using the extended protocol. */
char *buf = alloca (PBUFSIZ);
putpkt ("!");
- getpkt (buf, 0);
+ getpkt (buf, PBUFSIZ, 0);
}
}
/* Tell the remote target to detach. */
strcpy (buf, "D");
- remote_send (buf);
+ remote_send (buf, PBUFSIZ);
pop_target ();
if (from_tty)
/* Tell the remote target to detach. */
strcpy (buf, "D");
- remote_send (buf);
+ remote_send (buf, PBUFSIZ);
/* Unregister the file descriptor from the event loop. */
- if (SERIAL_IS_ASYNC_P (remote_desc))
+ if (target_is_async_p ())
SERIAL_ASYNC (remote_desc, NULL, 0);
pop_target ();
/* FIXME: ezannoni 1999-09-28: We may need to move this out of here
into infcmd.c in order to allow inferior function calls to work
NOT asynchronously. */
- if (event_loop_p && SERIAL_CAN_ASYNC_P (remote_desc))
+ if (event_loop_p && target_can_async_p ())
target_async (inferior_event_handler, 0);
/* Tell the world that the target is now executing. */
/* FIXME: cagney/1999-09-23: Is it the targets responsibility to set
this? Instead, should the client of target just assume (for
async targets) that the target is going to start executing? Is
this information already found in the continuation block? */
- if (SERIAL_IS_ASYNC_P (remote_desc))
+ if (target_is_async_p ())
target_executing = 1;
putpkt (buf);
}
unsigned char *p;
ofunc = signal (SIGINT, remote_interrupt);
- getpkt ((char *) buf, 1);
+ getpkt (buf, PBUFSIZ, 1);
signal (SIGINT, ofunc);
/* This is a hook for when we need to do something (perhaps the
{
unsigned char *p;
- if (!SERIAL_IS_ASYNC_P (remote_desc))
+ if (!target_is_async_p ())
ofunc = signal (SIGINT, remote_interrupt);
/* FIXME: cagney/1999-09-27: If we're in async mode we should
_never_ wait for ever -> test on target_is_async_p().
However, before we do that we need to ensure that the caller
knows how to take the target into/out of async mode. */
- getpkt ((char *) buf, wait_forever_enabled_p);
- if (!SERIAL_IS_ASYNC_P (remote_desc))
+ getpkt (buf, PBUFSIZ, wait_forever_enabled_p);
+ if (!target_is_async_p ())
signal (SIGINT, ofunc);
/* This is a hook for when we need to do something (perhaps the
goto got_status;
case 'O': /* Console output */
remote_console_output (buf + 1);
- continue;
+ /* Return immediately to the event loop. The event loop will
+ still be waiting on the inferior afterwards. */
+ status->kind = TARGET_WAITKIND_IGNORE;
+ goto got_status;
case '\0':
if (last_sent_signal != TARGET_SIGNAL_0)
{
set_thread (inferior_pid, 1);
sprintf (buf, "g");
- remote_send (buf);
+ remote_send (buf, PBUFSIZ);
/* Save the size of the packet sent to us by the target. Its used
as a heuristic when determining the max size of packets that the
if (remote_debug)
fprintf_unfiltered (gdb_stdlog,
"Bad register packet; fetching a new packet\n");
- getpkt (buf, 0);
+ getpkt (buf, PBUFSIZ, 0);
}
/* Reply describes registers byte by byte, each byte encoded as two
packet was not recognized. */
static int
-store_register_using_P (regno)
- int regno;
+store_register_using_P (int regno)
{
/* Try storing a single register. */
char *buf = alloca (PBUFSIZ);
*p++ = tohex (regp[i] & 0xf);
}
*p = '\0';
- remote_send (buf);
+ remote_send (buf, PBUFSIZ);
return buf[0] != '\0';
}
}
*p = '\0';
- remote_send (buf);
+ remote_send (buf, PBUFSIZ);
}
/* Use of the data cache *used* to be disabled because it loses for looking
*p = '\0';
putpkt_binary (buf, (int) (p - buf));
- getpkt (buf, 0);
+ getpkt (buf, PBUFSIZ, 0);
if (buf[0] == '\0')
{
int max_buf_size; /* Max size of packet output buffer */
unsigned char *p;
unsigned char *plen;
+ long sizeof_buf;
int plenlen;
int todo;
int nr_bytes;
/* Determine the max packet size. */
max_buf_size = get_memory_write_packet_size ();
- buf = alloca (max_buf_size + 1);
+ sizeof_buf = max_buf_size + 1; /* Space for trailing NUL */
+ buf = alloca (sizeof_buf);
/* Subtract header overhead from max payload size - $M<memaddr>,<len>:#nn */
max_buf_size -= 2 + hexnumlen (memaddr + len - 1) + 1 + hexnumlen (len) + 4;
}
putpkt_binary (buf, (int) (p - buf));
- getpkt (buf, 0);
+ getpkt (buf, sizeof_buf, 0);
if (buf[0] == 'E')
{
{
char *buf;
int max_buf_size; /* Max size of packet output buffer */
+ long sizeof_buf;
int origlen;
/* Create a buffer big enough for this packet. */
max_buf_size = get_memory_read_packet_size ();
- buf = alloca (max_buf_size);
+ sizeof_buf = max_buf_size + 1; /* Space for trailing NUL */
+ buf = alloca (sizeof_buf);
origlen = len;
while (len > 0)
*p = '\0';
putpkt (buf);
- getpkt (buf, 0);
+ getpkt (buf, sizeof_buf, 0);
if (buf[0] == 'E')
{
data_long = extract_unsigned_integer (data, len);
sprintf (buf, "t%x:%x,%x", startaddr, data_long, mask_long);
putpkt (buf);
- getpkt (buf, 0);
+ getpkt (buf, PBUFSIZ, 0);
if (buf[0] == '\0')
{
/* The stub doesn't support the 't' request. We might want to
into BUF. Report an error if we get an error reply. */
static void
-remote_send (buf)
- char *buf;
+remote_send (char *buf,
+ long sizeof_buf)
{
putpkt (buf);
- getpkt (buf, 0);
+ getpkt (buf, sizeof_buf, 0);
if (buf[0] == 'E')
error ("Remote failure reply: %s", buf);
int i;
unsigned char csum = 0;
char *buf2 = alloca (cnt + 6);
- char *junkbuf = alloca (PBUFSIZ);
+ long sizeof_junkbuf = PBUFSIZ;
+ char *junkbuf = alloca (sizeof_junkbuf);
int ch;
int tcount = 0;
switch (ch)
{
case '+':
+ case '-':
case SERIAL_TIMEOUT:
case '$':
if (started_error_output)
if (remote_debug)
fprintf_unfiltered (gdb_stdlog, "Ack\n");
return 1;
+ case '-':
+ if (remote_debug)
+ fprintf_unfiltered (gdb_stdlog, "Nak\n");
case SERIAL_TIMEOUT:
tcount++;
if (tcount > 3)
{
/* It's probably an old response, and we're out of sync.
Just gobble up the packet and ignore it. */
- getpkt (junkbuf, 0);
+ getpkt (junkbuf, sizeof_junkbuf, 0);
continue; /* Now, go look for + */
}
default:
/* Come here after finding the start of the frame. Collect the rest
into BUF, verifying the checksum, length, and handling run-length
- compression. Returns 0 on any error, 1 on success. */
+ compression. No more than sizeof_buf-1 characters are read so that
+ the buffer can be NUL terminated.
-static int
-read_frame (buf)
- char *buf;
+ Returns -1 on error, number of characters in buffer (ignoring the
+ trailing NULL) on success. (could be extended to return one of the
+ SERIAL status indications). */
+
+static long
+read_frame (char *buf,
+ long sizeof_buf)
{
unsigned char csum;
- char *bp;
+ long bc;
int c;
csum = 0;
- bp = buf;
+ bc = 0;
while (1)
{
+ /* ASSERT (bc < sizeof_buf - 1) - space for trailing NUL */
c = readchar (remote_timeout);
-
switch (c)
{
case SERIAL_TIMEOUT:
if (remote_debug)
fputs_filtered ("Timeout in mid-packet, retrying\n", gdb_stdlog);
- return 0;
+ return -1;
case '$':
if (remote_debug)
fputs_filtered ("Saw new packet start in middle of old one\n",
gdb_stdlog);
- return 0; /* Start a new packet, count retries */
+ return -1; /* Start a new packet, count retries */
case '#':
{
unsigned char pktcsum;
- *bp = '\000';
+ buf[bc] = '\0';
pktcsum = fromhex (readchar (remote_timeout)) << 4;
pktcsum |= fromhex (readchar (remote_timeout));
if (csum == pktcsum)
- return 1;
+ return bc;
if (remote_debug)
{
fputs_filtered (buf, gdb_stdlog);
fputs_filtered ("\n", gdb_stdlog);
}
- return 0;
+ /* Number of characters in buffer ignoring trailing
+ NUL. */
+ return -1;
}
case '*': /* Run length encoding */
{
repeat += fromhex (c);
}
+ /* The character before ``*'' is repeated. */
+
if (repeat > 0 && repeat <= 255
- && bp + repeat - 1 < buf + PBUFSIZ - 1)
+ && bc > 0
+ && bc + repeat < sizeof_buf - 1)
{
- memset (bp, *(bp - 1), repeat);
- bp += c;
+ memset (&buf[bc], buf[bc - 1], repeat);
+ bc += repeat;
continue;
}
- *bp = '\0';
+ buf[bc] = '\0';
printf_filtered ("Repeat count %d too large for buffer: ", repeat);
puts_filtered (buf);
puts_filtered ("\n");
- return 0;
+ return -1;
}
default:
- if (bp < buf + PBUFSIZ - 1)
+ if (bc < sizeof_buf - 1)
{
- *bp++ = c;
+ buf[bc++] = c;
csum += c;
continue;
}
- *bp = '\0';
+ buf[bc] = '\0';
puts_filtered ("Remote packet too long: ");
puts_filtered (buf);
puts_filtered ("\n");
- return 0;
+ return -1;
}
}
}
/* Read a packet from the remote machine, with error checking, and
- store it in BUF. BUF is expected to be of size PBUFSIZ. If
- FOREVER, wait forever rather than timing out; this is used while
- the target is executing user code. */
-
+ store it in BUF. If FOREVER, wait forever rather than timing out;
+ this is used (in synchronous mode) to wait for a target that is is
+ executing user code to stop. */
+/* FIXME: ezannoni 2000-02-01 this wrapper is necessary so that we
+ don't have to change all the calls to getpkt to deal with the
+ return value, because at the moment I don't know what the right
+ thing to do it for those. */
void
-getpkt (buf, forever)
- char *buf;
- int forever;
+getpkt (char *buf,
+ long sizeof_buf,
+ int forever)
+{
+ int timed_out;
+
+ timed_out = getpkt_sane (buf, sizeof_buf, forever);
+}
+
+
+/* Read a packet from the remote machine, with error checking, and
+ store it in BUF. If FOREVER, wait forever rather than timing out;
+ this is used (in synchronous mode) to wait for a target that is is
+ executing user code to stop. If FOREVER == 0, this function is
+ allowed to time out gracefully and return an indication of this to
+ the caller. */
+int
+getpkt_sane (char *buf,
+ long sizeof_buf,
+ int forever)
{
int c;
int tries;
/* We've found the start of a packet, now collect the data. */
- val = read_frame (buf);
+ val = read_frame (buf, sizeof_buf);
- if (val == 1)
+ if (val >= 0)
{
if (remote_debug)
{
fprintf_unfiltered (gdb_stdlog, "\n");
}
SERIAL_WRITE (remote_desc, "+", 1);
- return;
+ return 0;
}
/* Try the whole thing again. */
printf_unfiltered ("Ignoring packet error, continuing...\n");
SERIAL_WRITE (remote_desc, "+", 1);
+ return 1;
}
\f
static void
remote_async_kill ()
{
/* Unregister the file descriptor from the event loop. */
- if (SERIAL_IS_ASYNC_P (remote_desc))
+ if (target_is_async_p ())
SERIAL_ASYNC (remote_desc, NULL, 0);
/* For some mysterious reason, wait_for_inferior calls kill instead of
sprintf (p, ",%d", bp_size);
putpkt (buf);
- getpkt (buf, 0);
+ getpkt (buf, PBUFSIZ, 0);
if (buf[0] != '\0')
{
sprintf (p, ",%d", bp_size);
putpkt (buf);
- getpkt (buf, 0);
+ getpkt (buf, PBUFSIZ, 0);
return (buf[0] == 'E');
}
sprintf (p, ",%x", len);
putpkt (buf);
- getpkt (buf, 0);
+ getpkt (buf, PBUFSIZ, 0);
if (buf[0] == '\0' || buf [0] == 'E')
return -1;
p += hexnumstr (p, (ULONGEST) addr);
sprintf (p, ",%x", len);
putpkt (buf);
- getpkt (buf, 0);
+ getpkt (buf, PBUFSIZ, 0);
if (buf[0] == '\0' || buf [0] == 'E')
return -1;
*p = '\0';
putpkt (buf);
- getpkt (buf, 0);
+ getpkt (buf, PBUFSIZ, 0);
if (buf[0] == '\0' || buf [0] == 'E')
return -1;
*p = '\0';
putpkt(buf);
- getpkt (buf, 0);
+ getpkt (buf, PBUFSIZ, 0);
if (buf[0] == '\0' || buf [0] == 'E')
return -1;
bfd_get_section_contents (exec_bfd, s, sectdata, 0, size);
host_crc = crc32 ((unsigned char *) sectdata, size, 0xffffffff);
- getpkt (buf, 0);
+ getpkt (buf, PBUFSIZ, 0);
if (buf[0] == 'E')
error ("target memory fault, section %s, range 0x%08x -- 0x%08x",
sectname, lma, lma + size);
if (i < 0)
return i;
- getpkt (outbuf, 0);
+ getpkt (outbuf, *bufsiz, 0);
return 0;
}
static void
remote_rcmd (char *command,
- struct gdb_file *outbuf)
+ struct ui_file *outbuf)
{
int i;
char *buf = alloca (PBUFSIZ);
{
/* XXX - see also tracepoint.c:remote_get_noisy_reply() */
buf[0] = '\0';
- getpkt (buf, 0);
+ getpkt (buf, PBUFSIZ, 0);
if (buf[0] == '\0')
error ("Target does not support this command\n");
if (buf[0] == 'O' && buf[1] != 'K')
puts_filtered ("\n");
putpkt (args);
- getpkt (buf, 0);
+ getpkt (buf, PBUFSIZ, 0);
puts_filtered ("received: ");
print_packet (buf);
puts_filtered ("\n");
remote_ops.to_longname = "Remote serial target in gdb-specific protocol";
remote_ops.to_doc =
"Use a remote computer via a serial line, using a gdb-specific protocol.\n\
-Specify the serial device it is connected to (e.g. /dev/ttya).";
+Specify the serial device it is connected to\n\
+(e.g. /dev/ttyS0, /dev/ttya, COM1, etc.).";
remote_ops.to_open = remote_open;
remote_ops.to_close = remote_close;
remote_ops.to_detach = remote_detach;
*/
static void
-remote_info_process (args, from_tty)
- char *args;
- int from_tty;
+remote_info_process (char *args, int from_tty)
{
char *buf = alloca (PBUFSIZ);
error ("Command can only be used when connected to the remote target.");
putpkt ("qfProcessInfo");
- getpkt (buf, 0);
+ getpkt (buf, PBUFSIZ, 0);
if (buf[0] == 0)
return; /* Silently: target does not support this feature. */
{
remote_console_output (&buf[1]);
putpkt ("qsProcessInfo");
- getpkt (buf, 0);
+ getpkt (buf, PBUFSIZ, 0);
}
}
*/
static void
-remote_cisco_open (name, from_tty)
- char *name;
- int from_tty;
+remote_cisco_open (char *name, int from_tty)
{
if (name == 0)
error (
}
static void
-remote_cisco_close (quitting)
- int quitting;
+remote_cisco_close (int quitting)
{
remote_cisco_mode = 0;
remote_close (quitting);
extern int quit_flag;
static int
-readsocket ()
+readsocket (void)
{
int data;
}
static int
-readtty ()
+readtty (void)
{
int tty_bytecount;
}
static int
-minitelnet ()
+minitelnet (void)
{
fd_set input; /* file descriptors for select */
int tablesize; /* max number of FDs for select */
}
static int
-remote_cisco_wait (pid, status)
- int pid;
- struct target_waitstatus *status;
+remote_cisco_wait (int pid, struct target_waitstatus *status)
{
if (minitelnet () != ENTER_DEBUG)
{
remote_can_async_p (void)
{
/* We're async whenever the serial device is. */
- return SERIAL_CAN_ASYNC_P (remote_desc);
+ return (current_target.to_async_mask_value) && SERIAL_CAN_ASYNC_P (remote_desc);
}
static int
remote_is_async_p (void)
{
/* We're async whenever the serial device is. */
- return SERIAL_IS_ASYNC_P (remote_desc);
+ return (current_target.to_async_mask_value) && SERIAL_IS_ASYNC_P (remote_desc);
}
/* Pass the SERIAL event on and up to the client. One day this code
static void
remote_async (void (*callback) (enum inferior_event_type event_type, void *context), void *context)
{
+ if (current_target.to_async_mask_value == 0)
+ internal_error ("Calling remote_async when async is masked");
+
if (callback != NULL)
{
SERIAL_ASYNC (remote_desc, remote_async_serial_handler, NULL);
target. */
static void
-init_remote_async_ops ()
+init_remote_async_ops (void)
{
remote_async_ops.to_shortname = "async";
remote_async_ops.to_longname = "Remote serial target in async version of the gdb-specific protocol";
remote_async_ops.to_can_async_p = remote_can_async_p;
remote_async_ops.to_is_async_p = remote_is_async_p;
remote_async_ops.to_async = remote_async;
+ remote_async_ops.to_async_mask_value = 1;
remote_async_ops.to_magic = OPS_MAGIC;
}
remote vector and adding to it. */
static void
-init_extended_async_remote_ops ()
+init_extended_async_remote_ops (void)
{
extended_async_remote_ops = remote_async_ops;
}
static void
-set_remote_cmd (args, from_tty)
- char *args;
- int from_tty;
+set_remote_cmd (char *args, int from_tty)
{
}
terminating `#' character and checksum.",
&maintenancelist);
- add_show_from_set
- (add_set_cmd ("remotetimeout", no_class,
- var_integer, (char *) &remote_timeout,
- "Set timeout value for remote read.\n",
- &setlist),
- &showlist);
-
add_show_from_set
(add_set_cmd ("remotebreak", no_class,
var_boolean, (char *) &remote_break,