c++ - Matrix of pointers in gdb -


in gdb, how print *m[0][0], m 2d array? (suggest solution other writing code print , call gdb)

int *array = (int *) malloc (len * sizeof (int)); 

you can print contents of array with

p *array@len 

or can check link more tricks

http://wagiaalla.com/2011/01/20/gdb-tricks-printing-arrays/


Comments