On 11/30/19 9:45 AM, Alex Bennée wrote:
> Instead of allocating make this entirely static. We shall reduce the
> size of the structure in later commits and dynamically allocate parts
> of it. We introduce an init and reset helper function to keep all the
> manipulation in one place.
>
> Signed-
On 11/30/19 8:45 AM, Alex Bennée wrote:
> -static GDBState *gdbserver_state;
> +static GDBState gdbserver_state;
> +
> +static void init_gdbserver_state(void)
> +{
> +g_assert(!gdbserver_state.init);
> +memset(&gdbserver_state, 0, sizeof(GDBState));
> +gdbserver_state.init = true;
> +}
Instead of allocating make this entirely static. We shall reduce the
size of the structure in later commits and dynamically allocate parts
of it. We introduce an init and reset helper function to keep all the
manipulation in one place.
Signed-off-by: Alex Bennée
Cc: Damien Hedde
Cc: Richard Hend