From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:48226) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UfVED-000485-Uh for qemu-devel@nongnu.org; Thu, 23 May 2013 09:06:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UfVE8-0004Ih-JV for qemu-devel@nongnu.org; Thu, 23 May 2013 09:06:45 -0400 Message-ID: <519E145D.8040205@suse.de> Date: Thu, 23 May 2013 15:06:37 +0200 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1369292323-31762-1-git-send-email-lig.fnst@cn.fujitsu.com> <1369292323-31762-2-git-send-email-lig.fnst@cn.fujitsu.com> In-Reply-To: <1369292323-31762-2-git-send-email-lig.fnst@cn.fujitsu.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH][v4 2/3] debugcon: make debug message more readable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: liguang Cc: qemu-trivial@nongnu.org, Stefan Hajnoczi , qemu-devel@nongnu.org, Peter Maydell Am 23.05.2013 08:58, schrieb liguang: > before change: > Bdebugcon: write addr=3D0x0000 val=3D0x6f > odebugcon: write addr=3D0x0000 val=3D0x6f > odebugcon: write addr=3D0x0000 val=3D0x74 > tdebugcon: write addr=3D0x0000 val=3D0x69 > idebugcon: write addr=3D0x0000 val=3D0x6e > ndebugcon: write addr=3D0x0000 val=3D0x67 > gdebugcon: write addr=3D0x0000 val=3D0x20 > debugcon: write addr=3D0x0000 val=3D0x66 >=20 > after change: > B [debugcon: write addr=3D0x0000 val=3D0x6f] > o [debugcon: write addr=3D0x0000 val=3D0x6f] > o [debugcon: write addr=3D0x0000 val=3D0x74] > t [debugcon: write addr=3D0x0000 val=3D0x69] > i [debugcon: write addr=3D0x0000 val=3D0x6e] > n [debugcon: write addr=3D0x0000 val=3D0x67] > g [debugcon: write addr=3D0x0000 val=3D0x20] > [debugcon: write addr=3D0x0000 val=3D0x66] >=20 > Signed-off-by: liguang > --- > hw/char/debugcon.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) >=20 > diff --git a/hw/char/debugcon.c b/hw/char/debugcon.c > index 7e41c90..52fa0ab 100644 > --- a/hw/char/debugcon.c > +++ b/hw/char/debugcon.c > @@ -55,7 +55,7 @@ static void debugcon_ioport_write(void *opaque, hwadd= r addr, uint64_t val, > unsigned char ch =3D val; > =20 > #ifdef DEBUG_DEBUGCON > - printf("debugcon: write addr=3D0x%04" HWADDR_PRIx " val=3D0x%02x\n= ", addr, val); > + printf(" [debugcon: write addr=3D0x%04" HWADDR_PRIx " val=3D0x%02x= ]\n", addr, val); While not wrong, this is rather exotic - wouldn't it be better to fprintf() to stderr instead or to use qemu_log() or tracepoints? Andreas > #endif > =20 > qemu_chr_fe_write(s->chr, &ch, 1); >=20 --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg