This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Printing a 2D array in a C program
- From: Neven Sajko <nsajko at gmail dot com>
- To: Andreas Schwab <schwab at linux-m68k dot org>
- Cc: Jan Kratochvil <jan dot kratochvil at redhat dot com>, gdb at sourceware dot org
- Date: Fri, 4 Mar 2016 22:48:05 +0100
- Subject: Re: Printing a 2D array in a C program
- Authentication-results: sourceware.org; auth=none
- References: <CAL+bK4NidroyapZhGvtVVsiCbu4=Hz56mF4_oU3iXM-rvqY_xw at mail dot gmail dot com> <20160304144231 dot GA7767 at host1 dot jankratochvil dot net> <CAL+bK4MV9ZLkon2PONYRpF0506P8zE3=Ukm0F1zpVDHd2HpAtw at mail dot gmail dot com> <87k2lim6rg dot fsf at linux-m68k dot org>
On 4 March 2016 at 19:34, Andreas Schwab <schwab@linux-m68k.org> wrote:
> This is correct, *m has the type int[sz]. If you want to print all
> elements pointed to by m you need to use `print *m@sz'.
>
> Andreas.
>
> --
> Andreas Schwab, schwab@linux-m68k.org
> GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
> "And now for something completely different."
Thank you :)
But it seems `print *m@(int)sz' is needed because enum aren't integral types?