qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 1/2] Improve Monitor disas with symbol lookup


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH 1/2] Improve Monitor disas with symbol lookup
Date: Mon, 19 Aug 2013 09:33:04 +0100

On 2 August 2013 13:48, Fabien Chouteau <address@hidden> wrote:
> Part of M731-018.

What is this a reference to?

> Signed-off-by: Fabien Chouteau <address@hidden>
> ---
>  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, ":  ");
> +        }

It feels to me like this is at the wrong level:
shouldn't it be in the disassembly layer so that you
can get symbols in both monitor disassembly and
debug-log disassembly?

thanks
-- PMM



reply via email to

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