qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] show register info for all cpus
Date: Thu, 24 Jul 2008 13:39:24 -0500	[thread overview]
Message-ID: <4888CC5C.8080001@codemonkey.ws> (raw)
In-Reply-To: <1216923958-3222-1-git-send-email-gcosta@redhat.com>

Glauber Costa wrote:
> Currently, we only do a register dump for mon_cpu().
> Modify do_info_registers() in order to show what's
> going on in all of them.
>   

The currently implemented behaviour is to allow the 'cpu' command to 
determine which CPU the various monitor commands operate with (including 
info registers).  This is pretty consistent throughout the monitor.

Do you disagree with this behaviour or were you just not aware of it?  
It's unclear from the description in your patch.

Regards,

Anthony Liguori

> Signed-off-by: Glauber Costa <gcosta@redhat.com>
> ---
>  qemu/monitor.c |   18 +++++++++++-------
>  1 files changed, 11 insertions(+), 7 deletions(-)
>
> diff --git a/qemu/monitor.c b/qemu/monitor.c
> index 20dcca6..045eecb 100644
> --- a/qemu/monitor.c
> +++ b/qemu/monitor.c
> @@ -292,16 +292,20 @@ static CPUState *mon_get_cpu(void)
>  static void do_info_registers(void)
>  {
>      CPUState *env;
> -    env = mon_get_cpu();
> -    if (!env)
> -        return;
> +
> +    mon_get_cpu();
> +
> +    for(env = first_cpu; env != NULL; env = env->next_cpu) {
> +        term_printf("CPU: %d\n", env->cpu_index);
>  #ifdef TARGET_I386
> -    cpu_dump_state(env, NULL, monitor_fprintf,
> -                   X86_DUMP_FPU);
> +        cpu_dump_state(env, NULL, monitor_fprintf,
> +                       X86_DUMP_FPU);
>  #else
> -    cpu_dump_state(env, NULL, monitor_fprintf,
> -                   0);
> +        cpu_dump_state(env, NULL, monitor_fprintf,
> +                       0);
>  #endif
> +    }
> +    term_printf("\n");
>  }
>  
>  static void do_info_cpus(void)
>   

  reply	other threads:[~2008-07-24 18:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-24 18:25 [Qemu-devel] [PATCH] show register info for all cpus Glauber Costa
2008-07-24 18:39 ` Anthony Liguori [this message]
2008-07-24 19:28   ` Glauber Costa
2008-07-24 19:51     ` Anthony Liguori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4888CC5C.8080001@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).