trouble using gdb debugging C/C++# Programming - 葵花宝典
l*l
1 楼
I was using gdb to debug my C/C++ code under linux. I have trouble to display
the elements of a local array. For example:
(gdb) print myArray[0]
This always gives me the address of the first element, not the value.
If the array is dynamically allocated, then there is no problem.
Thanks ahead for your help!
the elements of a local array. For example:
(gdb) print myArray[0]
This always gives me the address of the first element, not the value.
If the array is dynamically allocated, then there is no problem.
Thanks ahead for your help!