[PATCH] add file desc to gdbserver client_state
Stan Cox
scox@redhat.com
Thu Feb 6 19:41:00 GMT 2020
This patch adds struct multi_client_states for managing multiple clients
and adds gdb_fildes_t support to routines write_prim, read_prim, readchar
for handling client specific io,with each client associated with its
corresponding file desc. Thispatch adds the corresponding file desc to
the client_state and adds afile desc parameter to the gdbserver I/O ops.
It also adds structmulti_client_states which currently just manages a
primary
client_statebut will later allow managing a collection of client_states
where each client_state is the state for an individualclient. This patch
defines get_client_state using multi_client_statesdefines. Concurrent with
this patch is an strace patch that adds a gdbserver backend to strace.
Add struct multi_client_states
* server.h (struct multi_client_states): New.
* server.c (g_client_states)
(get_client_states, multi_client_sates::add_client_state): New.
(captured_main): Set multi_client_states.client_states
* remote-utils.c (gdb_connected, remote_prepare, remote_close)
(putpkt_binary_1, getpkt) Use client_state.remote_desc.
(handle_accept_event): Set the client state for this remote file desc.
(write_prim, read_prim, readchar): Add gdb_fildes_t parameter.
Change all callers.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gdbs-mcs.patch
Type: text/x-patch
Size: 12718 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20200206/ceabe4e3/attachment.bin>
More information about the Gdb-patches
mailing list