qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Make QEMU more friendly for kernel debug
@ 2006-02-23  6:04 prime
       [not found] ` <92c265230602252042r5adf23a0y7de4d2c4905110c8@mail.gmail.com>
  0 siblings, 1 reply; 5+ messages in thread
From: prime @ 2006-02-23  6:04 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 672 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 915 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Qemu-devel] Make QEMU more friendly for kernel debug
@ 2006-02-24  7:46 prime
  2006-02-25  8:13 ` Mulyadi Santosa
  0 siblings, 1 reply; 5+ messages in thread
From: prime @ 2006-02-24  7:46 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 680 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 958 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] Make QEMU more friendly for kernel debug
  2006-02-24  7:46 [Qemu-devel] Make QEMU more friendly for kernel debug prime
@ 2006-02-25  8:13 ` Mulyadi Santosa
  2006-02-25 10:56   ` prime
  0 siblings, 1 reply; 5+ messages in thread
From: Mulyadi Santosa @ 2006-02-25  8:13 UTC (permalink / raw)
  To: qemu-devel, prime

Hi..


> 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.

very interesting! Please post your patch on qemu-devel and preferably on 
qemu.dad-answers.com too. Personally, I'd be glad to review it.

regards

Mulyadi

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] Make QEMU more friendly for kernel debug
  2006-02-25  8:13 ` Mulyadi Santosa
@ 2006-02-25 10:56   ` prime
  0 siblings, 0 replies; 5+ messages in thread
From: prime @ 2006-02-25 10:56 UTC (permalink / raw)
  To: a_mulyadi; +Cc: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 763 bytes --]

On 2/25/06, Mulyadi Santosa <a_mulyadi@softhome.net> wrote:
>
> Hi..
>
>
> > 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.
>
> very interesting! Please post your patch on qemu-devel and preferably on
> qemu.dad-answers.com too. Personally, I'd be glad to review it.
>
> regards
>
> Mulyadi
>
> I have post the patch here.
http://qemu.dad-answers.com/viewtopic.php?t=921

regards

Mingyan Guo

--
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

[-- Attachment #2: Type: text/html, Size: 1349 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] Make QEMU more friendly for kernel debug
       [not found] ` <92c265230602252042r5adf23a0y7de4d2c4905110c8@mail.gmail.com>
@ 2006-02-26  6:18   ` prime
  0 siblings, 0 replies; 5+ messages in thread
From: prime @ 2006-02-26  6:18 UTC (permalink / raw)
  To: Tace; +Cc: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 2475 bytes --]

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 interrupt routine before singlestepping to the next
> instruction?
>
>
> On 2/23/06, prime <guomingyan@gmail.com> 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=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

[-- Attachment #2: Type: text/html, Size: 3605 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-02-26  6:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-24  7:46 [Qemu-devel] Make QEMU more friendly for kernel debug prime
2006-02-25  8:13 ` Mulyadi Santosa
2006-02-25 10:56   ` prime
  -- strict thread matches above, loose matches on Subject: below --
2006-02-23  6:04 prime
     [not found] ` <92c265230602252042r5adf23a0y7de4d2c4905110c8@mail.gmail.com>
2006-02-26  6:18   ` prime

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).