qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [6195] gdbstub: fix gdbserver_fork
@ 2009-01-07 10:22 Edgar E. Iglesias
  2009-01-07 12:00 ` Martin Mohring
  0 siblings, 1 reply; 2+ messages in thread
From: Edgar E. Iglesias @ 2009-01-07 10:22 UTC (permalink / raw)
  To: qemu-devel

Revision: 6195
          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6195
Author:   edgar_igl
Date:     2009-01-07 10:22:28 +0000 (Wed, 07 Jan 2009)

Log Message:
-----------
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>

Modified Paths:
--------------
    trunk/gdbstub.c

Modified: trunk/gdbstub.c
===================================================================
--- trunk/gdbstub.c	2009-01-06 18:57:51 UTC (rev 6194)
+++ trunk/gdbstub.c	2009-01-07 10:22:28 UTC (rev 6195)
@@ -2225,7 +2225,7 @@
 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;

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [6195] gdbstub: fix gdbserver_fork
  2009-01-07 10:22 [Qemu-devel] [6195] gdbstub: fix gdbserver_fork Edgar E. Iglesias
@ 2009-01-07 12:00 ` Martin Mohring
  0 siblings, 0 replies; 2+ messages in thread
From: Martin Mohring @ 2009-01-07 12:00 UTC (permalink / raw)
  To: qemu-devel

Edgar E. Iglesias wrote:
> Revision: 6195
>           http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6195
> Author:   edgar_igl
> Date:     2009-01-07 10:22:28 +0000 (Wed, 07 Jan 2009)
>
> Log Message:
> -----------
> 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).
>   
I can confirm that it makes fork() work again, so Debian Etch, Lenny,
Sid work on ARM inside a chroot running with QEMU (e.g. by running a
shell inside the chroot).

Nevertheless, Aurelien promised me that he or the author will take a
look into svn commit 6095, because the case that CONFIG_USER_ONLY is
defined and USE_NPTL cause the function gdbserver_fork() to be not
defined inside gdbstub.c, thus causing a compilation error. Also, the
question is open if gdb works and was tested in user mode with more than
one threads at all (on the other hand, the makes sense only if yes).

Martin

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-01-07 12:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-07 10:22 [Qemu-devel] [6195] gdbstub: fix gdbserver_fork Edgar E. Iglesias
2009-01-07 12:00 ` Martin Mohring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).