Re: [PATCH v2 01/14] gdbstub: make GDBState static and have common init function

2019-12-02 Thread Damien Hedde
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-

Re: [PATCH v2 01/14] gdbstub: make GDBState static and have common init function

2019-12-01 Thread Richard Henderson
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; > +}

[PATCH v2 01/14] gdbstub: make GDBState static and have common init function

2019-11-30 Thread Alex Bennée
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