From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16843 invoked by alias); 20 Mar 2012 05:55:00 -0000 Received: (qmail 16834 invoked by uid 22791); 20 Mar 2012 05:54:58 -0000 X-SWARE-Spam-Status: No, hits=0.0 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD,URIBL_BLACK X-Spam-Check-By: sourceware.org Received: from ra.se.axis.com (HELO ra.se.axis.com) (195.60.68.13) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 20 Mar 2012 05:54:33 +0000 Received: from localhost (localhost [127.0.0.1]) by ra.se.axis.com (Postfix) with ESMTP id D958E1672CD; Tue, 20 Mar 2012 06:54:28 +0100 (CET) Received: from ra.se.axis.com ([127.0.0.1]) by localhost (ra.se.axis.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id jgICWV+hvtin; Tue, 20 Mar 2012 06:54:28 +0100 (CET) Received: from thoth.se.axis.com (thoth.se.axis.com [10.0.2.173]) by ra.se.axis.com (Postfix) with ESMTP id 690CC1672C2; Tue, 20 Mar 2012 06:54:28 +0100 (CET) Received: from ignucius.se.axis.com (ignucius.se.axis.com [10.88.21.50]) by thoth.se.axis.com (Postfix) with ESMTP id 299EB3406D; Tue, 20 Mar 2012 06:54:28 +0100 (CET) Received: from ignucius.se.axis.com (localhost [127.0.0.1]) by ignucius.se.axis.com (8.12.8p1/8.12.8/Debian-2woody1) with ESMTP id q2K5sSF6007826; Tue, 20 Mar 2012 06:54:28 +0100 Received: (from hp@localhost) by ignucius.se.axis.com (8.12.8p1/8.12.8/Debian-2woody1) id q2K5sRwJ007822; Tue, 20 Mar 2012 06:54:27 +0100 Date: Tue, 20 Mar 2012 05:55:00 -0000 Message-Id: <201203200554.q2K5sRwJ007822@ignucius.se.axis.com> From: Hans-Peter Nilsson To: vapier@gentoo.org CC: gdb-patches@sourceware.org In-reply-to: <201203192230.21867.vapier@gentoo.org> (message from Mike Frysinger on Tue, 20 Mar 2012 03:30:20 +0100) Subject: Re: Please fix regressions from your sim changes MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=iso-8859-1 Content-Transfer-Encoding: 8BIT 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/msg00735.txt.bz2 > From: Mike Frysinger > Date: Tue, 20 Mar 2012 03:30:20 +0100 > you can see the commit in question clearly doesn't remove the msg: > --- a/sim/common/nrun.c > +++ b/sim/common/nrun.c > - fprintf (stderr, "program stopped with signal %d.\n", sigrc); > + fprintf (stderr, "program stopped with signal %d (%s).\n", sigrc, > + strsignal (sigrc)); When paying attention, I see nrun.c:1.16 is missing an #include to declare it. See below. > maybe strsignal() is crashing ? 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 And in the build-log I see: gcc -DHAVE_CONFIG_H -DWITH_DEFAULT_MODEL='"crisv32"' -DPROFILE=1 -DWITH_PROFILE=-1 -DWITH_ALIGNMENT=NONSTRICT_ALIGNMENT -DWITH_ENVIRONMENT=ALL_ENVIRONMENT -DWITH_HW=0 -DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN -DWITH_SCACHE=16384 -Wimplicit -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' Don't you see that warning? Are you on a ILP32 host such as i686-linux-gnu, i.e. sizeof (char *) == sizeof(int)? 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. 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: #ifdef HAVE_STRING_H #include #else #ifdef HAVE_STRINGS_H #include #endif #endif Or shorter, see run.c for how nrun.c needs to be. And right, it's time to add -Wall -Werror to the sim compilation options... BTW, your testsuite fixes are both approved and obvious. brgds, H-P