aboutsummaryrefslogtreecommitdiff
path: root/gdb/remote.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/remote.c')
-rw-r--r--gdb/remote.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/gdb/remote.c b/gdb/remote.c
index d14c6c2..d5a5cf6 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -55,6 +55,8 @@
#include "gdbcore.h" /* for exec_bfd */
+#include "remote-fileio.h"
+
/* Prototypes for local functions */
static void cleanup_sigint_signal_handler (void *dummy);
static void initialize_sigint_signal_handler (void);
@@ -67,10 +69,6 @@ void async_remote_interrupt_twice (gdb_client_data);
static void build_remote_gdbarch_data (void);
-static int remote_write_bytes (CORE_ADDR memaddr, char *myaddr, int len);
-
-static int remote_read_bytes (CORE_ADDR memaddr, char *myaddr, int len);
-
static void remote_files_info (struct target_ops *ignore);
static int remote_xfer_memory (CORE_ADDR memaddr, char *myaddr,
@@ -2953,6 +2951,9 @@ remote_wait (ptid_t ptid, struct target_waitstatus *status)
case 'E': /* Error of some sort */
warning ("Remote failure reply: %s", buf);
continue;
+ case 'F': /* File-I/O request */
+ remote_fileio_request (buf);
+ continue;
case 'T': /* Status with PC, SP, FP, ... */
{
int i;
@@ -3204,6 +3205,9 @@ remote_async_wait (ptid_t ptid, struct target_waitstatus *status)
case 'E': /* Error of some sort */
warning ("Remote failure reply: %s", buf);
continue;
+ case 'F': /* File-I/O request */
+ remote_fileio_request (buf);
+ continue;
case 'T': /* Status with PC, SP, FP, ... */
{
int i;
@@ -3758,7 +3762,7 @@ check_binary_download (CORE_ADDR addr)
Returns number of bytes transferred, or 0 (setting errno) for
error. Only transfer a single packet. */
-static int
+int
remote_write_bytes (CORE_ADDR memaddr, char *myaddr, int len)
{
unsigned char *buf;
@@ -3902,7 +3906,7 @@ remote_write_bytes (CORE_ADDR memaddr, char *myaddr, int len)
caller and its callers caller ;-) already contains code for
handling partial reads. */
-static int
+int
remote_read_bytes (CORE_ADDR memaddr, char *myaddr, int len)
{
char *buf;
@@ -6276,4 +6280,7 @@ Set use of remote protocol `Z' packets",
set_remote_protocol_Z_packet_cmd,
show_remote_protocol_Z_packet_cmd,
&remote_set_cmdlist, &remote_show_cmdlist);
+
+ /* Eventually initialize fileio. See fileio.c */
+ initialize_remote_fileio (remote_set_cmdlist, remote_show_cmdlist);
}