天天看點

gdb調試

1.g++ test_search.cpp -o test_search.o -g

2.gdb ./test_search.o

3.l:看代碼

b 12:設定斷點在第12行

p var: 看變量

n:單步執行

r: run

c: continue