On 19 August 2014 01:48, Peter Crosthwaite <[email protected]> wrote:
> It's very useful when debugging SMP to know who disassembly or a CPU
> state dump is being done on behalf of.
>
> Signed-off-by: Peter Crosthwaite <[email protected]>
> ---
>
>  target-arm/translate-a64.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/target-arm/translate-a64.c b/target-arm/translate-a64.c
> index f04ca49..957d23f 100644
> --- a/target-arm/translate-a64.c
> +++ b/target-arm/translate-a64.c
> @@ -141,7 +141,8 @@ void aarch64_cpu_dump_state(CPUState *cs, FILE *f,
>              cpu_fprintf(f, " ");
>          }
>      }
> -    cpu_fprintf(f, "PSTATE=%08x (flags %c%c%c%c)\n",
> +    cpu_fprintf(f, "CPU%d: PSTATE=%08x (flags %c%c%c%c)\n",
> +                cs->cpu_index,

Maybe this should go in cpu_dump_state() so we're consistent
across all CPUs? (With this patch we're not even consistent
between 32 bit and 64 bit ARM...)

>                  psr,
>                  psr & PSTATE_N ? 'N' : '-',
>                  psr & PSTATE_Z ? 'Z' : '-',
> @@ -10988,7 +10989,7 @@ done_generating:
>  #ifdef DEBUG_DISAS
>      if (qemu_loglevel_mask(CPU_LOG_TB_IN_ASM)) {
>          qemu_log("----------------\n");
> -        qemu_log("IN: %s\n", lookup_symbol(pc_start));
> +        qemu_log("CPU: %d, IN: %s\n",  cs->cpu_index, 
> lookup_symbol(pc_start));
>          log_target_disas(env, pc_start, dc->pc - pc_start,
>                           4 | (dc->bswap_code << 1));
>          qemu_log("\n");

Again, this makes us inconsistent between architectures
and even between 32 bit and 64 bit ARM.

thanks
-- PMM

Reply via email to