qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 1/2] Improve Monitor disas with symbol lookup
@ 2013-08-02 12:48 Fabien Chouteau
  2013-08-02 12:48 ` [Qemu-devel] [PATCH 2/2] Add ARM registers definitions in Monitor commands Fabien Chouteau
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ 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] 10+ messages in thread

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

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-02 12:48 [Qemu-devel] [PATCH 1/2] Improve Monitor disas with symbol lookup Fabien Chouteau
2013-08-02 12:48 ` [Qemu-devel] [PATCH 2/2] Add ARM registers definitions in Monitor commands Fabien Chouteau
2013-08-19  8:26   ` Fabien Chouteau
2013-08-19  8:31     ` Peter Maydell
2013-08-19 14:24       ` Andreas Färber
2013-08-19  8:27 ` [Qemu-devel] [PATCH 1/2] Improve Monitor disas with symbol lookup Fabien Chouteau
2013-08-19  8:33 ` Peter Maydell
2013-08-19 14:08   ` Fabien Chouteau
2013-08-19 14:14 ` Andreas Färber
2013-08-19 16:05   ` Fabien Chouteau

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