From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49213) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z7oTw-0003j7-TT for qemu-devel@nongnu.org; Wed, 24 Jun 2015 13:29:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z7oTs-0007Rk-Au for qemu-devel@nongnu.org; Wed, 24 Jun 2015 13:29:04 -0400 Received: from mail-yh0-f50.google.com ([209.85.213.50]:36402) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z7oTs-0007RA-6R for qemu-devel@nongnu.org; Wed, 24 Jun 2015 13:29:00 -0400 Received: by yhan67 with SMTP id n67so19316277yha.3 for ; Wed, 24 Jun 2015 10:28:59 -0700 (PDT) MIME-Version: 1.0 Sender: peter.crosthwaite@petalogix.com In-Reply-To: <558AE5E9.7030809@suse.de> References: <00c96d447252bc1333e14e626611f4f5a58f9bf5.1434432813.git.crosthwaite.peter@gmail.com> <5588466A.1030902@suse.de> <558AE5E9.7030809@suse.de> Date: Wed, 24 Jun 2015 10:28:59 -0700 Message-ID: From: Peter Crosthwaite Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v2 2/4] gdbstub: Use cpu_set_pc helper List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?Q?Andreas_F=C3=A4rber?= Cc: Peter Maydell , Peter Crosthwaite , Peter Crosthwaite , "qemu-devel@nongnu.org Developers" , "Edgar E. Iglesias" On Wed, Jun 24, 2015 at 10:16 AM, Andreas F=C3=A4rber wr= ote: > Am 24.06.2015 um 19:04 schrieb Peter Crosthwaite: >> On Wed, Jun 24, 2015 at 3:01 AM, Peter Maydell wrote: >>> On 24 June 2015 at 03:50, Peter Crosthwaite >>> wrote: >>>> On Mon, Jun 22, 2015 at 10:31 AM, Andreas F=C3=A4rber wrote: >>>>> I believe this argument will probably go away; otherwise this should'= ve >>>>> been &error_abort or something instead of NULL. >>>>> >>>> >>>> I'm not sure. As I don't see what is catching the case of a gdb 'c' >>>> packet for a CPU that doesn't implement set_pc. I'd rather preserve >>>> the existing behaviour, and have the qom wrapper do nothing if it is >>>> not implemented. >>> >>> Well, this is one reason why every CPU needs to implement set_pc... >>> >> >> Well. I guess it works for a common case where a continue doesn't >> change the PC? If the debugger doesn't change the PC the "c" should >> work even without a set_pc call so we don't want to assert on this >> valid use case. > > Guys, is there any target that does not implement set_pc today? If so, > which? I'd rather implement it than carry around the iffery and > resulting complications. > > I quickly counted 17 target-* in my tree and all 17 seemed to show up in > git-grep. Can you confirm? Didn't check the latest tilegx series. > There are 17 targets and 18 sets by my count: $ git grep "set_pc.*=3D.*set_pc" target-* target-alpha/cpu.c: cc->set_pc =3D alpha_cpu_set_pc; target-arm/cpu.c: cc->set_pc =3D arm_cpu_set_pc; target-arm/cpu64.c: cc->set_pc =3D aarch64_cpu_set_pc; target-cris/cpu.c: cc->set_pc =3D cris_cpu_set_pc; target-i386/cpu.c: cc->set_pc =3D x86_cpu_set_pc; target-lm32/cpu.c: cc->set_pc =3D lm32_cpu_set_pc; target-m68k/cpu.c: cc->set_pc =3D m68k_cpu_set_pc; target-microblaze/cpu.c: cc->set_pc =3D mb_cpu_set_pc; target-mips/cpu.c: cc->set_pc =3D mips_cpu_set_pc; target-moxie/cpu.c: cc->set_pc =3D moxie_cpu_set_pc; target-openrisc/cpu.c: cc->set_pc =3D openrisc_cpu_set_pc; target-ppc/translate_init.c: cc->set_pc =3D ppc_cpu_set_pc; target-s390x/cpu.c: cc->set_pc =3D s390_cpu_set_pc; target-sh4/cpu.c: cc->set_pc =3D superh_cpu_set_pc; target-sparc/cpu.c: cc->set_pc =3D sparc_cpu_set_pc; target-tricore/cpu.c: cc->set_pc =3D tricore_cpu_set_pc; target-unicore32/cpu.c: cc->set_pc =3D uc32_cpu_set_pc; target-xtensa/cpu.c: cc->set_pc =3D xtensa_cpu_set_pc; ARM is doubled up. As long as no one else is missing a double up where there is not default set by a single base class we are OK. If there is a missing double up with a base class implementation, then there will be no change by your proposal anyway. Regards, Peter > Regards, > Andreas > > -- > SUSE Linux GmbH, Maxfeldstr. 5, 90409 N=C3=BCrnberg, Germany > GF: Felix Imend=C3=B6rffer, Jane Smithard, Dilip Upmanyu, Graham Norton; = HRB > 21284 (AG N=C3=BCrnberg) >