I have a 2d array matrix[10][10] that I\'d like to inspect at debug time.
I understand that I can do this in GDB using
p *matrix@10
Can you do this?:
p *((double (*)[3][3])pointerToMatrix3x3)
(double [3][3]) $6 = {
[0] = ([0] = 1821.8790830216928, [1] = 0, [2] = 1622.4513098457062)
[1] = ([0] = 0, [1] = 1172.3930433142486, [2] = 1314.4812787191868)
[2] = ([0] = 0, [1] = 0, [2] = 1)
p *((double (*)[4])pointerToVector4)
(double [3]) $7 = ([0] = 1821.8790830216928, [1] = 0, [2] = 1622.4513098457062)
It works in lldb - Haven't tried it in gdb. It seems a lot easier.