From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FDFFZ-0005ij-50 for qemu-devel@nongnu.org; Sun, 26 Feb 2006 01:19:23 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FDFF8-0005ai-2k for qemu-devel@nongnu.org; Sun, 26 Feb 2006 01:19:17 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FDFF2-0005ZD-Hb for qemu-devel@nongnu.org; Sun, 26 Feb 2006 01:18:49 -0500 Received: from [66.249.82.193] (helo=xproxy.gmail.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FDFFT-0008Ih-Eb for qemu-devel@nongnu.org; Sun, 26 Feb 2006 01:19:15 -0500 Received: by xproxy.gmail.com with SMTP id h27so430119wxd for ; Sat, 25 Feb 2006 22:18:42 -0800 (PST) Message-ID: <1fa17f810602252218v29909709ue2211616ad044719@mail.gmail.com> Date: Sun, 26 Feb 2006 14:18:42 +0800 From: prime Subject: Re: [Qemu-devel] Make QEMU more friendly for kernel debug In-Reply-To: <92c265230602252042r5adf23a0y7de4d2c4905110c8@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_7355_22872668.1140934722694" References: <1fa17f810602222204nb7261f9la93c224f4f81832a@mail.gmail.com> <92c265230602252042r5adf23a0y7de4d2c4905110c8@mail.gmail.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Tace Cc: qemu-devel@nongnu.org ------=_Part_7355_22872668.1140934722694 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On 2/26/06, Tace wrote: > > Hi, > Please do... > > I got a question, doesn't disable the interrupts changes the > underlying system? Perhaps a good way would be to monitor the > completion of the interrupt routine before singlestepping to the next > instruction? > > > On 2/23/06, prime wrote: > > Hello everyone, > > I find that I can't single step OS kernels use qemu.When I use > "step" > > or "next" command in gdb,the kernel always enter its interrupt route > > instead of executing the next instruction after the breakpoint.So I > modify > > QEMU's source code to disable interrupts in single step mode,and now I > > can use "step" or "next" command in gdb to single step functions. > > > > Should I post the patch? It is a very small modification. > > > > -- > > Three passions, simple but overwhelmingly strong, have governed my life= : > > the longing for love, the search for knowledge, and unbearable pity for > > the suffering of mankind. > > ---------Bertrand Russell > > > > _______________________________________________ > > Qemu-devel mailing list > > Qemu-devel@nongnu.org > > http://lists.nongnu.org/mailman/listinfo/qemu-devel > > > > > > > Hi, I have post the patch here http://qemu.dad-answers.com/viewtopic.php?t=3D= 921 Disable interrupts in single step has very few effects on the underlying system,in my opinion. In normal mode(without single step),many instructions are executed between two interrupts, but in single step mode,we have done too much extra ministrant work besides execute one instruction while the "virtual clock" running. So only one instruction can be executed between two clock interrupts.And I think,disable interrupts in single step mode is a simple method to cancel the "virtual time" we have used for doing extra ministrant work. For example,if we define CONFIG_SLIRP,then after gdb_handle_packet() starts "virtual clock" by vm_start(),we have to do much work to handle slirp, and it needs lots "virtual time".This is just a simple instance,and there are many cases elsewhere. PS. Please forgive my poor English,and it is my second language. -- Three passions, simple but overwhelmingly strong, have governed my life: the longing for love, the search for knowledge, and unbearable pity for the suffering of mankind. ---------Bertrand Russell ------=_Part_7355_22872668.1140934722694 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On 2/26/06, Tace <tacetan@gmail.com> wrote:
Hi,
    Please do...

    = I got a question, doesn't disable the interrupts changes the
underlying = system? Perhaps a good way would be to monitor the
completion of the int= errupt routine before singlestepping to the next
instruction?


On 2/23/06, prime <guomingyan@gmail.com> wrote:
> Hello everyone,<= br>>     I find that I can't single step OS kernels = use qemu.When I use "step"
>  or "next" command in gdb,the kernel always en= ter its interrupt route
>  instead of executing the next in= struction after the breakpoint.So I modify
>  QEMU's source= code to disable interrupts in single step mode,and now I
>  can use "step" or "next" command in= gdb to single step functions.
>
>     Shou= ld I post the patch? It is a very small modification.
>
> --> Three passions, simple but overwhelmingly strong, have governed my li= fe:
> the longing for love, the search for knowledge, and unbearable pit= y for
> the suffering of mankind.
>    &nbs= p;            &= nbsp;        ---------Bertrand Russell
>
> _______________________________________________
= > Qemu-devel mailing list
> Qemu-devel@nongnu.org
> http://lists.nongnu.org/mailman/listinfo/qemu-devel
>
>
= >
Hi,
  I have post the patch here http://qemu.dad-answ= ers.com/viewtopic.php?t=3D921

  Disable interrupts in single step has very few
effects on the underlying system,in my opinion.
  In normal mode(without single step),many
instructions are executed between two interrupts,
but in single step mode,we have done too much extra
ministrant work besides execute one instruction while the "virtual clo= ck" running. So only one
instruction can be executed between two clock
interrupts.And I think,disable interrupts in single
step mode is a simple method to cancel the "virtual time" we have= used for doing extra ministrant work.

  For example,if we define CONFIG_SLIRP,then after
gdb_handle_packet() starts "virtual clock" by
vm_start(),we have to do much work to handle slirp,
and it needs lots "virtual time".This is just a
simple instance,and there are many cases elsewhere.

PS. Please forgive my poor English,and it is my second language.

--
Three passions, simple but overwhelmingly strong, have governed = my life:
the longing for love, the search for knowledge, and unbearable= pity for
the suffering of mankind.
     &n= bsp;            = ;       ---------Bertrand Russell
------=_Part_7355_22872668.1140934722694--