From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26184 invoked by alias); 7 Jan 2013 20:38:47 -0000 Received: (qmail 26088 invoked by uid 22791); 7 Jan 2013 20:38:44 -0000 X-SWARE-Spam-Status: No, hits=-3.4 required=5.0 tests=AWL,BAYES_00,DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_SPAMHAUS_DROP,NML_ADSP_CUSTOM_MED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,TW_XF X-Spam-Check-By: sourceware.org Received: from mail-wg0-f43.google.com (HELO mail-wg0-f43.google.com) (74.125.82.43) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 07 Jan 2013 20:38:38 +0000 Received: by mail-wg0-f43.google.com with SMTP id e12so10180989wge.10 for ; Mon, 07 Jan 2013 12:38:36 -0800 (PST) X-Received: by 10.194.7.104 with SMTP id i8mr97785868wja.27.1357591115487; Mon, 07 Jan 2013 12:38:35 -0800 (PST) Received: from localhost ([2.26.203.77]) by mx.google.com with ESMTPS id gz3sm13718824wib.2.2013.01.07.12.38.33 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 07 Jan 2013 12:38:34 -0800 (PST) From: Richard Sandiford To: "Steve Ellcey " Mail-Followup-To: "Steve Ellcey " ,, rdsandiford@googlemail.com Cc: Subject: Re: [patch, mips, stabs] Do any MIPS targets use stabs? References: <99d6779b-5dee-4fac-bc73-26055eaa0857@EXCHHUB01.MIPS.com> <87ip784tyl.fsf@talisman.default> Date: Mon, 07 Jan 2013 20:38:00 -0000 In-Reply-To: <87ip784tyl.fsf@talisman.default> (Richard Sandiford's message of "Mon, 07 Jan 2013 20:30:10 +0000") Message-ID: <87a9sk4tkn.fsf@talisman.default> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2013-01/txt/msg00354.txt.bz2 Richard Sandiford writes: > "Steve Ellcey " writes: >> While testing all the variations of my mips-mti-elf target I found that >> a number of debug tests like gcc.dg/debug/trivial.c fail when compiled >> using a stabs debug flag (-gstabs3 for example) and -mips16. While running >> the GNU simulator I get: >> >> mips-core: 1 byte read to unmapped address 0xffffe820 at 0xffffffff80020278 >> program stopped with signal 10 (User defined signal 1). >> FAIL: gcc.dg/debug/trivial.c -gstabs3 -O execution test >> >> Since I don't actually care about STABS I was looking at undefining >> DBX_DEBUGGING_INFO in mips-mti-elf.h and mips-mti-linux.h which makes >> the failures a moot point for me since I would no longer run the tests >> with any -stabs flags. >> >> But I was wondering, are there any MIPS targets that do use stabs? If not >> maybe we should just remove the define of DBX_DEBUGGING_INFO from mips.h >> instead of undefing it just for my targets. Opinions? > > Do you know why selecting stabs causes an execution failure? > That shouldn't happen regardless of whether the debug info itself is good. Ah, sorry, this reminded me of a patch I'd written a year ago and never got around to sanity-checking. Does it fix the problem for you? Richard Index: gas/config/tc-mips.c =================================================================== --- gas/config/tc-mips.c 2012-01-28 14:47:10.000000000 +0000 +++ gas/config/tc-mips.c 2012-01-28 14:48:14.000000000 +0000 @@ -1476,7 +1476,9 @@ static const pseudo_typeS mips_pseudo_ta {"section", s_change_section, 0}, {"short", s_cons, 1}, {"single", s_float_cons, 'f'}, + {"stabd", s_mips_stab, 'd'}, {"stabn", s_mips_stab, 'n'}, + {"stabs", s_mips_stab, 's'}, {"text", s_change_sec, 't'}, {"word", s_cons, 2}, @@ -16817,9 +16819,7 @@ s_insn (int ignore ATTRIBUTE_UNUSED) static void s_mips_stab (int type) { - if (type == 'n') - mips_mark_labels (); - + mips_mark_labels (); s_stab (type); }