This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ping: [gcc patch] libcc1: '@' GDB array operator


>> I did not realize that myself before.  I do not think there is an
>> easy fix for the GCC patch, is it?

It seems like a VLA would work.

Jeff> 99% of the time I've used a constant with the @ syntax in gdb.

I use a non-constant argument to @ quite a bit.

It's common to have something like the struct hack where the length of
the array is stored in the struct.  Then when scripting gdb one can
write:

    print s.array[0] @ s.length

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]