From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22595 invoked by alias); 27 Aug 2012 21:10:14 -0000 Received: (qmail 22571 invoked by uid 22791); 27 Aug 2012 21:10:12 -0000 X-SWARE-Spam-Status: No, hits=-8.7 required=5.0 tests=AWL,BAYES_00,KHOP_PGP_SIGNED,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp.gentoo.org (HELO smtp.gentoo.org) (140.211.166.183) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 27 Aug 2012 21:09:58 +0000 Received: from vapier.localnet (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 4993633D725; Mon, 27 Aug 2012 21:09:57 +0000 (UTC) From: Mike Frysinger To: gdb-patches@sourceware.org Subject: Re: [RFC] New GDB Port CR16 Date: Mon, 27 Aug 2012 21:10:00 -0000 User-Agent: KMail/1.13.7 (Linux/3.5.0; KDE/4.6.5; x86_64; ; ) Cc: Kaushik Phatak References: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart4145826.67qjcr9eD0"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201208271710.28346.vapier@gentoo.org> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-08/txt/msg00819.txt.bz2 --nextPart4145826.67qjcr9eD0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-length: 2219 On Monday 27 August 2012 02:36:15 Kaushik Phatak wrote: > Please find attached a patch that adds support for the National > Semiconductor CR16 architecture to GDB. The sim patch is already present > in the sources. This patch enhances the sim to support breakpoints for sim > based debugging. this one diff has multiple unrelated changes. might be nice if you were to= =20 split them up and commit them separately. the sim/common/ changes could be= =20 merged now for example. the other cr16 sim changes should be split up from= =20 the gdb changes so that they may be merged independently. > --- gdb_src.orig/sim/common/gennltvals.sh > +++ ./gdb_src/sim/common/gennltvals.sh >=20 > --- gdb_src.orig/sim/common/nltvals.def > +++ ./gdb_src/sim/common/nltvals.def >=20 > --- gdb_src.orig/sim/cr16/cr16_sim.h > +++ ./gdb_src/sim/cr16/cr16_sim.h >=20 > --- gdb_src.orig/sim/cr16/interp.c > +++ ./gdb_src/sim/cr16/interp.c changes to these files look fine > --- gdb_src.orig/sim/cr16/simops.c > +++ ./gdb_src/sim/cr16/simops.c > void > OP_C_C () unrelated, but that should be "(void)". i imagine this sim port probably h= as=20 a bunch of those bugs lurking though. > @@ -5465,9 +5467,24 @@ OP_C_C () > #endif >=20=20=09=20=20=20=20 > default: > + a =3D OP[0]; > + switch(a) > + { > + case TRAP_BREAKPOINT: > + State.exception =3D SIGTRAP; > + tmp =3D (PC); > + JMP(tmp); > + trace_output_void (); > + break; > + case SIGTRAP: // supervisor call ? > + State.exception =3D SIG_CR16_EXIT; > + trace_output_void (); > + break; > + default: > cr16_callback->error (cr16_callback, "Unknown syscall %d", FUNC); > + break; > + } pretty sure the indentation here is incorrect. the case statements inside= =20 this new switch statement are not indented far enough. also, please do not use C++ style comments //. use /* */ instead. > --- gdb_src.orig/opcodes/cr16-dis.c > +++ ./gdb_src/opcodes/cr16-dis.c >=20=20 > -static int > +int match_opcode (void); > + > +int > match_opcode (void) this new local prototype makes no sense. just delete it. > -static void > +void make_instruction (void); > + > +void > make_instruction (void) same here -mike --nextPart4145826.67qjcr9eD0 Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. Content-length: 836 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (GNU/Linux) iQIcBAABAgAGBQJQO+JEAAoJEEFjO5/oN/WBh3wQALWeXag2AcczgT0KG+LorQq9 IVGv30xqOnp8EhZzj3HlY31vegH2MZUdwJaJabhGjWlqMtIp++ALdkao2+LdM21l vWDyPlJ3VyNCTyY0jE7iqfOONAwj45zIw1ZXzJt1lTBnyekfZcENrzM5M/w2NaYO q9MTKcxpDbUjJ4IHv477lIO+zD2oAtElXxQD4rkMAKmDVRa2fUG+a+TbcUy7t4zv Dd5ZfGyp9ZmyUnRhhZr48mwmfIsc96wvC1KTc7mJzzH+yZ2JV1l8paCzei+7h/uP 8X6uTInoNZlmJXC2U2aRxbxKOZgMa+e/1fBzYM82VYaZl74zDLiR6OARbU1HtkEd AkHsqqy+1qFlOQKj4l6OMHyR0ES1Cz8DeNqSTGlA/Dj4Xk2H/eWcYh7K+gVoLVmw hAGcw04tvV8Z+lk7nt7Y8NJsUtqzjeTAt/flyrx/C2ts1qP2NbfZbUs1z/vTdefv rMzusGXdouGQZatavgDwMpxWby20io7sGEbh2FIITrX9JEJIt3mp23hvnvpu/Acy 4eJyHZe6YiFH3ojvZN0jLy/sVzWfbWg5OXZec792l2yESkB0n9HX8Q0vYqSLnWl0 KB9M4flJzuTFEfGSwlradwgYftlELnzWG5OZlR0os8smtzq1YJaOPGyfk7DfjSug 3o01Q1CZF5bgyiYroY98 =lGbW -----END PGP SIGNATURE----- --nextPart4145826.67qjcr9eD0--