From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GiYjl-0001wt-2z for qemu-devel@nongnu.org; Fri, 10 Nov 2006 10:56:13 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GiYjh-0001nK-Cq for qemu-devel@nongnu.org; Fri, 10 Nov 2006 10:56:12 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GiYjh-0001n3-6a for qemu-devel@nongnu.org; Fri, 10 Nov 2006 10:56:09 -0500 Received: from [65.74.133.4] (helo=mail.codesourcery.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1GiYjh-0003yi-4I for qemu-devel@nongnu.org; Fri, 10 Nov 2006 10:56:09 -0500 From: Paul Brook Subject: Re: [Qemu-devel] Re: Debugging with paging enabled Date: Fri, 10 Nov 2006 15:56:01 +0000 References: <1583108256.20061108033019@kilgus.net> <1315607799.20061110153151@kilgus.net> In-Reply-To: <1315607799.20061110153151@kilgus.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200611101556.02645.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: Marcel Kilgus > Assuming that breakpoint locations are indeed meant to be virtual > addresses, GDB would have to evaluate the CS descriptor, add the CS > base to the EIP address and THEN check whether it knows the address. > But as it seems to be segment-agnostic it doesn't do that and things > break as a result. As Dan said, gdb knows nothing about x86 segmentation. As soon as you have nonzero segment bases you're pretty much on your own. If you care about fixing this I suggest you get GDB folks to agree (and document) how segmented memory models should work, then implement that model in qemu. Hacking qemu to work for your particular case with unmodified gdb probably "breaks" something else, so doesn't seem to improve the overall usefulness. I believe all common x86 OS use zero segment bases, and in long mode the CS/DS segment bases are ignored. Paul