This patch adds gdb_fildes_t support to gdbserver for later use by the gdbserver multi-client patch. That patch enables multiple clients with each client associated with its corresponding file desc. This patch adds the corresponding file desc to the client_state and adds a file desc parameter to the gdbserver I/O ops. It also adds a minimal multi_client_states which currently just manages a single client_state but later will be expanded to be a collection of multiple client_states where each client_state is the state for an individual client. In contrast to the previous patch, this patch 1) uses client_state.remote_desc in remote-utils.c instead of the static version 2) no longer uses the function get_client_state but instead defines get_client_state using multi_client_states The gdbserver multi-client patch is mentioned in: https://sourceware.org/ml/gdb-patches/2019-08/msg00577.html > Will remote_desc be going away? And hopefully get_remote_desc is also > just a stepping stone? remote_desc is now gone as mentioned in 1 above > Can get_client_state be made static now? > If not, why not? get_client_state is now redefined as mentioned in 2) above Thanks Tom!