gdbstub: refactor get_feature_xml
Try to bring up the code to more modern standards by: - use dynamic GString built xml over a fixed buffer - use autofree to save on explicit g_free() calls - don't hand hack strstr to find the delimiter - fix up style of xml_builtin and invert loop Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20230829161528.2707696-11-alex.bennee@linaro.org>
This commit is contained in:
+1
-1
@@ -33,7 +33,7 @@ typedef struct GDBProcess {
|
||||
uint32_t pid;
|
||||
bool attached;
|
||||
|
||||
char target_xml[1024];
|
||||
char *target_xml;
|
||||
} GDBProcess;
|
||||
|
||||
enum RSState {
|
||||
|
||||
Reference in New Issue
Block a user