qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-ppc] [RFC PATCH v4 5/5] target/ppc: support single stepping wi


From: Fabiano Rosas
Subject: Re: [Qemu-ppc] [RFC PATCH v4 5/5] target/ppc: support single stepping with KVM HV
Date: Wed, 12 Jun 2019 23:01:03 -0300

Alexey Kardashevskiy <address@hidden> writes:

> It is TCG, a single CPU with a single thread and no matter where I put

Ok, but then none of this code gets executed because it is kvm-only:

qemu/exec.c
void cpu_single_step(CPUState *cpu, int enabled)
{
    if (cpu->singlestep_enabled != enabled) {
        cpu->singlestep_enabled = enabled;
        if (kvm_enabled()) {
->           kvm_set_singlestep(cpu, enabled);
        } else {
            /* must flush all the translated code to avoid inconsistencies */
            /* XXX: only flush what is necessary */
            tb_flush(cpu);
        }
    }
}

> this "stdu    r1,-368(r1)" - GDB does not stop on the next one and just
> runs.
>
> In the example above:
> 1. "b *0x10f16bc" makes GDB stop there, "ni" continues without stopping
> on at 0x10f16c0.

But this seems wrong anyway. Let me try to reproduce it and see what I
can find.

> 2. "b *0x10f16bc" and "b *0x10f16c0" make GDB stop at 0x10f16bc and "ni"
> steps to 0x10f16c0 but it is rather because it is a breakpoint and not
> the next instruction.
> 3. "b *0x10f16bc" and "b *0x10f16c4" make GDB stop at 0x10f16bc and "ni"
> stops GDB at 0x10f16bc but again it is a breakpoint.
>
> In 2 and 3 it is possible to continue step debugging till the next "stdu".
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]