On Fri, Sep 27, 2019 at 8:55 AM Alistair Francis <alistair.fran...@wdc.com> wrote:
typo "privledge" in the commit title > > Signed-off-by: Alistair Francis <alistair.fran...@wdc.com> > --- > target/riscv/translate.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/target/riscv/translate.c b/target/riscv/translate.c > index adeddb85f6..537af0003e 100644 > --- a/target/riscv/translate.c > +++ b/target/riscv/translate.c > @@ -810,7 +810,14 @@ static void riscv_tr_tb_stop(DisasContextBase *dcbase, > CPUState *cpu) > > static void riscv_tr_disas_log(const DisasContextBase *dcbase, CPUState *cpu) > { > +#ifndef CONFIG_USER_ONLY > + RISCVCPU *rvcpu = RISCV_CPU(cpu); > + CPURISCVState *env = &rvcpu->env; > +#endif > qemu_log("IN: %s\n", lookup_symbol(dcbase->pc_first)); > +#ifndef CONFIG_USER_ONLY > + qemu_log("CPU: %d; priv: "TARGET_FMT_ld"\n", cpu->cpu_index, env->priv); Since this patch wants to be helpful for debugging, would it make more sense to print out the priv mode string instead of the number, eg: priv: M. But I am fine with just printing out the number. > +#endif > log_target_disas(cpu, dcbase->pc_first, dcbase->tb->size); > } Reviewed-by: Bin Meng <bmeng...@gmail.com> Tested-by: Bin Meng <bmeng...@gmail.com>