Re: [PATCH] gdbstub.c uses incorrect check for active gdb in use_gdb_syscalls

2021-01-12 Thread Keith Packard via
Alex Bennée writes: > It would be better to wrap the test in a function (static bool > is_connected()?) so the semantic meaning is clear in the code and we can > fix things in one place if needed. That makes good sense to me. > How exactly did you create the segfault? Just starting with -s and

Re: [PATCH] gdbstub.c uses incorrect check for active gdb in use_gdb_syscalls

2021-01-08 Thread Alex Bennée
Keith Packard writes: > When checking whether there is a live gdb connection, code shouldn't > use 'gdbserver_state.init' as that value is set when the > gdbserver_state structure is initialized in init_gdbserver_state, not > when the gdb socket has a valid connection. > > The 'handle_detach' f

[PATCH] gdbstub.c uses incorrect check for active gdb in use_gdb_syscalls

2020-12-23 Thread Keith Packard via
When checking whether there is a live gdb connection, code shouldn't use 'gdbserver_state.init' as that value is set when the gdbserver_state structure is initialized in init_gdbserver_state, not when the gdb socket has a valid connection. The 'handle_detach' function appears to use 'gdbserver_sta