Signed-off-by: Fabien Chouteau <[email protected]>
---
disas.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/disas.c b/disas.c
index 32407de..c83bf5b 100644
--- a/disas.c
+++ b/disas.c
@@ -507,7 +507,15 @@ 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) {
--
1.7.9.5