From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57999) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uwfkr-0000OV-Lm for qemu-devel@nongnu.org; Tue, 09 Jul 2013 17:47:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uwfkq-0008Mp-Bn for qemu-devel@nongnu.org; Tue, 09 Jul 2013 17:47:25 -0400 Received: from cantor2.suse.de ([195.135.220.15]:60162 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uwfkq-0008Mj-4w for qemu-devel@nongnu.org; Tue, 09 Jul 2013 17:47:24 -0400 Message-ID: <51DC84E7.6090609@suse.de> Date: Tue, 09 Jul 2013 23:47:19 +0200 From: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] gdbstub broken in master List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Filippov Cc: qemu-devel , Richard Henderson Hi Max, Am 09.07.2013 01:37, schrieb Max Filippov: > commit c52a6b67c1d7c6fc9fb2e3ba988d7b978e1487d3 > Author: Andreas F=C3=A4rber > Date: Fri May 17 17:49:10 2013 +0200 >=20 > gdbstub: Simplify find_cpu() >=20 > Use qemu_get_cpu() and CPUState::env_ptr. >=20 > Reviewed-by: Richard Henderson > Signed-off-by: Andreas F=C3=A4rber >=20 > breaks single-stepping in gdb. This commit replaces >=20 > if (cpu_index(cpu) =3D=3D thread_id) { >=20 > with qemu_get_cpu(thread_id) call, which does the following: >=20 > if (cpu->cpu_index =3D=3D index) { >=20 > 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 --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=C3=BCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=C3=B6rffer; HRB 16746 AG N=C3=BC= rnberg