From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MLHkV-0005Cm-S1 for qemu-devel@nongnu.org; Mon, 29 Jun 2009 10:22:23 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MLHkQ-0005AZ-Vp for qemu-devel@nongnu.org; Mon, 29 Jun 2009 10:22:23 -0400 Received: from [199.232.76.173] (port=58125 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MLHkQ-0005AS-Km for qemu-devel@nongnu.org; Mon, 29 Jun 2009 10:22:18 -0400 Received: from lizzard.sbs.de ([194.138.37.39]:23347) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MLHkP-0001H4-5P for qemu-devel@nongnu.org; Mon, 29 Jun 2009 10:22:18 -0400 Message-ID: <4A48CE13.6050800@siemens.com> Date: Mon, 29 Jun 2009 16:22:11 +0200 From: Jan Kiszka MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: [PATCH 4/4] gdbstub: x86: Switch 64/32 bit registers dynamically References: <20090627075350.13376.17936.stgit@mchn012c.ww002.siemens.net> <200906291402.00530.paul@codesourcery.com> <4A48C4DF.20407@siemens.com> <200906291507.05278.paul@codesourcery.com> In-Reply-To: <200906291507.05278.paul@codesourcery.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paul Brook Cc: Anthony Liguori , qemu-devel@nongnu.org Paul Brook wrote: >>>> No question, this is a gdb issue. But, as it was confirmed in several >>>> discusssions with gdb people, it is a non-trivial thing to fix. So until >>>> qemu finds a gdb version attach with a rework x86 support, we have to >>>> work around it by switching the register layout as the guest switches >>>> its execution mode between 16/32 and 64 bit. >>> I still object to this patch. Especially as there's no indication that >>> it's a harroble hack to workaround broken GDB. >> Sorry, last sentence doesn't parse for me. > > You've just deliberately broken the qemu gdbstub. After your patch it is > impossible to debug mixed 32/64-bit code. Please give it a try as it's the other way around: You can't properly debug mixed target code without my patch. You can only debug 32/16 bit code with qemu (for i386) and 64 bit code with qemu-system-x86_64. But those scenarios are not affected by my patch in any way. > >> So what do you suggest for fixing this bug? > > Fix gdb. It's not a one-liner, far more complex than this intermediate workaround. > >> Do you have a patch at hand to fix gdb before 7.0? > > No. I'm unconvinced by any argument that requires a specific GDB version. > You've known about this bug for a long time now. > Please don't forget that it wasn't me to remove the workaround from qemu before fixing gdb first. That workaround used to be there for a reason. >> And a solution for older gdbs? > > If you really care about old gdb, then you get to backport the changes. To all standard distros out there in the field... (this is not just about fixing my personal debug environment) Jan -- Siemens AG, Corporate Technology, CT SE 2 Corporate Competence Center Embedded Linux