Now, I have no time to explain these commands. For more information, please google.
1.break WHERE if COND
2.
command
3.
gdb --args
4.The
x
command
format: x/FAT ADDRESS
5.The @ symbol
You have an array, say, a[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}.
But you just wanna see 5 elements in gdb environment.Use command:
<command>p *a@5</command>