From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15133 invoked by alias); 28 Dec 2010 02:04:27 -0000 Received: (qmail 15026 invoked by uid 22791); 28 Dec 2010 02:04:26 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,T_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; Tue, 28 Dec 2010 02:04:22 +0000 Received: from vapier.localnet (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 6CEB41B4055; Tue, 28 Dec 2010 02:04:20 +0000 (UTC) From: Mike Frysinger To: "Frank Ch. Eigler" Subject: Re: [PATCH] sim: nrun: decode signal when crashing Date: Tue, 28 Dec 2010 04:43:00 -0000 User-Agent: KMail/1.13.5 (Linux/2.6.37-rc5; KDE/4.5.2; x86_64; ; ) Cc: gdb-patches@sourceware.org References: <1289875764-16066-1-git-send-email-vapier@gentoo.org> In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1338887.9UntBJYxro"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201012272104.01777.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: 2010-12/txt/msg00477.txt.bz2 --nextPart1338887.9UntBJYxro Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-length: 942 On Tuesday, November 16, 2010 11:10:43 Frank Ch. Eigler wrote: > vapier wrote: > > [...] > >=20 > > if (sigrc !=3D 0) > >=20 > > - fprintf (stderr, "program stopped with signal %d.\n", sigrc); > > + fprintf (stderr, "program stopped with signal %d (%s).\n", sigrc, > > + strsignal (sigrc)); > >=20 > > break; >=20 > I don't know if we can assume that the target signal numbering matches > the host. Else I suspect we wouldn't have all those TARGET_SIGNAL_* > defs. looking through the code, it seems nrun.c already assumes this. i cant fin= d=20 any logic that utilizes the signal_map member of the callback structure. sim-reason.c:sim_stop_reason() sets sigrc to the target signal based on the= =20 sim signal (uses sim_signal_to_target()). nrun.c:main() then compares that= =20 sigrc directly to the result of sim_signal_to_host(). so i think this patch is OK considering the existing state of things ... -mike --nextPart1338887.9UntBJYxro 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.16 (GNU/Linux) iQIcBAABAgAGBQJNGUWRAAoJEEFjO5/oN/WBEM4QAMvRbT9BiaSaCA4+i5Y6BKtu kFqDB63Ng/xjrcYetoLr1qski0W2ZpA64ZPslPR4BeXhFVSqIjj5RYf4x9NREOH5 0BpiG6QQXUpW3aXT3J7u1tZA/68LRv/ZPCSYeT5XFBdSAcKa4R8zvRwUOS6h/NTc pttWdJsEyhr/d4Hjhw8eu/irKvNbVTelFEI8V8PrE57E6QoMRxE+EClm5PYXzEap J1uqUatVZ1hVGsT+sDe7YYcrT4XuHgqngk01mNReSr1U4Hu8n+3HmJAd1hPud9v0 0ZFLbIcrQm/bh4n5yE1n17+vuRUzLZIOj4ftegp4Q2q1S6rS6FRnS7FKQVSHPaVp Wwkn746gRU1HN4dTy5BpaYwzxEDiQdH+OFlPHY6hYAuiM9AzpjnKcO9IK+aMq1PJ o+XjCrMD5ZpNsqNz7GYSmOK8zG6YfOqiFksJPE1eLhY83J3CM1X/JSEzLYchkzDU u5uIAW4SmKQ00mGzf7Agndq/wIqRaRP/dywtOwkL/bwGGDtf2OeJdeyugh9G759b XNY05WBIUpXhtzVoloIsWjLDgjKVNrNH0b+Cs/wIf9zxLxM/KkWFT+hFRsg/mAZP 8zYZWB6Ysph3OODQaEKOhi7PxqDy8HJ651kPC0UM0JeSpEZd4DRkFmzGG12D4TU2 oz/MhRlqN5kiUH0yF4OL =xJfp -----END PGP SIGNATURE----- --nextPart1338887.9UntBJYxro--