Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(440)

Side by Side Diff: gdb/remote-fileio.c

Issue 11969036: Merge GDB 7.5.1 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@master
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « gdb/remote.c ('k') | gdb/remote-m32r-sdi.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Remote File-I/O communications 1 /* Remote File-I/O communications
2 2
3 Copyright (C) 2003, 2005-2012 Free Software Foundation, Inc. 3 Copyright (C) 2003, 2005-2012 Free Software Foundation, Inc.
4 4
5 This file is part of GDB. 5 This file is part of GDB.
6 6
7 This program is free software; you can redistribute it and/or modify 7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by 8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or 9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version. 10 (at your option) any later version.
(...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after
675 remote_fileio_close_target_fd ((int) num); 675 remote_fileio_close_target_fd ((int) num);
676 remote_fileio_return_success (0); 676 remote_fileio_return_success (0);
677 } 677 }
678 678
679 static void 679 static void
680 remote_fileio_func_read (char *buf) 680 remote_fileio_func_read (char *buf)
681 { 681 {
682 long target_fd, num; 682 long target_fd, num;
683 LONGEST lnum; 683 LONGEST lnum;
684 CORE_ADDR ptrval; 684 CORE_ADDR ptrval;
685 int fd, ret, retlength; 685 int fd, ret;
686 gdb_byte *buffer; 686 gdb_byte *buffer;
687 size_t length; 687 size_t length;
688 off_t old_offset, new_offset; 688 off_t old_offset, new_offset;
689 689
690 /* 1. Parameter: file descriptor */ 690 /* 1. Parameter: file descriptor */
691 if (remote_fileio_extract_int (&buf, &target_fd)) 691 if (remote_fileio_extract_int (&buf, &target_fd))
692 { 692 {
693 remote_fileio_ioerror (); 693 remote_fileio_ioerror ();
694 return; 694 return;
695 } 695 }
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
1126 return; 1126 return;
1127 } 1127 }
1128 } 1128 }
1129 remote_fileio_return_success (ret); 1129 remote_fileio_return_success (ret);
1130 } 1130 }
1131 1131
1132 static void 1132 static void
1133 remote_fileio_func_fstat (char *buf) 1133 remote_fileio_func_fstat (char *buf)
1134 { 1134 {
1135 CORE_ADDR ptrval; 1135 CORE_ADDR ptrval;
1136 int fd, ret, retlength; 1136 int fd, ret;
1137 long target_fd; 1137 long target_fd;
1138 LONGEST lnum; 1138 LONGEST lnum;
1139 struct stat st; 1139 struct stat st;
1140 struct fio_stat fst; 1140 struct fio_stat fst;
1141 struct timeval tv; 1141 struct timeval tv;
1142 1142
1143 /* 1. Parameter: file descriptor */ 1143 /* 1. Parameter: file descriptor */
1144 if (remote_fileio_extract_int (&buf, &target_fd)) 1144 if (remote_fileio_extract_int (&buf, &target_fd))
1145 { 1145 {
1146 remote_fileio_ioerror (); 1146 remote_fileio_ioerror ();
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
1205 } 1205 }
1206 } 1206 }
1207 remote_fileio_return_success (ret); 1207 remote_fileio_return_success (ret);
1208 } 1208 }
1209 1209
1210 static void 1210 static void
1211 remote_fileio_func_gettimeofday (char *buf) 1211 remote_fileio_func_gettimeofday (char *buf)
1212 { 1212 {
1213 LONGEST lnum; 1213 LONGEST lnum;
1214 CORE_ADDR ptrval; 1214 CORE_ADDR ptrval;
1215 int ret, retlength; 1215 int ret;
1216 struct timeval tv; 1216 struct timeval tv;
1217 struct fio_timeval ftv; 1217 struct fio_timeval ftv;
1218 1218
1219 /* 1. Parameter: struct timeval pointer */ 1219 /* 1. Parameter: struct timeval pointer */
1220 if (remote_fileio_extract_long (&buf, &lnum)) 1220 if (remote_fileio_extract_long (&buf, &lnum))
1221 { 1221 {
1222 remote_fileio_ioerror (); 1222 remote_fileio_ioerror ();
1223 return; 1223 return;
1224 } 1224 }
1225 ptrval = (CORE_ADDR) lnum; 1225 ptrval = (CORE_ADDR) lnum;
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
1274 remote_fio_no_longjmp = 1; 1274 remote_fio_no_longjmp = 1;
1275 fd = remote_fileio_map_fd ((int) target_fd); 1275 fd = remote_fileio_map_fd ((int) target_fd);
1276 remote_fileio_return_success (fd == FIO_FD_CONSOLE_IN || 1276 remote_fileio_return_success (fd == FIO_FD_CONSOLE_IN ||
1277 fd == FIO_FD_CONSOLE_OUT ? 1 : 0); 1277 fd == FIO_FD_CONSOLE_OUT ? 1 : 0);
1278 } 1278 }
1279 1279
1280 static void 1280 static void
1281 remote_fileio_func_system (char *buf) 1281 remote_fileio_func_system (char *buf)
1282 { 1282 {
1283 CORE_ADDR ptrval; 1283 CORE_ADDR ptrval;
1284 int ret, length, retlength; 1284 int ret, length;
1285 char *cmdline = NULL; 1285 char *cmdline = NULL;
1286 1286
1287 /* Parameter: Ptr to commandline / length incl. trailing zero */ 1287 /* Parameter: Ptr to commandline / length incl. trailing zero */
1288 if (remote_fileio_extract_ptr_w_len (&buf, &ptrval, &length)) 1288 if (remote_fileio_extract_ptr_w_len (&buf, &ptrval, &length))
1289 { 1289 {
1290 remote_fileio_ioerror (); 1290 remote_fileio_ioerror ();
1291 return; 1291 return;
1292 } 1292 }
1293 1293
1294 if (length) 1294 if (length)
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
1470 1470
1471 add_cmd ("system-call-allowed", no_class, 1471 add_cmd ("system-call-allowed", no_class,
1472 set_system_call_allowed, 1472 set_system_call_allowed,
1473 _("Set if the host system(3) call is allowed for the target."), 1473 _("Set if the host system(3) call is allowed for the target."),
1474 &remote_set_cmdlist); 1474 &remote_set_cmdlist);
1475 add_cmd ("system-call-allowed", no_class, 1475 add_cmd ("system-call-allowed", no_class,
1476 show_system_call_allowed, 1476 show_system_call_allowed,
1477 _("Show if the host system(3) call is allowed for the target."), 1477 _("Show if the host system(3) call is allowed for the target."),
1478 &remote_show_cmdlist); 1478 &remote_show_cmdlist);
1479 } 1479 }
OLDNEW
« no previous file with comments | « gdb/remote.c ('k') | gdb/remote-m32r-sdi.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698