From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58377) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VBRyE-0004w0-2W for qemu-devel@nongnu.org; Mon, 19 Aug 2013 12:06:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VBRy9-0000Gw-5I for qemu-devel@nongnu.org; Mon, 19 Aug 2013 12:06:17 -0400 Message-ID: <52124255.6090603@adacore.com> Date: Mon, 19 Aug 2013 18:05:41 +0200 From: Fabien Chouteau MIME-Version: 1.0 References: <1375447708-14545-1-git-send-email-chouteau@adacore.com> <52122832.9000501@suse.de> In-Reply-To: <52122832.9000501@suse.de> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 1/2] Improve Monitor disas with symbol lookup List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?ISO-8859-15?Q?Andreas_F=E4rber?= Cc: qemu-trivial@nongnu.org, Peter Maydell , qemu-devel@nongnu.org, lcapitulino@redhat.com On 08/19/2013 04:14 PM, Andreas F=E4rber wrote: > Am 02.08.2013 14:48, schrieb Fabien Chouteau: >> Part of M731-018. >> >> Signed-off-by: Fabien Chouteau >> --- >> 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 *e= nv, >> #endif >> =20 >> for(i =3D 0; i < nb_insn; i++) { >> - monitor_printf(mon, "0x" TARGET_FMT_lx ": ", pc); >> + const char *sym =3D lookup_symbol(pc); >> + >> + monitor_printf(mon, "0x" TARGET_FMT_lx " ", pc); >> + if (sym[0] !=3D '\0') { >> + monitor_printf(mon, "<%s>: ", sym); >> + } else { >> + monitor_printf(mon, ": "); >> + } >=20 > Independent of PMM's comment, I think you meant >=20 > + monitor_printf(mon, "0x" TARGET_FMT_lx, pc); > + if (sym[0] !=3D '\0') { > + monitor_printf(mon, " <%s>: ", sym); > + } else { > + monitor_printf(mon, ": "); > + } >=20 > to keep the output unchanged. >=20 > Could you please put the tab fixing into a preceding patch for > readability and prepend a cover letter? OK, will do. --=20 Fabien Chouteau