On 13/06/2019 12:01, Fabiano Rosas wrote:
> Alexey Kardashevskiy <a...@ozlabs.ru> 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