From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4639 invoked by alias); 25 Aug 2012 05:32:32 -0000 Received: (qmail 4631 invoked by uid 22791); 25 Aug 2012 05:32:31 -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; Sat, 25 Aug 2012 05:32:17 +0000 Received: from vapier.localnet (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id EF3C133D732; Sat, 25 Aug 2012 05:32:16 +0000 (UTC) From: Mike Frysinger To: DJ Delorie Subject: Re: is sim/common documented anywhere? Date: Sat, 25 Aug 2012 05:32:00 -0000 User-Agent: KMail/1.13.7 (Linux/3.5.0; KDE/4.6.5; x86_64; ; ) Cc: gdb@sourceware.org References: <201208222258.q7MMw5Gw016471@greed.delorie.com> <201208241810.45936.vapier@gentoo.org> <201208250049.q7P0na0W023779@greed.delorie.com> In-Reply-To: <201208250049.q7P0na0W023779@greed.delorie.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart4095082.jp72hu27dh"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201208250132.27731.vapier@gentoo.org> X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2012-08/txt/msg00086.txt.bz2 --nextPart4095082.jp72hu27dh Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-length: 1071 On Friday 24 August 2012 20:49:36 DJ Delorie wrote: > Problem turned out to be this: running "make all-sim" doesn't return > an error if your compilation fails, at least on my system. weird ... it does for me. i don't think the rules added by the common make= =20 fragments swallow any errors ... > I've now gotten to the point where sim_engine_run() is called. I > assume this is where I put the actual core simulation? yes & no. i think the core of the sim_engine_run loop is best left simple: void sim_engine_run (SIM_DESC sd, int next_cpu_nr, /* ignore */ int nr_cpus, /* ignore */=20=20 int siggnal) /* ignore */ { SIM_CPU *cpu; SIM_ASSERT (STATE_MAGIC (sd) =3D=3D SIM_MAGIC_NUMBER); cpu =3D STATE_CPU (sd, 0); while (1) { step_once (cpu); if (sim_events_tick (sd)) sim_events_process (sd); } } feel free to call "step_once" whatever you want -- there doesn't appear to = be=20 consistency atm. but that func is where you'd put all the decode+execute=20 logic. -mike --nextPart4095082.jp72hu27dh 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) iQIcBAABAgAGBQJQOGNrAAoJEEFjO5/oN/WBO1AP/iGMBty6/umHXfNH2x9boduK nQorJHC+IduB/ObHihO9x09l+6sFAFsyxXbiPuQBKTMOV5/aIu82/0UmJR9+PdTG UYNirEXS+Kt+AUS7Ip5B/tNcmOhFJP0Il1lwbyz6LTcTK4JeYuX1OHVClIwcF+lF 4TnYBC7g7xQDiu5hz8lRBEmjGm6azRv5OYGVNYZwSO68btQF+DQsmn8H3JvBLnyd 0VVeo+4YKcEU7rgIWCgVvsqN6GhDhGC0rcDG62LsF5GE7EfFvTfaGGNDnwD9S0mV 1cOOX5sIlVsGRqb5/4hn/r49OR/EjeqVNs/3Xwln1FU8w5H0YBBbmdaRz4phbTNZ /yPjE5scVmStAYZF4Oy/vEdrPIk+5NcpZZdRvPO9ti3LRaTB4frc5xOasZa/R1wR cHUZ5x5L4VfaF6uzKRrTi5kirtZz3LXix3BHbm8IhMe1nYgdQsjqxo7anXzYGqfB M9DFFrnd4UfNCZsadei2CUL37i4AjkvkOo5oCnvjxuYSiCluNGq8/SSAowgSLE+h pRLFkOvOVPLeaEnrKaVtoQbW94aLChTvkBqYD4Yv7oDxde7YPIgWawmJ2GUo/rTj 9s2LaWQwv70Km6PO0p2NDt6tynM2YxidDy70Ko0p2jrRDi7XpOGKXqbxafKC67DR 9jZSvzoDQ7v//YK+gChR =/x4V -----END PGP SIGNATURE----- --nextPart4095082.jp72hu27dh--