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: Laurent Desnogues <laurent.desnogues@gmail.com> Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6195 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
6cdc737502
commit
9f6164d6f6
@ -2225,7 +2225,7 @@ int gdbserver_start(int port)
|
|||||||
void gdbserver_fork(CPUState *env)
|
void gdbserver_fork(CPUState *env)
|
||||||
{
|
{
|
||||||
GDBState *s = gdbserver_state;
|
GDBState *s = gdbserver_state;
|
||||||
if (s->fd < 0)
|
if (gdbserver_fd < 0 || s->fd < 0)
|
||||||
return;
|
return;
|
||||||
close(s->fd);
|
close(s->fd);
|
||||||
s->fd = -1;
|
s->fd = -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user