|
GDBserver
|
#include "server.h"#include "gdb/fileio.h"#include "hostio.h"#include <fcntl.h>#include <limits.h>#include <unistd.h>Go to the source code of this file.
Classes | |
| struct | fd_list |
Defines | |
| #define | HOSTIO_PATH_MAX (PBUFSIZ / 2 + 1) |
Functions | |
| static int | safe_fromhex (char a, int *nibble) |
| static int | require_filename (char **pp, char *filename) |
| static int | require_int (char **pp, int *value) |
| static int | require_data (char *p, int p_len, char **data, int *data_len) |
| static int | require_comma (char **pp) |
| static int | require_end (char *p) |
| static int | require_valid_fd (int fd) |
| static void | hostio_error (char *own_buf) |
| static void | hostio_packet_error (char *own_buf) |
| static void | hostio_reply (char *own_buf, int result) |
| static int | hostio_reply_with_data (char *own_buf, char *buffer, int len, int *new_packet_len) |
| static int | fileio_open_flags_to_host (int fileio_open_flags, int *open_flags_p) |
| static void | handle_open (char *own_buf) |
| static void | handle_pread (char *own_buf, int *new_packet_len) |
| static void | handle_pwrite (char *own_buf, int packet_len) |
| static void | handle_close (char *own_buf) |
| static void | handle_unlink (char *own_buf) |
| static void | handle_readlink (char *own_buf, int *new_packet_len) |
| int | handle_vFile (char *own_buf, int packet_len, int *new_packet_len) |
Variables | |
| int | remote_debug |
| static struct fd_list * | open_fds |
| #define HOSTIO_PATH_MAX (PBUFSIZ / 2 + 1) |
Definition at line 57 of file hostio.c.
Referenced by handle_open(), handle_readlink(), handle_unlink(), and require_filename().
| static int fileio_open_flags_to_host | ( | int | fileio_open_flags, |
| int * | open_flags_p | ||
| ) | [static] |
Definition at line 244 of file hostio.c.
Referenced by handle_open().
| static void handle_close | ( | char * | own_buf | ) | [static] |
Definition at line 415 of file hostio.c.
References fd_list::fd, hostio_error(), hostio_packet_error(), hostio_reply(), fd_list::next, open_fds, require_end(), require_int(), and require_valid_fd().
Referenced by handle_vFile().
| static void handle_open | ( | char * | own_buf | ) | [static] |
Definition at line 276 of file hostio.c.
References fd_list::fd, fileio_open_flags_to_host(), hostio_error(), hostio_packet_error(), HOSTIO_PATH_MAX, hostio_reply(), fd_list::next, open_fds, require_comma(), require_end(), require_filename(), require_int(), and xmalloc().
Referenced by handle_vFile().
| static void handle_pread | ( | char * | own_buf, |
| int * | new_packet_len | ||
| ) | [static] |
Definition at line 317 of file hostio.c.
References fd_list::fd, hostio_error(), hostio_packet_error(), hostio_reply_with_data(), offset, require_comma(), require_end(), require_int(), require_valid_fd(), and xmalloc().
Referenced by handle_vFile().
| static void handle_pwrite | ( | char * | own_buf, |
| int | packet_len | ||
| ) | [static] |
Definition at line 372 of file hostio.c.
References fd_list::fd, hostio_error(), hostio_packet_error(), hostio_reply(), offset, require_comma(), require_data(), require_int(), and require_valid_fd().
Referenced by handle_vFile().
| static void handle_readlink | ( | char * | own_buf, |
| int * | new_packet_len | ||
| ) | [static] |
Definition at line 479 of file hostio.c.
References hostio_error(), hostio_packet_error(), HOSTIO_PATH_MAX, hostio_reply_with_data(), require_end(), and require_filename().
Referenced by handle_vFile().
| static void handle_unlink | ( | char * | own_buf | ) | [static] |
Definition at line 452 of file hostio.c.
References hostio_error(), hostio_packet_error(), HOSTIO_PATH_MAX, hostio_reply(), require_end(), and require_filename().
Referenced by handle_vFile().
| int handle_vFile | ( | char * | own_buf, |
| int | packet_len, | ||
| int * | new_packet_len | ||
| ) |
Definition at line 516 of file hostio.c.
References handle_close(), handle_open(), handle_pread(), handle_pwrite(), handle_readlink(), and handle_unlink().
Referenced by handle_v_requests().
| static void hostio_error | ( | char * | own_buf | ) | [static] |
Definition at line 191 of file hostio.c.
References target_ops::hostio_last_error, and the_target.
Referenced by handle_close(), handle_open(), handle_pread(), handle_pwrite(), handle_readlink(), and handle_unlink().
| static void hostio_packet_error | ( | char * | own_buf | ) | [static] |
Definition at line 197 of file hostio.c.
Referenced by handle_close(), handle_open(), handle_pread(), handle_pwrite(), handle_readlink(), and handle_unlink().
| static void hostio_reply | ( | char * | own_buf, |
| int | result | ||
| ) | [static] |
Definition at line 203 of file hostio.c.
Referenced by handle_close(), handle_open(), handle_pwrite(), and handle_unlink().
| static int hostio_reply_with_data | ( | char * | own_buf, |
| char * | buffer, | ||
| int | len, | ||
| int * | new_packet_len | ||
| ) | [static] |
Definition at line 209 of file hostio.c.
References PBUFSIZ.
Referenced by handle_pread(), and handle_readlink().
| static int require_comma | ( | char ** | pp | ) | [static] |
Definition at line 156 of file hostio.c.
Referenced by handle_open(), handle_pread(), and handle_pwrite().
| static int require_data | ( | char * | p, |
| int | p_len, | ||
| char ** | data, | ||
| int * | data_len | ||
| ) | [static] |
| static int require_end | ( | char * | p | ) | [static] |
Definition at line 168 of file hostio.c.
Referenced by handle_close(), handle_open(), handle_pread(), handle_readlink(), and handle_unlink().
| static int require_filename | ( | char ** | pp, |
| char * | filename | ||
| ) | [static] |
Definition at line 63 of file hostio.c.
References HOSTIO_PATH_MAX, and safe_fromhex().
Referenced by handle_open(), handle_readlink(), and handle_unlink().
| static int require_int | ( | char ** | pp, |
| int * | value | ||
| ) | [static] |
Definition at line 93 of file hostio.c.
References safe_fromhex().
Referenced by handle_close(), handle_open(), handle_pread(), and handle_pwrite().
| static int require_valid_fd | ( | int | fd | ) | [static] |
Definition at line 177 of file hostio.c.
References fd_list::fd, and fd_list::next.
Referenced by handle_close(), handle_pread(), and handle_pwrite().
| static int safe_fromhex | ( | char | a, |
| int * | nibble | ||
| ) | [static] |
Definition at line 40 of file hostio.c.
Referenced by require_filename(), and require_int().
Definition at line 37 of file hostio.c.
Referenced by do_close(), handle_close(), handle_open(), unmark_fd_no_cloexec(), and VEC().
| int remote_debug |
Definition at line 107 of file remote-utils.c.
Referenced by getpkt(), handle_notif_ack(), notif_event_enque(), and putpkt_binary_1().
1.7.6.1