1,调试带参app
gdb --args ./app arg1 arg2 ...
2,打印vector
1) 打印整个vector
(gdb) print *(myVector._M_impl._M_start)@myVector.size()
2) 打印前N个成员 (注意是前n个不是第n个)
print *(myVector._M_impl._M_start)@N
gdb --args ./app arg1 arg2 ...
(gdb) print *(myVector._M_impl._M_start)@myVector.size()
print *(myVector._M_impl._M_start)@N