From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GiZtl-0001rG-6Q for qemu-devel@nongnu.org; Fri, 10 Nov 2006 12:10:37 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GiZtj-0001pI-Dk for qemu-devel@nongnu.org; Fri, 10 Nov 2006 12:10:36 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GiZtj-0001p3-4U for qemu-devel@nongnu.org; Fri, 10 Nov 2006 12:10:35 -0500 Received: from [66.93.172.17] (helo=nevyn.them.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1GiZth-0002aW-R6 for qemu-devel@nongnu.org; Fri, 10 Nov 2006 12:10:34 -0500 Date: Fri, 10 Nov 2006 12:10:32 -0500 From: Daniel Jacobowitz Subject: Re: [Qemu-devel] Re: Debugging with paging enabled Message-ID: <20061110171032.GA29431@nevyn.them.org> References: <1583108256.20061108033019@kilgus.net> <1315607799.20061110153151@kilgus.net> <200611101556.02645.paul@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <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 On Fri, Nov 10, 2006 at 03:56:01PM +0000, Paul Brook wrote: > > 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'd recommend the even simpler hack of having qemu report a PC that included the segment base :-) -- Daniel Jacobowitz CodeSourcery