[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: |
Alexey Kardashevskiy |
Subject: |
Re: [Qemu-ppc] [RFC PATCH v4 5/5] target/ppc: support single stepping with KVM HV |
Date: |
Thu, 13 Jun 2019 16:03:38 +1000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 |
On 13/06/2019 12:01, Fabiano Rosas wrote:
> 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:
I was not clear, this is a generic issue, not related to your patchset,
I just thought since you are looking at this already, you might find the
answer faster, that's it :)
>
> 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.
Thanks!
>
>> 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".
>>
>
--
Alexey