From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18945 invoked by alias); 25 Apr 2005 02:19:32 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 18439 invoked from network); 25 Apr 2005 02:19:27 -0000 Received: from unknown (HELO mail-out4.apple.com) (17.254.13.23) by sourceware.org with SMTP; 25 Apr 2005 02:19:27 -0000 Received: from mailgate2.apple.com (a17-128-100-204.apple.com [17.128.100.204]) by mail-out4.apple.com (8.12.11/8.12.11) with ESMTP id j3P2JQPT024015 for ; Sun, 24 Apr 2005 19:19:26 -0700 (PDT) Received: from relay3.apple.com (relay3.apple.com) by mailgate2.apple.com (Content Technologies SMTPRS 4.3.17) with ESMTP id ; Sun, 24 Apr 2005 19:19:26 -0700 Received: from [17.219.194.10] (vpn-scv-x3-10.apple.com [17.219.194.10]) by relay3.apple.com (8.12.11/8.12.11) with ESMTP id j3P2JNKh025371 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT); Sun, 24 Apr 2005 19:19:24 -0700 (PDT) In-Reply-To: <20050424223525.GC14252@nevyn.them.org> References: <547BC9E3-4C03-4724-8BB5-BB1A99BB3625@apple.com> <80A2E563-8EAA-4D8D-879F-DB3A9A13B238@apple.com> <35a0df544b47a6da6983eb48f9dfcba2@geoffk.org> <20050424223525.GC14252@nevyn.them.org> Mime-Version: 1.0 (Apple Message framework v721) Content-Type: multipart/mixed; boundary=Apple-Mail-2-796894472 Message-Id: Cc: Geoff Keating , gcc-patches@gcc.gnu.org, gdb@sources.redhat.com From: Devang Patel Subject: Re: [PATCH] Debugging Vector Types Date: Mon, 25 Apr 2005 02:19:00 -0000 To: Daniel Jacobowitz X-SW-Source: 2005-04/txt/msg00169.txt.bz2 --Apple-Mail-2-796894472 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Content-length: 784 On Apr 24, 2005, at 3:35 PM, Daniel Jacobowitz wrote: > On Fri, Apr 22, 2005 at 05:52:14PM -0700, Geoff Keating wrote: >> I don't think there's any reason to (but if anyone else does, >> speak up!) > > I agree; please don't make this Darwin-specific. > >>>> - You need to update stabs.texi, which I think lives in GDB. (It's >>>> the only stabs documentation we have, so keeping it up-to-date is >>>> important!) >>> >>> The doc version I have already lists it as an extension. >> >> Excellent, then there's no need for any changes there. > > Yes, in fact GDB already accepts this attribute for stabs. OK. I'll check-in this smaller patch tomorrow. * dbxout.c (dbxout_type): Emit attribute vector. * gcc.dg/stabs-attrib-vect-darwin.c: New test. - Devang --Apple-Mail-2-796894472 Content-Transfer-Encoding: 7bit Content-Type: application/octet-stream; x-unix-mode=0644; name="stabs_vector.take2.diff" Content-Disposition: attachment; filename=stabs_vector.take2.diff Content-length: 2499 Index: dbxout.c =================================================================== RCS file: /cvs/gcc/gcc/gcc/dbxout.c,v retrieving revision 1.227 diff -Idpatel.pbxuser -c -3 -p -r1.227 dbxout.c *** dbxout.c 12 Apr 2005 20:39:04 -0000 1.227 --- dbxout.c 25 Apr 2005 02:11:19 -0000 *************** dbxout_type (tree type, int full) *** 1652,1662 **** tree tem; tree main_variant; static int anonymous_type_number = 0; if (TREE_CODE (type) == VECTOR_TYPE) ! /* The frontend feeds us a representation for the vector as a struct ! containing an array. Pull out the array type. */ ! type = TREE_TYPE (TYPE_FIELDS (TYPE_DEBUG_REPRESENTATION_TYPE (type))); /* If there was an input error and we don't really have a type, avoid crashing and write something that is at least valid --- 1652,1666 ---- tree tem; tree main_variant; static int anonymous_type_number = 0; + bool vector_type = false; if (TREE_CODE (type) == VECTOR_TYPE) ! { ! /* The frontend feeds us a representation for the vector as a struct ! containing an array. Pull out the array type. */ ! type = TREE_TYPE (TYPE_FIELDS (TYPE_DEBUG_REPRESENTATION_TYPE (type))); ! vector_type = true; ! } /* If there was an input error and we don't really have a type, avoid crashing and write something that is at least valid *************** dbxout_type (tree type, int full) *** 1991,1996 **** --- 1995,2006 ---- break; } + if (vector_type) + { + have_used_extensions = 1; + stabstr_S ("@V;"); + } + /* Output "a" followed by a range type definition for the index type of the array followed by a reference to the target-type. Index: testsuite/gcc.dg/stabs-attrib-vect-darwin.c =================================================================== RCS file: testsuite/gcc.dg/stabs-attrib-vect-darwin.c diff -N testsuite/gcc.dg/stabs-attrib-vect-darwin.c *** /dev/null 1 Jan 1970 00:00:00 -0000 --- testsuite/gcc.dg/stabs-attrib-vect-darwin.c 25 Apr 2005 02:11:21 -0000 *************** *** 0 **** --- 1,11 ---- + /* Test Attribute Vector associated with vectory type stabs. */ + /* { dg-do compile { target powerpc*-*-darwin* } } */ + /* { dg-options "-gstabs -fno-eliminate-unused-debug-types -faltivec" } */ + + int main () + { + vector int vi = { 6,7,8,9 }; + return 0; + } + + /* { dg-final { scan-assembler ".stabs.*vi\:\\(0,16\\)=\@V" } } */ Index: testsuite/gcc.dg/stabs-attrib-vect.c --Apple-Mail-2-796894472 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed Content-length: 1 --Apple-Mail-2-796894472--