From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JvZ3q-0007TO-6I for qemu-devel@nongnu.org; Mon, 12 May 2008 10:31:30 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JvZ3p-0007Sy-6s for qemu-devel@nongnu.org; Mon, 12 May 2008 10:31:29 -0400 Received: from [199.232.76.173] (port=47196 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JvZ3p-0007St-2B for qemu-devel@nongnu.org; Mon, 12 May 2008 10:31:29 -0400 Received: from mail.windriver.com ([147.11.1.11]:50001 helo=mail.wrs.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JvZ3o-0008PZ-0M for qemu-devel@nongnu.org; Mon, 12 May 2008 10:31:28 -0400 Message-ID: <482854C0.7060709@windriver.com> Date: Mon, 12 May 2008 09:31:28 -0500 From: Jason Wessel MIME-Version: 1.0 Subject: Re: [Qemu-devel] Debugging vmlinux with qemu and gdb. Unable to step, next, print or to get any information.. References: <824D057211107844BA95DB341B4BF12E01139BF2@hanvsmail04.eu.thmulti.com> <4823D56F.1010600@windriver.com> <20080509144029.GA32414@caradoc.them.org> <20080512094103.GA31632@edgar.se.axis.com> <48283D34.8080508@windriver.com> <20080512140243.GE21455@edgar.se.axis.com> In-Reply-To: <20080512140243.GE21455@edgar.se.axis.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Edgar E. Iglesias" Cc: qemu-devel@nongnu.org Edgar E. Iglesias wrote: > On Mon, May 12, 2008 at 07:51:00AM -0500, Jason Wessel wrote: > >> Edgar E. Iglesias wrote: >> >>> On Fri, May 09, 2008 at 10:40:29AM -0400, Daniel Jacobowitz wrote: >>> >>> >>>> On Thu, May 08, 2008 at 11:39:11PM -0500, Jason Wessel wrote: >>>> >>>> >>>>> +@item maintenance packet qqemu.sstepbits >>>>> >>>>> >>>> Are these packets in wide use yet? If not, I'd really recommend you >>>> use qRcmd instead; then the GDB command is just "monitor", e.g. >>>> "monitor show sstepbits". maint packet isn't really intended for >>>> users. >>>> >>>> >>> Thanks for the comments Daniel. >>> >>> This patch tries to change the syntax into this: >>> % monitor sstepbits >>> % monitor sstep >>> % monitor sstep=0x05 >>> >>> Or would a show/set interface be prefered for some reason (e.g, monitor show sstepbits, monitor show sstep, monitor set sstep 0x5)? >>> >>> Best regards, >>> >>> >> The patch itself looks ok, but if you can hold off committing it, I'll >> provide you with a two patch series in the next day or so which has even >> more functionality. I implemented gdb monitor commands as well as >> "qemu pass through monitor" commands where you can using the gdb monitor >> command to send commands and receive input from the qemu monitor as well. >> > > Btw, while your at it you might want to consider another comment. When trying the sstep I felt it was easy to get confused with the negated bitmasks. Maybe we should invert them? > > The default bitmask would change to 1. And sstepbits would be "ENABLE=1,IRQ=2,TIMERS=4". Does that make sense? > > I don't care one way or the other about the negated bit mask. I'll as the question of which is the least expensive condition to check. if ( it_is_irq && !(env->singlestep_enabled & SSTEP_NOIRQ)) do_irq Or if ( it_is_irq && !(env->singlestep_enabled && (env->singlestep_enabled & SSTEP_IRQ))) do_irq Perhaps the compiler makes enough of an optimization in the later that we need not worry? In the case of the code the way it was now, it was clearly "visually optimized". ;-) Jason.