Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Devang Patel <dpatel@apple.com>
To: Daniel Jacobowitz <drow@false.org>
Cc: Geoff Keating <geoffk@geoffk.org>,
	gcc-patches@gcc.gnu.org, gdb@sources.redhat.com
Subject: Re: [PATCH] Debugging Vector Types
Date: Mon, 25 Apr 2005 02:19:00 -0000	[thread overview]
Message-ID: <B6EA81E5-C09E-4F73-BDD5-2EAC70538DF5@apple.com> (raw)
In-Reply-To: <20050424223525.GC14252@nevyn.them.org>

[-- Attachment #1: Type: text/plain, Size: 784 bytes --]


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


[-- Attachment #2: stabs_vector.take2.diff --]
[-- Type: application/octet-stream, Size: 2499 bytes --]

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

[-- Attachment #3: Type: text/plain, Size: 1 bytes --]



      reply	other threads:[~2005-04-25  2:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <547BC9E3-4C03-4724-8BB5-BB1A99BB3625@apple.com>
2005-04-23  0:13 ` Geoffrey Keating
2005-04-23  0:36   ` Devang Patel
2005-04-23  0:51     ` Geoff Keating
2005-04-24 22:35       ` Daniel Jacobowitz
2005-04-25  2:19         ` Devang Patel [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=B6EA81E5-C09E-4F73-BDD5-2EAC70538DF5@apple.com \
    --to=dpatel@apple.com \
    --cc=drow@false.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gdb@sources.redhat.com \
    --cc=geoffk@geoffk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox