This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v4 00/13] C99 variable length array support
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Sanimir Agovic <sanimir dot agovic at intel dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 18 Dec 2013 07:01:35 +0400
- Subject: Re: [PATCH v4 00/13] C99 variable length array support
- Authentication-results: sourceware.org; auth=none
- References: <1387282678-3847-1-git-send-email-sanimir dot agovic at intel dot com>
> 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