All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-trivial] [PATCH 1/2] Improve Monitor disas with symbol lookup
@ 2013-08-02 12:48 ` Fabien Chouteau
  0 siblings, 0 replies; 20+ messages in thread
From: Fabien Chouteau @ 2013-08-02 12:48 UTC (permalink / raw)
  To: qemu-trivial; +Cc: qemu-devel, lcapitulino

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, ":  ");
+        }
         count = print_insn(pc, &s.info);
-	monitor_printf(mon, "\n");
-	if (count < 0)
-	    break;
+        monitor_printf(mon, "\n");
+        if (count < 0) {
+            break;
+        }
         pc += count;
     }
 }
-- 
1.7.9.5



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

end of thread, other threads:[~2013-08-19 16:06 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [Qemu-trivial] " Andreas Färber
2013-08-19 14:14   ` Andreas Färber
2013-08-19 16:05   ` [Qemu-trivial] " Fabien Chouteau
2013-08-19 16:05     ` Fabien Chouteau

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.