This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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: [PATCH v4 00/13] C99 variable length array support


> this patch series (v3) add C99 variable length support to gdb.
> 
> It allows the user to evaluate a vla like an ordinary static array e.g. print
> its elements instead of printing the pointer to the array. In addition the size
> of a vla can be retrieved with gdbs builtin sizeof operator.
> 
> 
>     1| void foo (size_t n) {
>     2|   int ary[n];
>     3|   memset(ary, 0, sizeof(ary));
>     4| }
> 
>     (gdb) print ary
>     $1 = {0 <repeats 42 times>}
> 
>     (gdb) print sizeof ary
>     $2 = 168

I haven't had time so far to say how excited I am to see this patch
series. I think this is going to be extremely useful, and not just
for C. I can see Fortran being mentioned, but I think Pascal and Ada
also will be able to benefit from it.

So Thank You!

-- 
Joel


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