|
From: | Richard Henderson |
Subject: | Re: [PATCH v2 06/21] gdbstub: move GDBState to shared internals header |
Date: | Fri, 6 Jan 2023 12:42:45 -0800 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 |
On 1/5/23 08:43, Alex Bennée wrote:
We are about to split softmmu and user mode helpers into different files. To facilitate this we will need to share access to the GDBState between those files. To keep building we have to temporarily define CONFIG_USER_ONLY just before we include internals.h for the user-mode side of things. This will get removed once the state is fully moved.
You don't have to have this hack if you don't ...
+typedef struct GDBState { + bool init; /* have we been initialised? */ + CPUState *c_cpu; /* current CPU for step/continue ops */ + CPUState *g_cpu; /* current CPU for other ops */ + CPUState *query_cpu; /* for q{f|s}ThreadInfo */ + enum RSState state; /* parsing state */ + char line_buf[MAX_PACKET_LENGTH]; + int line_buf_index; + int line_sum; /* running checksum */ + int line_csum; /* checksum at the end of the packet */ + GByteArray *last_packet; + int signal; +#ifdef CONFIG_USER_ONLY + GDBUserState user; +#else + GDBSystemState system; +#endif
... nest these. What's the point? r~
[Prev in Thread] | Current Thread | [Next in Thread] |