NGINX 를 GDB 로 디 버 깅 하 다

474 단어 makefile
우선 configure 에 인자 -- with - debug 를 추가 합 니 다.
그리고 cd obj, Makefile 수정, CFLAGS 정의 = -pipe  -g -O0 -fno-inline -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror。
마지막 으로 make & & sudo make install.
/ usr / local / nginx (또는 다른 사용자 정의 디 렉 터 리) 에 들 어가 conf / nginx. conf 를 수정 하고 세 줄 을 추가 합 니 다.
master_process	off;
daemon	off;

error_log  logs/error.log debug;

gdb 디 버 깅 시작: sudo gdb sbin / nginx.
Enjoy it!

좋은 웹페이지 즐겨찾기