This is the mail archive of the gdb@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: Printing a 2D array in a C program


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?


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