qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Make QEMU more friendly for kernel debug


From: prime
Subject: Re: [Qemu-devel] Make QEMU more friendly for kernel debug
Date: Sun, 26 Feb 2006 14:18:42 +0800

On 2/26/06, Tace <address@hidden> 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 <address@hidden> 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
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/qemu-devel
>
>
>
Hi,
  I have post the patch here http://qemu.dad-answers.com/viewtopic.php?t=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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]