From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=55171 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OzQEc-00009Z-JS for qemu-devel@nongnu.org; Sat, 25 Sep 2010 04:35:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OzQEa-0002Bz-Td for qemu-devel@nongnu.org; Sat, 25 Sep 2010 04:35:54 -0400 Received: from out-76.smtp.ucla.edu ([169.232.46.169]:52515) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OzQEa-0002Bn-Ha for qemu-devel@nongnu.org; Sat, 25 Sep 2010 04:35:52 -0400 Message-ID: <4C9DB45B.7080609@cs.ucla.edu> Date: Sat, 25 Sep 2010 01:35:39 -0700 From: Eddie Kohler MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: [PATCH] i386 debugging stubs: Consider segment bases References: <4C9D415F.6090909@cs.ucla.edu> <4C9DA344.5010702@web.de> In-Reply-To: <4C9DA344.5010702@web.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: qemu-devel@nongnu.org Thanks for the response. I agree the patch is a workaround, but it is a useful workaround, and I'd still argue for including it. The patch doesn't *require* that CS.base == DS.base. Breakpoints correctly and exclusively use CS.base. However, any memory examination uses DS.base, and you're right that the user might "want" to examine some other segment. A GDB fix would involve changing the gdb remote protocol as well as GDB itself and the GDB user interface. Google says you've been thinking about that for a while now -- is it going well? > For the time being, you should be able to workaround the gdb limitation > by setting two breakpoints: one on the linear address and another one on > the CS offset. Not nice, but used to work for us. I don't mind the double-breakpoint as much, but memory examination would still be broken, yes? I don't understand the comment about "prevents setting breakpoints on inactive segments." The code for setting breakpoints has not changed. Do you think the patch would actually make debugging WORSE on any OS? Or have any other undesirable effects, or make it harder to DTRT when GDB is ready? It seems safe & useful to me; & it's 2 LOC! Eddie