From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=38668 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PBety-0003eV-Lm for qemu-devel@nongnu.org; Thu, 28 Oct 2010 22:41:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PBetx-0007oa-E6 for qemu-devel@nongnu.org; Thu, 28 Oct 2010 22:41:10 -0400 Received: from mail.hust.edu.cn ([202.114.0.240]:46587) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1PBetw-0007mU-Ov for qemu-devel@nongnu.org; Thu, 28 Oct 2010 22:41:09 -0400 Message-ID: <488319284.02952@mail.hust.edu.cn> Subject: Re: [Qemu-devel] Re: About QEMU debugging console From: Zhiyuan Shao In-Reply-To: <4CC96E31.3040503@siemens.com> References: <488094999.01944@mail.hust.edu.cn> <4CC96E31.3040503@siemens.com> Content-Type: text/plain; charset="UTF-8" Date: Fri, 29 Oct 2010 10:41:11 +0800 Message-ID: <1288320071.14023.13.camel@zhiyuan-desktop> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: Zhiyuan Shao , qemu-devel On Thu, 2010-10-28 at 14:36 +0200, Jan Kiszka wrote: > Am 26.10.2010 14:22, Zhiyuan Shao wrote: > > Hi team, > > > > I am a Qemu User, and using Qemu 0.13.0 to debugging the linux kernel > > code (Qemu+GDB). > > > > During the usage, I found the Qemu debugging console (i.e., entered by > > pressing Ctl+Alt+2 in Qemu SDL window or by passing "-monitor stdio" to > > Qemu in the command line) is rather difficult to use. > > Regarding usability in this scenario: You know that there is QEMU > monitor pass-through via gdb "monitor" command? > Yes, Just learned to use that. By gdb "monitor" command, the output of QEMU debugging console is redirected to gdb. > > It can not show > > some important information, e.g., on i386 platform, which is my major > > interest, it can not show IDT, GDT information. Regarding the page > > mapping information, "info tlb" actually do a really bad job. > > > > On this side, I think Bochs is good. Unfortunately, it seems do not > > support gdb-stub debugging and general purpose debugging at the same > > time. > > > > I do not know if the Qemu team had made any plans to improve this? such > > as embedding the bochs debugging alike functionalities in future Qemu > > releases? > > The most important lacking feature is proper system-level debugging > support for gdb (via gdbstub). Once gdb has full access to all CPU > states of the x86 targets, you can pretty-print whatever you want inside > gdb via some nice Python scripts etc. > Are you mean that it is the responsibility of gdb to parse the output data of qemu built-in commands and generate user-friend output? Or grant gdb full access to the target machine, which is emulated by Qemu, and it is the responsibility of gdb again to generate easy-to-read output for the users? I think the first solution sounds more feasible, however, we still need more helpful built-in commands in Qemu. And it is hard to implement the second solution: By doing this, we may need to have full support from GDB community. Maybe, I am wrong. If possible, please give us more advices. Thanks! > Jan > Zhiyuan