X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Fremote-fileio.c;h=e20d209ca1ea84b0b44274187a1e3d654e9748b0;hb=241fd515ad94fa11d4608d4fe8108c382792d3be;hp=d840c56bd61d727f7fe3ff0ae7d7d5e985654dd8;hpb=c6ca3dab4a071afab5d1efe8c82ed7972062fde0;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/remote-fileio.c b/gdb/remote-fileio.c index d840c56bd6..e20d209ca1 100644 --- a/gdb/remote-fileio.c +++ b/gdb/remote-fileio.c @@ -1,7 +1,6 @@ /* Remote File-I/O communications - Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 - Free Software Foundation, Inc. + Copyright (C) 2003-2014 Free Software Foundation, Inc. This file is part of GDB. @@ -21,17 +20,18 @@ /* See the GDB User Guide for details of the GDB remote protocol. */ #include "defs.h" -#include "gdb_string.h" +#include #include "gdbcmd.h" #include "remote.h" #include "gdb/fileio.h" #include "gdb_wait.h" -#include "gdb_stat.h" +#include #include "exceptions.h" #include "remote-fileio.h" #include "event-loop.h" #include "target.h" #include "filenames.h" +#include "filestuff.h" #include #include @@ -513,7 +513,7 @@ remote_fileio_sig_exit (void) static void async_remote_fileio_interrupt (gdb_client_data arg) { - deprecated_throw_reason (RETURN_QUIT); + quit (); } static void @@ -640,7 +640,7 @@ remote_fileio_func_open (char *buf) } remote_fio_no_longjmp = 1; - fd = open (pathname, flags, mode); + fd = gdb_open_cloexec (pathname, flags, mode); if (fd < 0) { remote_fileio_return_errno (-1); @@ -683,7 +683,7 @@ remote_fileio_func_read (char *buf) long target_fd, num; LONGEST lnum; CORE_ADDR ptrval; - int fd, ret, retlength; + int fd, ret; gdb_byte *buffer; size_t length; off_t old_offset, new_offset; @@ -1134,7 +1134,7 @@ static void remote_fileio_func_fstat (char *buf) { CORE_ADDR ptrval; - int fd, ret, retlength; + int fd, ret; long target_fd; LONGEST lnum; struct stat st; @@ -1213,7 +1213,7 @@ remote_fileio_func_gettimeofday (char *buf) { LONGEST lnum; CORE_ADDR ptrval; - int ret, retlength; + int ret; struct timeval tv; struct fio_timeval ftv; @@ -1282,7 +1282,7 @@ static void remote_fileio_func_system (char *buf) { CORE_ADDR ptrval; - int ret, length, retlength; + int ret, length; char *cmdline = NULL; /* Parameter: Ptr to commandline / length incl. trailing zero */ @@ -1416,7 +1416,8 @@ remote_fileio_request (char *buf, int ctrlc_pending_p) remote_fio_ctrl_c_flag = 0; remote_fio_no_longjmp = 0; - ex = catch_exceptions (uiout, do_remote_fileio_request, (void *)buf, + ex = catch_exceptions (current_uiout, + do_remote_fileio_request, (void *)buf, RETURN_MASK_ALL); switch (ex) {