From: "Andreas Färber" <afaerber@suse.de>
To: Fabien Chouteau <chouteau@adacore.com>
Cc: qemu-trivial@nongnu.org, Peter Maydell <peter.maydell@linaro.org>,
qemu-devel@nongnu.org, lcapitulino@redhat.com
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH 1/2] Improve Monitor disas with symbol lookup
Date: Mon, 19 Aug 2013 16:14:10 +0200 [thread overview]
Message-ID: <52122832.9000501@suse.de> (raw)
In-Reply-To: <1375447708-14545-1-git-send-email-chouteau@adacore.com>
Am 02.08.2013 14:48, schrieb Fabien Chouteau:
> Part of M731-018.
>
> Signed-off-by: Fabien Chouteau <chouteau@adacore.com>
> ---
> disas.c | 16 ++++++++++++----
> 1 file changed, 12 insertions(+), 4 deletions(-)
>
> diff --git a/disas.c b/disas.c
> index 71007fb..3ffb3ae 100644
> --- a/disas.c
> +++ b/disas.c
> @@ -480,11 +480,19 @@ void monitor_disas(Monitor *mon, CPUArchState *env,
> #endif
>
> for(i = 0; i < nb_insn; i++) {
> - monitor_printf(mon, "0x" TARGET_FMT_lx ": ", pc);
> + const char *sym = lookup_symbol(pc);
> +
> + monitor_printf(mon, "0x" TARGET_FMT_lx " ", pc);
> + if (sym[0] != '\0') {
> + monitor_printf(mon, "<%s>: ", sym);
> + } else {
> + monitor_printf(mon, ": ");
> + }
Independent of PMM's comment, I think you meant
+ monitor_printf(mon, "0x" TARGET_FMT_lx, pc);
+ if (sym[0] != '\0') {
+ monitor_printf(mon, " <%s>: ", sym);
+ } else {
+ monitor_printf(mon, ": ");
+ }
to keep the output unchanged.
Could you please put the tab fixing into a preceding patch for
readability and prepend a cover letter?
Regards,
Andreas
> count = print_insn(pc, &s.info);
> - monitor_printf(mon, "\n");
> - if (count < 0)
> - break;
> + monitor_printf(mon, "\n");
> + if (count < 0) {
> + break;
> + }
> pc += count;
> }
> }
>
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
WARNING: multiple messages have this Message-ID (diff)
From: "Andreas Färber" <afaerber@suse.de>
To: Fabien Chouteau <chouteau@adacore.com>
Cc: qemu-trivial@nongnu.org, Peter Maydell <peter.maydell@linaro.org>,
qemu-devel@nongnu.org, lcapitulino@redhat.com
Subject: Re: [Qemu-devel] [PATCH 1/2] Improve Monitor disas with symbol lookup
Date: Mon, 19 Aug 2013 16:14:10 +0200 [thread overview]
Message-ID: <52122832.9000501@suse.de> (raw)
In-Reply-To: <1375447708-14545-1-git-send-email-chouteau@adacore.com>
Am 02.08.2013 14:48, schrieb Fabien Chouteau:
> Part of M731-018.
>
> Signed-off-by: Fabien Chouteau <chouteau@adacore.com>
> ---
> disas.c | 16 ++++++++++++----
> 1 file changed, 12 insertions(+), 4 deletions(-)
>
> diff --git a/disas.c b/disas.c
> index 71007fb..3ffb3ae 100644
> --- a/disas.c
> +++ b/disas.c
> @@ -480,11 +480,19 @@ void monitor_disas(Monitor *mon, CPUArchState *env,
> #endif
>
> for(i = 0; i < nb_insn; i++) {
> - monitor_printf(mon, "0x" TARGET_FMT_lx ": ", pc);
> + const char *sym = lookup_symbol(pc);
> +
> + monitor_printf(mon, "0x" TARGET_FMT_lx " ", pc);
> + if (sym[0] != '\0') {
> + monitor_printf(mon, "<%s>: ", sym);
> + } else {
> + monitor_printf(mon, ": ");
> + }
Independent of PMM's comment, I think you meant
+ monitor_printf(mon, "0x" TARGET_FMT_lx, pc);
+ if (sym[0] != '\0') {
+ monitor_printf(mon, " <%s>: ", sym);
+ } else {
+ monitor_printf(mon, ": ");
+ }
to keep the output unchanged.
Could you please put the tab fixing into a preceding patch for
readability and prepend a cover letter?
Regards,
Andreas
> count = print_insn(pc, &s.info);
> - monitor_printf(mon, "\n");
> - if (count < 0)
> - break;
> + monitor_printf(mon, "\n");
> + if (count < 0) {
> + break;
> + }
> pc += count;
> }
> }
>
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
next prev parent reply other threads:[~2013-08-19 14:14 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-02 12:48 [Qemu-trivial] [PATCH 1/2] Improve Monitor disas with symbol lookup Fabien Chouteau
2013-08-02 12:48 ` [Qemu-devel] " Fabien Chouteau
2013-08-02 12:48 ` [Qemu-trivial] [PATCH 2/2] Add ARM registers definitions in Monitor commands Fabien Chouteau
2013-08-02 12:48 ` [Qemu-devel] " Fabien Chouteau
2013-08-19 8:26 ` [Qemu-trivial] " Fabien Chouteau
2013-08-19 8:26 ` Fabien Chouteau
2013-08-19 8:31 ` [Qemu-trivial] " Peter Maydell
2013-08-19 8:31 ` Peter Maydell
2013-08-19 14:24 ` [Qemu-trivial] " Andreas Färber
2013-08-19 14:24 ` Andreas Färber
2013-08-19 8:27 ` [Qemu-trivial] [Qemu-devel] [PATCH 1/2] Improve Monitor disas with symbol lookup Fabien Chouteau
2013-08-19 8:27 ` Fabien Chouteau
2013-08-19 8:33 ` [Qemu-trivial] " Peter Maydell
2013-08-19 8:33 ` Peter Maydell
2013-08-19 14:08 ` [Qemu-trivial] " Fabien Chouteau
2013-08-19 14:08 ` Fabien Chouteau
2013-08-19 14:14 ` Andreas Färber [this message]
2013-08-19 14:14 ` Andreas Färber
2013-08-19 16:05 ` [Qemu-trivial] " Fabien Chouteau
2013-08-19 16:05 ` Fabien Chouteau
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=52122832.9000501@suse.de \
--to=afaerber@suse.de \
--cc=chouteau@adacore.com \
--cc=lcapitulino@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.