From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11548 invoked by alias); 20 Mar 2012 16:16:24 -0000 Received: (qmail 11532 invoked by uid 22791); 20 Mar 2012 16:16:17 -0000 X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL,BAYES_50,RCVD_IN_DNSWL_HI,T_RP_MATCHES_RCVD,URIBL_BLACK 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, 20 Mar 2012 16:15:57 +0000 Received: from vapier.localnet (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id EB8FD1B400D; Tue, 20 Mar 2012 16:15:56 +0000 (UTC) From: Mike Frysinger To: "Hans-Peter Nilsson" Subject: Re: Please fix regressions from your sim changes Date: Tue, 20 Mar 2012 16:16:00 -0000 User-Agent: KMail/1.13.7 (Linux/3.2.0; KDE/4.6.5; x86_64; ; ) Cc: gdb-patches@sourceware.org References: <201203200554.q2K5sRwJ007822@ignucius.se.axis.com> In-Reply-To: <201203200554.q2K5sRwJ007822@ignucius.se.axis.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart3394308.t7lgzJ0CVs"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201203201215.57048.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-03/txt/msg00743.txt.bz2 --nextPart3394308.t7lgzJ0CVs Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-length: 2733 On Tuesday 20 March 2012 01:54:27 Hans-Peter Nilsson wrote: > From: Mike Frysinger > > maybe strsignal() is crashing ? >=20 > Yes: > chimera-7:hp:/tmp/hpautotest-sim/cris-elf/sim/testsuite: > /tmp/hpautotest-sim/cris-elf/sim/cris/run addqpc.ms.x General register > read of PC is not implemented. > zsh: segmentation fault /tmp/hpautotest-sim/cris-elf/sim/cris/run > addqpc.ms.x >=20 > And in the build-log I see: > gcc -DHAVE_CONFIG_H -DWITH_DEFAULT_MODEL=3D'"crisv32"' -DPROFILE=3D1 > -DWITH_PROFILE=3D-1 -DWITH_ALIGNMENT=3DNONSTRICT_ALIGNMENT=20=20 > -DWITH_ENVIRONMENT=3DALL_ENVIRONMENT -DWITH_HW=3D0 > -DWITH_HOST_BYTE_ORDER=3DLITTLE_ENDIAN -DWITH_SCACHE=3D16384 -Wimpl= icit > -Wreturn-type -Wcomment -Wtrigraphs -Wformat -Wparentheses -Wpointer-arith > -Wuninitialized -I. -I/tmp/r/sim/cris -I../common > -I/tmp/r/sim/cris/../common -I../../include > -I/tmp/r/sim/cris/../../include -I../../bfd -I/tmp/r/sim/cris/../../bfd > -I../../opcodes -I/tmp/r/sim/cris/../../opcodes -g -O2 -c -o nrun.o -MT > nrun.o -MMD -MP -MF .deps/nrun.Tpo /tmp/r/sim/cris/../common/nrun.c > /tmp/r/sim/cris/../common/nrun.c: In function 'main': > /tmp/r/sim/cris/../common/nrun.c:206: warning: implicit declaration of > function 'strsignal' /tmp/r/sim/cris/../common/nrun.c:206: warning: format > '%s' expects type 'char *', but argument 4 has type 'int' >=20 > Don't you see that warning? the code compiles warning free for me > Are you on a ILP32 host such as i686-linux-gnu, i.e. > sizeof (char *) =3D=3D sizeof(int)? no, x86_64-pc-linux-gnu > It seems nowhere is there an include of string.h (just > pre-existing signal.h), see strerror(3). (TFM, not SIGQUIT :) > What was missing from your patch introducing the strsignal call, > is *not* the single obvious #define and #include. the mips' sim-main.h code eventually includes string.h for me. the file sh= ould=20 have a string.h include for the strsignal prototype, so i'll update that. > Instead, to #define _GNU_SOURCE in the Right Way AFAIK, there > should be an AC_GNU_SOURCE (missing) in a configure.* used by > all src/sim/* (common/configure.ac AFAICT), and an #include > "cconfig.h" in nrun.c followed later by the mantra: not entirely the right way. my guess is that your older glibc does not=20 conform to the newer POSIX spec. strsignal() was added in the 2008 spec, b= ut=20 old glibc's provided it only when _GNU_SOURCE was defined. > And right, it's time to add -Wall -Werror to the sim compilation > options... i posted a patch to improve that plumbing already. however, -Werror won't = be=20 enabled by default because all the sim code and ports have problems, and ev= en=20 if it was, it'd still pass on my side. -mike --nextPart3394308.t7lgzJ0CVs 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) iQIcBAABAgAGBQJPaK08AAoJEEFjO5/oN/WB9FQP/j0uy4WXBze5NfiJQ3q8RwiU 3v7DnBPV/8D/nnqUMDukNRVBG6J9PtK3hu4NVi3CJXoAuB4+VEAp1QDyqkASb0HV PK3JwroAI2PPLkAFuXUcu1bIndzOR8xh9a+jKNpppeJa2ADuRVVj2M3EbCRQ8z5S b3cCPL0l9EFsymkeNnTi28xNYUBTeWG3XbQqoQxudRbhyU7ANOXNQ0YfQIKMEnuU UsgkBHAWV/V4KUKPfkiISZmY90VM/dHmPspzg2SzzoWGtqg9BP96nWJBhTs7X0Qr R2B9Y4mzcSXPbVBQOjJNS5LImDp3Im1r/ngQTr4VvUeXsitT7fXF1PWlBo8UJ5Je QLhSPNFuMNj69y8mAQ+HOg+y18/IOJ9iyE73I2UjsTtqiBI8nD2iqyaVJ/3cy098 IJytAzrK/U1x7JUgJFp/eSBa6bJq8vOkTsxdsXhFvgqzjAjZ/49dKiU688yjx/HO XkQu+g5EV/GxgncNLS6bF8CiWt3zYdnB+eyY2GDAUg325r3YK78kg0mWeypGv+ye dPIIek+OuNEoG019oiVfML+rYrcs3Yr5Dn88Z+8vpKAPPxTg6ssOww2YYdEXKAtd r1KJfegmmRspuq5VRHIh+AI+z3d7dllZfO95tfLqvJeIZPWcV55OvUgCV2vcOVBW Db65b0brmjPYf3zNJFLD =WqcN -----END PGP SIGNATURE----- --nextPart3394308.t7lgzJ0CVs--