On 4/30/20 12:01 PM, Alex Bennée wrote: > @@ -814,7 +814,7 @@ int main(int argc, char **argv) > exit(1); > } > } else if (!strcmp(r, "g")) { > - gdbstub_port = atoi(argv[optind++]); > + gdbstub = g_strdup(argv[optind++]);
You've got one too many strdup. The one here in bsd-user main, and a similar one in linux-user handle_arg_gdb, are redundant with... > + gdbserver_state.socket_path = g_strdup(port_or_path); ... this one, in gdbserver_start. Otherwise, Reviewed-by: Richard Henderson <richard.hender...@linaro.org> r~