Hello,
I was wondering if there is an option in gdb to see from a particular memory address onwards. I normally print out the values using
Code:
(gdb) p *A1
(gdb) p *(A1+1)
(gdb) p *(A1+2)
(gdb) p *(A1+3)
Is there something where I can see the contents of the next n memory locations starting from A1?
Use Case :
I define my arrays using pointers.
So I would have something like
Code:
int* A1;
A1= malloc(10 * sizeof(int));
for(i=0;i<10;i++)
*(A1 + i) = i+1;
Now I want to see the array contents using gdb.
Please advise.
Thanks.
Bookmarks