From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ki8dE-0004nn-9n for qemu-devel@nongnu.org; Tue, 23 Sep 2008 10:12:48 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ki8dC-0004nb-Io for qemu-devel@nongnu.org; Tue, 23 Sep 2008 10:12:47 -0400 Received: from [199.232.76.173] (port=41406 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ki8dC-0004nW-GU for qemu-devel@nongnu.org; Tue, 23 Sep 2008 10:12:46 -0400 Received: from mail.codesourcery.com ([65.74.133.4]:57769) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Ki8dC-0000CO-1M for qemu-devel@nongnu.org; Tue, 23 Sep 2008 10:12:46 -0400 From: Paul Brook Subject: Re: [Qemu-devel] Regarding PTRACE implementation in QEMU user mode Date: Tue, 23 Sep 2008 15:12:40 +0100 References: <30687.26589.qm@web94802.mail.in2.yahoo.com> In-Reply-To: <30687.26589.qm@web94802.mail.in2.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200809231512.40813.paul@codesourcery.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: sathish kumar , rajesh-siso > Can someone explain why explain why ptrace system call is not implemented > in QEMU? if someone is working on it, please share some ideas. Because it's extremely hard (read: nearly impossible) to implement properly. ptrace allows direct access to the state of a different process. Passing through ptrace would give you the state of qemu itself, not the program you're interested in, so you have to emulate everything via some othe IPC mechanism (which must also be hidden from the emulated application). This includes signals like SIGSTOP which cannot be trapped. If you're not extremely careful you end up with a monstrosity like Cygwin, and all the problems that implies. Paul