[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] gdbstub broken in master
From: |
Max Filippov |
Subject: |
Re: [Qemu-devel] gdbstub broken in master |
Date: |
Thu, 11 Jul 2013 05:13:31 +0400 |
On Wed, Jul 10, 2013 at 1:47 AM, Andreas Färber <address@hidden> wrote:
> Hi Max,
>
> Am 09.07.2013 01:37, schrieb Max Filippov:
>> commit c52a6b67c1d7c6fc9fb2e3ba988d7b978e1487d3
>> Author: Andreas Färber <address@hidden>
>> Date: Fri May 17 17:49:10 2013 +0200
>>
>> gdbstub: Simplify find_cpu()
>>
>> Use qemu_get_cpu() and CPUState::env_ptr.
>>
>> Reviewed-by: Richard Henderson <address@hidden>
>> Signed-off-by: Andreas Färber <address@hidden>
>>
>> breaks single-stepping in gdb. This commit replaces
>>
>> if (cpu_index(cpu) == thread_id) {
>>
>> with qemu_get_cpu(thread_id) call, which does the following:
>>
>> if (cpu->cpu_index == index) {
>>
>> while cpu_index(cpu) used to return cpu->cpu_index + 1;
>
> Ouch! Thanks for catching this, not sure how I managed to mix them up.
>
> I've reverted this on qom-cpu (rebasing the first_cpu/next_cpu patch)
> and dropped a queued patch replacing two find_cpu()s with that
> qemu_get_cpu().
> https://github.com/afaerber/qemu-cpu/commits/qom-cpu
>
> The qom-cpu-11 branch has been updated to convert c_cpu, g_cpu and
> find_cpu() to CPUState all in one go rather than replacing and dropping
> the latter and doing the two fields separately. Can you give it a test?
Ran basic tests with qemu-system-xtensa, appears to work.
--
Thanks.
-- Max