From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:46933) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TGdsu-0004gV-Bf for qemu-devel@nongnu.org; Tue, 25 Sep 2012 18:45:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TGdss-0003jO-JQ for qemu-devel@nongnu.org; Tue, 25 Sep 2012 18:45:44 -0400 Received: from hall.aurel32.net ([88.191.126.93]:45400) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TGdss-0003is-A3 for qemu-devel@nongnu.org; Tue, 25 Sep 2012 18:45:42 -0400 Date: Wed, 26 Sep 2012 00:45:40 +0200 From: Aurelien Jarno Message-ID: <20120925224540.GG23819@ohm.aurel32.net> References: <1348523753-25083-1-git-send-email-rth@twiddle.net> <1348523753-25083-8-git-send-email-rth@twiddle.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <1348523753-25083-8-git-send-email-rth@twiddle.net> Subject: Re: [Qemu-devel] [PATCH 7/7] target-s390x: Tidy cpu_dump_state List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson Cc: qemu-devel@nongnu.org, Alexander Graf On Mon, Sep 24, 2012 at 02:55:53PM -0700, Richard Henderson wrote: > The blank lines inside the single dump make it difficult for the > eye to pick out the block. Worse, with interior newlines, but > no blank line following, the PSW line appears to belong to the > next dump block. > > Cc: Alexander Graf > Signed-off-by: Richard Henderson > --- > target-s390x/translate.c | 22 ++++++++++------------ > 1 file changed, 10 insertions(+), 12 deletions(-) > > diff --git a/target-s390x/translate.c b/target-s390x/translate.c > index 4cc9225..db464cc 100644 > --- a/target-s390x/translate.c > +++ b/target-s390x/translate.c > @@ -79,6 +79,14 @@ void cpu_dump_state(CPUS390XState *env, FILE *f, fprintf_function cpu_fprintf, > { > int i; > > + if (env->cc_op > 3) { > + cpu_fprintf(f, "PSW=mask %016" PRIx64 " addr %016" PRIx64 " cc %15s\n", > + env->psw.mask, env->psw.addr, cc_name(env->cc_op)); > + } else { > + cpu_fprintf(f, "PSW=mask %016" PRIx64 " addr %016" PRIx64 " cc %02x\n", > + env->psw.mask, env->psw.addr, env->cc_op); > + } > + > for (i = 0; i < 16; i++) { > cpu_fprintf(f, "R%02d=%016" PRIx64, i, env->regs[i]); > if ((i % 4) == 3) { > @@ -97,8 +105,6 @@ void cpu_dump_state(CPUS390XState *env, FILE *f, fprintf_function cpu_fprintf, > } > } > > - cpu_fprintf(f, "\n"); > - > #ifndef CONFIG_USER_ONLY > for (i = 0; i < 16; i++) { > cpu_fprintf(f, "C%02d=%016" PRIx64, i, env->cregs[i]); > @@ -110,22 +116,14 @@ void cpu_dump_state(CPUS390XState *env, FILE *f, fprintf_function cpu_fprintf, > } > #endif > > - cpu_fprintf(f, "\n"); > - > - if (env->cc_op > 3) { > - cpu_fprintf(f, "PSW=mask %016" PRIx64 " addr %016" PRIx64 " cc %15s\n", > - env->psw.mask, env->psw.addr, cc_name(env->cc_op)); > - } else { > - cpu_fprintf(f, "PSW=mask %016" PRIx64 " addr %016" PRIx64 " cc %02x\n", > - env->psw.mask, env->psw.addr, env->cc_op); > - } > - > #ifdef DEBUG_INLINE_BRANCHES > for (i = 0; i < CC_OP_MAX; i++) { > cpu_fprintf(f, " %15s = %10ld\t%10ld\n", cc_name(i), > inline_branch_miss[i], inline_branch_hit[i]); > } > #endif > + > + cpu_fprintf(f, "\n"); > } > > static TCGv_i64 psw_addr; > -- > 1.7.11.4 Reviewed-by: Aurelien Jarno -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net