From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L2Y0L-0001nN-AR for qemu-devel@nongnu.org; Tue, 18 Nov 2008 16:21:01 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L2Y0H-0001mP-JD for qemu-devel@nongnu.org; Tue, 18 Nov 2008 16:21:00 -0500 Received: from [199.232.76.173] (port=57107 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L2Y0H-0001mL-9h for qemu-devel@nongnu.org; Tue, 18 Nov 2008 16:20:57 -0500 Received: from mail.codesourcery.com ([65.74.133.4]:56480) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L2Y0H-0004xF-5M for qemu-devel@nongnu.org; Tue, 18 Nov 2008 16:20:57 -0500 From: Paul Brook Subject: Re: [Qemu-devel] [5743] gdbstub: manage CPUs as threads (Jan Kiszka) Date: Tue, 18 Nov 2008 21:20:52 +0000 References: <200811182042.59526.paul@codesourcery.com> <49232A03.3000100@codemonkey.ws> In-Reply-To: <49232A03.3000100@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200811182120.53504.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: Anthony Liguori Cc: Jan Kiszka , qemu-devel@nongnu.org On Tuesday 18 November 2008, Anthony Liguori wrote: > Paul Brook wrote: > > On Tuesday 18 November 2008, Anthony Liguori wrote: > >> Revision: 5743 > >> http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5743 > >> Author: aliguori > >> Date: 2008-11-18 20:30:24 +0000 (Tue, 18 Nov 2008) > >> > >> Log Message: > >> ----------- > >> gdbstub: manage CPUs as threads (Jan Kiszka) > > > > This is wrong. CPUs do not share the same address space, so should be > > modelled as processes, not threads. > > They share the same physical address space. GDB works with virtual address spaces. Each CPU has its own MMU, so as soon as you load a multitasking OS the chances are that these will look significantly different. > How well does GDB support > debugging processes verses threads? A cursory look seems to suggest the > thread debugging support is slightly better (thread events) than the > process debugging support. They look very similar though. The thread model can't describe what's actually happening. gdb multiprocess support definitely exists (and if it doesn't work right now it's being actively worked on), so we should use it. Paul