提交 ff7a981a 编写于 作者: P Peter Maydell 提交者: Riku Voipio

linux-user: Exit with an error if we couldn't set up gdbserver

If gdbserver_start() fails (usually because we couldn't bind to the
requested TCP port) then exit qemu rather than blithely continuing.
This brings the linux-user behaviour in to line with system mode.
Signed-off-by: NRiku Voipio <riku.voipio@linaro.org>
Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
上级 97cc7560
......@@ -3655,7 +3655,11 @@ int main(int argc, char **argv, char **envp)
#endif
if (gdbstub_port) {
gdbserver_start (gdbstub_port);
if (gdbserver_start(gdbstub_port) < 0) {
fprintf(stderr, "qemu: could not open gdbserver on port %d\n",
gdbstub_port);
exit(1);
}
gdb_handlesig(env, 0);
}
cpu_loop(env);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册