[rfc] display vector types using vector_size syntax

Stan Shebs stanshebs@earthlink.net
Tue Sep 11 22:07:00 GMT 2012


On 9/11/12 2:09 AM, Andrew Burgess wrote:
> On 10/09/2012 11:06 PM, Joel Brobecker wrote:
>>> Andrew> I'd like to change the behaviour to this:
>>> Andrew> (gdb) ptype vector
>>> Andrew> type = char ((vector_size(4)))
>>> Andrew> (gdb) whatis vector
>>> Andrew> type = char ((vector_size(4)))
>>>
>>> Seems reasonable to me.
>>
>> Just a thought: How about
>>
>>      type = char __attribute__ ((vector_size(4)))
>>
>> ?
>>
>> It know it's a lot more verbose, but the later speaks a lot more
>> to me than the original proposal...
>
> I only dropped this to avoid clutter, but I don't really mind either way.
>
> I'll give it a couple more days for people to reply, then commit a 
> version with "__attibute__".

I vote for __attribute__ too.  Although more cluttered, it immediately 
says "GCC extensions are hanging about" while the vector_size by itself 
looks like it could be one of the app's symbols that somehow found its 
way into the type (and users will no doubt assume that it's a GDB bug :-) ).

Stan
stan@codesourcery.com



More information about the Gdb-patches mailing list