* [Qemu-devel] gdbstub broken in master
@ 2013-07-08 23:37 Max Filippov
2013-07-09 21:47 ` Andreas Färber
0 siblings, 1 reply; 3+ messages in thread
From: Max Filippov @ 2013-07-08 23:37 UTC (permalink / raw)
To: Andreas Färber; +Cc: qemu-devel, Richard Henderson
Hi Andreas,
commit c52a6b67c1d7c6fc9fb2e3ba988d7b978e1487d3
Author: Andreas Färber <afaerber@suse.de>
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 <rth@twiddle.net>
Signed-off-by: Andreas Färber <afaerber@suse.de>
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;
--
Thanks.
-- Max
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] gdbstub broken in master
2013-07-08 23:37 [Qemu-devel] gdbstub broken in master Max Filippov
@ 2013-07-09 21:47 ` Andreas Färber
2013-07-11 1:13 ` Max Filippov
0 siblings, 1 reply; 3+ messages in thread
From: Andreas Färber @ 2013-07-09 21:47 UTC (permalink / raw)
To: Max Filippov; +Cc: qemu-devel, Richard Henderson
Hi Max,
Am 09.07.2013 01:37, schrieb Max Filippov:
> commit c52a6b67c1d7c6fc9fb2e3ba988d7b978e1487d3
> Author: Andreas Färber <afaerber@suse.de>
> 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 <rth@twiddle.net>
> Signed-off-by: Andreas Färber <afaerber@suse.de>
>
> 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?
Regards,
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] gdbstub broken in master
2013-07-09 21:47 ` Andreas Färber
@ 2013-07-11 1:13 ` Max Filippov
0 siblings, 0 replies; 3+ messages in thread
From: Max Filippov @ 2013-07-11 1:13 UTC (permalink / raw)
To: Andreas Färber; +Cc: qemu-devel, Richard Henderson
On Wed, Jul 10, 2013 at 1:47 AM, Andreas Färber <afaerber@suse.de> wrote:
> Hi Max,
>
> Am 09.07.2013 01:37, schrieb Max Filippov:
>> commit c52a6b67c1d7c6fc9fb2e3ba988d7b978e1487d3
>> Author: Andreas Färber <afaerber@suse.de>
>> 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 <rth@twiddle.net>
>> Signed-off-by: Andreas Färber <afaerber@suse.de>
>>
>> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-07-11 1:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-08 23:37 [Qemu-devel] gdbstub broken in master Max Filippov
2013-07-09 21:47 ` Andreas Färber
2013-07-11 1:13 ` Max Filippov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).