How to view a pointer like an array in GDB?
*(T (*)[N])p
where T is the type, N is the number of elements and p is the pointer.
Use the x
command.
(gdb) x/100w a
See here. In short you should do:
p *array@len
*(T (*)[N])p
where T is the type, N is the number of elements and p is the pointer.
Use the x
command.
(gdb) x/100w a
See here. In short you should do:
p *array@len