提交 9f6164d6 编写于 作者: E edgar_igl

gdbstub: fix gdbserver_fork

As reported by Martin Mohring fork doesn't work with NPTL.
A fix is attached that makes the also attached test run
(tested with ARM CodeSourcery 2008q3 on an x86_64
Fedora Core with kernel 2.6.23).
Signed-off-by: NLaurent Desnogues <laurent.desnogues@gmail.com>
Acked-by: NEdgar E. Iglesias <edgar.iglesias@gmail.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6195 c046a42c-6fe2-441c-8c8c-71466251a162
上级 6cdc7375
......@@ -2225,7 +2225,7 @@ int gdbserver_start(int port)
void gdbserver_fork(CPUState *env)
{
GDBState *s = gdbserver_state;
if (s->fd < 0)
if (gdbserver_fd < 0 || s->fd < 0)
return;
close(s->fd);
s->fd = -1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册