1、指定程序运行的参数
gdb --args ./client_test vocab.txt vip.txt v1_vec 1 1 2
2、断点
b genvec.cpp:262
3、运行!!
r
(居然会忘了运行这一步。。。。。)
4、打印vector的值
(gdb) p *(ids._M_impl._M_start)@200
$11 = {101, 102, 0 <repeats 100 times>, 5.89946653e-43, 0 <repeats 97 times>}
(gdb) p *(segments._M_impl._M_start)@200
$12 = {0 <repeats 102 times>, 1.77439418e-40, 0 <repeats 97 times>}