GDB (xrefs)
|
#include "defs.h"
#include "gdbcmd.h"
#include "remote.h"
#include "gdb_wait.h"
#include <sys/stat.h>
#include "remote-fileio.h"
#include "event-loop.h"
#include "target.h"
#include "filenames.h"
#include "filestuff.h"
#include <fcntl.h>
#include <sys/time.h>
#include <signal.h>
Go to the source code of this file.
Macros | |
#define | FIO_FD_INVALID -1 |
#define | FIO_FD_CONSOLE_IN -2 |
#define | FIO_FD_CONSOLE_OUT -3 |
Variables | |
struct { | |
int * fd_map | |
int fd_map_size | |
} | remote_fio_data |
static int | remote_fio_system_call_allowed = 0 |
static struct async_signal_handler * | sigint_fileio_token |
static int | remote_fio_ctrl_c_flag = 0 |
static int | remote_fio_no_longjmp = 0 |
static void(* | remote_fio_ofunc )(int) |
struct { | |
char * name | |
void(* func )(char *) | |
} | remote_fio_func_map [] |
#define FIO_FD_CONSOLE_IN -2 |
Definition at line 46 of file remote-fileio.c.
Referenced by remote_fileio_func_close(), remote_fileio_func_fstat(), remote_fileio_func_isatty(), remote_fileio_func_lseek(), remote_fileio_func_read(), remote_fileio_func_write(), and remote_fileio_init_fd_map().
#define FIO_FD_CONSOLE_OUT -3 |
Definition at line 47 of file remote-fileio.c.
Referenced by remote_fileio_func_close(), remote_fileio_func_fstat(), remote_fileio_func_isatty(), remote_fileio_func_lseek(), remote_fileio_func_read(), remote_fileio_func_write(), and remote_fileio_init_fd_map().
#define FIO_FD_INVALID -1 |
Definition at line 45 of file remote-fileio.c.
Referenced by remote_fileio_close_target_fd(), remote_fileio_func_close(), remote_fileio_func_fstat(), remote_fileio_func_lseek(), remote_fileio_func_read(), remote_fileio_func_write(), remote_fileio_init_fd_map(), remote_fileio_map_fd(), remote_fileio_next_free_fd(), and remote_fileio_resize_fd_map().
|
static |
Definition at line 350 of file remote-fileio.c.
References quit().
Referenced by initialize_remote_fileio().
Definition at line 1186 of file remote-fileio.c.
References name, remote_fileio_ctrl_c_signal_handler(), remote_fileio_sig_set(), remote_fio_func_map, and RETURN_ERROR.
Referenced by remote_fileio_request().
void initialize_remote_fileio | ( | struct cmd_list_element * | remote_set_cmdlist, |
struct cmd_list_element * | remote_show_cmdlist | ||
) |
Definition at line 1366 of file remote-fileio.c.
References _, add_cmd(), async_remote_fileio_interrupt(), create_async_signal_handler(), no_class, set_system_call_allowed(), and show_system_call_allowed().
Referenced by _initialize_remote().
|
static |
Definition at line 402 of file remote-fileio.c.
References remote_fileio_reply().
Referenced by remote_fileio_func_close(), remote_fileio_func_fstat(), remote_fileio_func_lseek(), remote_fileio_func_read(), and remote_fileio_func_write().
|
static |
Definition at line 117 of file remote-fileio.c.
References FIO_FD_INVALID, remote_fileio_init_fd_map(), and remote_fio_data.
Referenced by remote_fileio_func_close().
|
static |
Definition at line 356 of file remote-fileio.c.
References gdb_call_async_signal_handler(), remote_fileio_sig_set(), remote_fio_ctrl_c_flag, and remote_fio_no_longjmp.
Referenced by do_remote_fileio_request(), and remote_fileio_reply().
|
static |
Definition at line 255 of file remote-fileio.c.
References gdb.printing::long, and remote_fileio_extract_long().
Referenced by remote_fileio_func_close(), remote_fileio_func_fstat(), remote_fileio_func_isatty(), remote_fileio_func_lseek(), remote_fileio_func_open(), remote_fileio_func_read(), and remote_fileio_func_write().
Definition at line 219 of file remote-fileio.c.
Referenced by remote_fileio_extract_int(), remote_fileio_extract_ptr_w_len(), remote_fileio_func_fstat(), remote_fileio_func_gettimeofday(), remote_fileio_func_lseek(), remote_fileio_func_read(), remote_fileio_func_stat(), and remote_fileio_func_write().
Definition at line 269 of file remote-fileio.c.
References int, and remote_fileio_extract_long().
Referenced by remote_fileio_func_open(), remote_fileio_func_rename(), remote_fileio_func_stat(), remote_fileio_func_system(), and remote_fileio_func_unlink().
Definition at line 99 of file remote-fileio.c.
References remote_fileio_next_free_fd(), and remote_fio_data.
Referenced by remote_fileio_func_open().
|
static |
Definition at line 491 of file remote-fileio.c.
References FIO_FD_CONSOLE_IN, FIO_FD_CONSOLE_OUT, FIO_FD_INVALID, remote_fileio_badfd(), remote_fileio_close_target_fd(), remote_fileio_extract_int(), remote_fileio_ioerror(), remote_fileio_map_fd(), remote_fileio_return_errno(), remote_fileio_return_success(), and remote_fio_no_longjmp.
|
static |
Definition at line 970 of file remote-fileio.c.
References FIO_FD_CONSOLE_IN, FIO_FD_CONSOLE_OUT, FIO_FD_INVALID, host_to_fileio_stat(), host_to_fileio_uint(), remote_fileio_badfd(), remote_fileio_extract_int(), remote_fileio_extract_long(), remote_fileio_ioerror(), remote_fileio_map_fd(), remote_fileio_return_errno(), remote_fileio_return_success(), remote_fio_no_longjmp, and target_write_memory().
|
static |
Definition at line 1048 of file remote-fileio.c.
References remote_fileio_extract_long(), remote_fileio_ioerror(), remote_fileio_reply(), remote_fileio_return_errno(), remote_fileio_return_success(), remote_fileio_to_fio_timeval(), remote_fio_no_longjmp, and target_write_memory().
|
static |
Definition at line 1100 of file remote-fileio.c.
References FIO_FD_CONSOLE_IN, FIO_FD_CONSOLE_OUT, remote_fileio_extract_int(), remote_fileio_ioerror(), remote_fileio_map_fd(), remote_fileio_return_success(), and remote_fio_no_longjmp.
|
static |
Definition at line 720 of file remote-fileio.c.
References FIO_FD_CONSOLE_IN, FIO_FD_CONSOLE_OUT, FIO_FD_INVALID, offset, remote_fileio_badfd(), remote_fileio_extract_int(), remote_fileio_extract_long(), remote_fileio_ioerror(), remote_fileio_map_fd(), remote_fileio_reply(), remote_fileio_return_errno(), remote_fileio_return_success(), remote_fileio_seek_flag_to_host(), and remote_fio_no_longjmp.
|
static |
Definition at line 421 of file remote-fileio.c.
References flags, gdb_open_cloexec(), remote_fileio_extract_int(), remote_fileio_extract_ptr_w_len(), remote_fileio_fd_to_targetfd(), remote_fileio_ioerror(), remote_fileio_mode_to_host(), remote_fileio_oflags_to_host(), remote_fileio_reply(), remote_fileio_return_errno(), remote_fileio_return_success(), remote_fio_no_longjmp, and target_read_memory().
|
static |
Definition at line 517 of file remote-fileio.c.
References FIO_FD_CONSOLE_IN, FIO_FD_CONSOLE_OUT, FIO_FD_INVALID, gdb_stdtargin, read(), remote_fileio_badfd(), remote_fileio_extract_int(), remote_fileio_extract_long(), remote_fileio_ioerror(), remote_fileio_map_fd(), remote_fileio_return_errno(), remote_fileio_return_success(), remote_fio_no_longjmp, SEEK_CUR, target_write_memory(), ui_file_read(), xfree(), and xmalloc().
|
static |
Definition at line 774 of file remote-fileio.c.
References len, remote_fileio_extract_ptr_w_len(), remote_fileio_ioerror(), remote_fileio_reply(), remote_fileio_return_errno(), remote_fileio_return_success(), remote_fio_no_longjmp, and target_read_memory().
|
static |
Definition at line 908 of file remote-fileio.c.
References host_to_fileio_stat(), host_to_fileio_uint(), remote_fileio_extract_long(), remote_fileio_extract_ptr_w_len(), remote_fileio_ioerror(), remote_fileio_reply(), remote_fileio_return_errno(), remote_fileio_return_success(), remote_fio_no_longjmp, target_read_memory(), and target_write_memory().
|
static |
Definition at line 1118 of file remote-fileio.c.
References remote_fileio_extract_ptr_w_len(), remote_fileio_ioerror(), remote_fileio_reply(), remote_fileio_return_errno(), remote_fileio_return_success(), remote_fio_no_longjmp, remote_fio_system_call_allowed, target_read_memory(), and WEXITSTATUS.
|
static |
Definition at line 868 of file remote-fileio.c.
References remote_fileio_extract_ptr_w_len(), remote_fileio_ioerror(), remote_fileio_reply(), remote_fileio_return_errno(), remote_fileio_return_success(), remote_fio_no_longjmp, and target_read_memory().
|
static |
Definition at line 646 of file remote-fileio.c.
References FIO_FD_CONSOLE_IN, FIO_FD_CONSOLE_OUT, FIO_FD_INVALID, gdb_flush(), gdb_stdtarg, gdb_stdtargerr, remote_fileio_badfd(), remote_fileio_extract_int(), remote_fileio_extract_long(), remote_fileio_ioerror(), remote_fileio_map_fd(), remote_fileio_return_errno(), remote_fileio_return_success(), remote_fio_no_longjmp, target_read_memory(), ui_file_write(), xfree(), and xmalloc().
|
static |
Definition at line 54 of file remote-fileio.c.
References FIO_FD_CONSOLE_IN, FIO_FD_CONSOLE_OUT, FIO_FD_INVALID, remote_fio_data, and xmalloc().
Referenced by remote_fileio_close_target_fd(), remote_fileio_map_fd(), and remote_fileio_resize_fd_map().
|
static |
Definition at line 396 of file remote-fileio.c.
References remote_fileio_reply().
Referenced by remote_fileio_func_close(), remote_fileio_func_fstat(), remote_fileio_func_gettimeofday(), remote_fileio_func_isatty(), remote_fileio_func_lseek(), remote_fileio_func_open(), remote_fileio_func_read(), remote_fileio_func_rename(), remote_fileio_func_stat(), remote_fileio_func_system(), remote_fileio_func_unlink(), and remote_fileio_func_write().
Definition at line 108 of file remote-fileio.c.
References FIO_FD_INVALID, remote_fileio_init_fd_map(), and remote_fio_data.
Referenced by remote_fileio_func_close(), remote_fileio_func_fstat(), remote_fileio_func_isatty(), remote_fileio_func_lseek(), remote_fileio_func_read(), and remote_fileio_func_write().
|
static |
Definition at line 152 of file remote-fileio.c.
Referenced by remote_fileio_func_open(), and remote_fileio_to_host_mode().
|
static |
Definition at line 88 of file remote-fileio.c.
References FIO_FD_INVALID, remote_fileio_resize_fd_map(), and remote_fio_data.
Referenced by remote_fileio_fd_to_targetfd().
|
static |
Definition at line 125 of file remote-fileio.c.
References O_BINARY.
Referenced by remote_fileio_func_open().
Definition at line 366 of file remote-fileio.c.
References error(), putpkt(), remote_fileio_ctrl_c_signal_handler(), remote_fileio_sig_set(), and remote_fio_ctrl_c_flag.
Referenced by remote_fileio_badfd(), remote_fileio_func_gettimeofday(), remote_fileio_func_lseek(), remote_fileio_func_open(), remote_fileio_func_rename(), remote_fileio_func_stat(), remote_fileio_func_system(), remote_fileio_func_unlink(), remote_fileio_ioerror(), remote_fileio_request(), remote_fileio_return_errno(), and remote_fileio_return_success().
void remote_fileio_request | ( | char * | buf, |
int | ctrlc_pending_p | ||
) |
Definition at line 1235 of file remote-fileio.c.
References catch_exceptions(), current_uiout, do_remote_fileio_request(), remote_fileio_reply(), remote_fileio_sig_exit(), remote_fileio_sig_init(), remote_fio_ctrl_c_flag, remote_fio_no_longjmp, RETURN_ERROR, RETURN_MASK_ALL, and RETURN_QUIT.
Referenced by remote_wait_as().
void remote_fileio_reset | ( | void | ) |
Definition at line 1211 of file remote-fileio.c.
References remote_fio_data, and xfree().
Referenced by extended_remote_restart(), and remote_open_1().
|
static |
Definition at line 72 of file remote-fileio.c.
References FIO_FD_INVALID, remote_fileio_init_fd_map(), remote_fio_data, and xrealloc().
Referenced by remote_fileio_next_free_fd().
|
static |
Definition at line 408 of file remote-fileio.c.
References host_to_fileio_error(), and remote_fileio_reply().
Referenced by remote_fileio_func_close(), remote_fileio_func_fstat(), remote_fileio_func_gettimeofday(), remote_fileio_func_lseek(), remote_fileio_func_open(), remote_fileio_func_read(), remote_fileio_func_rename(), remote_fileio_func_stat(), remote_fileio_func_system(), remote_fileio_func_unlink(), and remote_fileio_func_write().
|
static |
Definition at line 415 of file remote-fileio.c.
References remote_fileio_reply().
Referenced by remote_fileio_func_close(), remote_fileio_func_fstat(), remote_fileio_func_gettimeofday(), remote_fileio_func_isatty(), remote_fileio_func_lseek(), remote_fileio_func_open(), remote_fileio_func_read(), remote_fileio_func_rename(), remote_fileio_func_stat(), remote_fileio_func_system(), remote_fileio_func_unlink(), and remote_fileio_func_write().
Definition at line 197 of file remote-fileio.c.
References SEEK_CUR, and SEEK_SET.
Referenced by remote_fileio_func_lseek().
|
static |
Definition at line 340 of file remote-fileio.c.
References remote_fio_ofunc.
Referenced by remote_fileio_request().
|
static |
Definition at line 314 of file remote-fileio.c.
References remote_fio_ofunc.
Referenced by remote_fileio_request().
|
static |
Definition at line 327 of file remote-fileio.c.
Referenced by do_remote_fileio_request(), remote_fileio_ctrl_c_signal_handler(), and remote_fileio_reply().
|
static |
Definition at line 291 of file remote-fileio.c.
References host_to_bigendian().
Referenced by remote_fileio_to_fio_timeval().
|
static |
Definition at line 297 of file remote-fileio.c.
References host_to_fileio_time(), and remote_fileio_to_fio_long().
Referenced by remote_fileio_func_gettimeofday().
|
static |
Definition at line 1296 of file remote-fileio.c.
References remote_fileio_mode_to_host(), and remote_fileio_to_host_uint().
Referenced by remote_fileio_to_host_stat().
void remote_fileio_to_host_stat | ( | struct fio_stat * | fst, |
struct stat * | st | ||
) |
Definition at line 1314 of file remote-fileio.c.
References remote_fileio_to_host_mode(), remote_fileio_to_host_time(), remote_fileio_to_host_uint(), and remote_fileio_to_host_ulong().
Referenced by remote_hostio_fstat().
|
static |
Definition at line 1305 of file remote-fileio.c.
References remote_fileio_to_host_uint().
Referenced by remote_fileio_to_host_stat().
|
static |
Definition at line 1278 of file remote-fileio.c.
References extract_unsigned_integer().
Referenced by remote_fileio_to_host_mode(), remote_fileio_to_host_stat(), and remote_fileio_to_host_time().
|
static |
Definition at line 1287 of file remote-fileio.c.
References extract_unsigned_integer().
Referenced by remote_fileio_to_host_stat().
|
static |
Definition at line 1339 of file remote-fileio.c.
References _, error(), and remote_fio_system_call_allowed.
Referenced by initialize_remote_fileio().
|
static |
Definition at line 1356 of file remote-fileio.c.
References _, error(), printf_unfiltered(), and remote_fio_system_call_allowed.
Referenced by initialize_remote_fileio().
int* fd_map |
Definition at line 41 of file remote-fileio.c.
int fd_map_size |
Definition at line 42 of file remote-fileio.c.
void(* func) (char *) |
Definition at line 1168 of file remote-fileio.c.
Referenced by gdb.prompt::_prompt_object_attr(), aarch64_prologue_this_id(), add_dump_command(), alpha_heuristic_proc_start(), amd64obsd_trapframe_cache(), arm_prologue_this_id(), avr_frame_this_id(), c_get_compile_context(), catch_errors(), check_exception_resume(), cris_frame_this_id(), evpy_emit_event(), evregpy_connect(), evregpy_disconnect(), execute_code(), fbsd_find_memory_regions(), fdwalk(), find_frame_funname(), find_solib_trampoline_target(), finish_command_continuation(), for_each_block(), for_each_just_stopped_thread(), frame_info(), frv_frame_this_id(), gdbpy_apply_type_printers(), gdbpy_post_event(), gdbpy_start_type_printers(), gdbscm_call_guile(), gdbscm_with_guile(), gen_expr(), i386obsd_trapframe_cache(), inline_frame_this_id(), iterate_over_mappings(), linux_find_memory_regions(), linux_find_memory_regions_full(), load_libcc(), m32r_frame_this_id(), m68hc11_frame_this_id(), microblaze_frame_cache(), parse_exp_in_context_1(), ppcfbsd_sigtramp_frame_cache(), ppcobsd_sigtramp_frame_cache(), ppu2spu_sniffer(), print_frame(), print_frame_arg_vars(), proc_iterate_over_threads(), pv_area_scan(), rs6000_frame_cache(), s390_prologue_frame_unwind_cache(), spu2ppu_sniffer(), tramp_frame_sniffer(), tramp_frame_start(), until_next_command(), vaxobsd_sigtramp_frame_cache(), and VEC().
char* name |
Definition at line 1167 of file remote-fileio.c.
Referenced by do_remote_fileio_request().
|
static |
Definition at line 303 of file remote-fileio.c.
Referenced by remote_fileio_ctrl_c_signal_handler(), remote_fileio_reply(), and remote_fileio_request().
struct { ... } remote_fio_data |
struct { ... } remote_fio_func_map[] |
Referenced by do_remote_fileio_request().
|
static |
Definition at line 304 of file remote-fileio.c.
Referenced by remote_fileio_ctrl_c_signal_handler(), remote_fileio_func_close(), remote_fileio_func_fstat(), remote_fileio_func_gettimeofday(), remote_fileio_func_isatty(), remote_fileio_func_lseek(), remote_fileio_func_open(), remote_fileio_func_read(), remote_fileio_func_rename(), remote_fileio_func_stat(), remote_fileio_func_system(), remote_fileio_func_unlink(), remote_fileio_func_write(), and remote_fileio_request().
|
static |
Definition at line 310 of file remote-fileio.c.
Referenced by remote_fileio_sig_exit(), and remote_fileio_sig_init().
|
static |
Definition at line 49 of file remote-fileio.c.
Referenced by remote_fileio_func_system(), set_system_call_allowed(), and show_system_call_allowed().
|
static |
Definition at line 51 of file remote-fileio.c.