From 9bc66883beaa5501c78aa13f4411fba1952b1ee0 Mon Sep 17 00:00:00 2001 From: "j.fu" Date: Thu, 30 May 2024 20:28:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tutorial/README.adoc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tutorial/README.adoc b/tutorial/README.adoc index 8674979..bf2c5ec 100644 --- a/tutorial/README.adoc +++ b/tutorial/README.adoc @@ -87,9 +87,9 @@ image::./imgs/nginx-src-structure.png[Nginx源码结构] # -O0 -DNDEBUG 允许compiler debugging # --with-debug 开启nginx debugging # -fexec-charset=GBK 允许nginx输出中文 - ./configure --with-cc-opt="-O0 -DNDEBUG -fexec-charset=GBK -g3 -gdwarf-2" --with-debug --prefix=/opt/nginx --with-http_ssl_module --add-module=/workspaces/cpp-5/nginx_upstream_check_module + ./configure --with-cc-opt="-O0 -DNDEBUG -fexec-charset=GBK -g3 -gdwarf-2 -fsanitize=address -DNGX_DEBUG_PALLOC=1" --with-debug --prefix=/opt/nginx --with-http_ssl_module --add-module=/workspaces/cpp-5/nginx_upstream_check_module ---- -其中,+++--prefix+++表示nginx安装目录;+++--with-debug+++允许nginx打开debug模式,并与+++-O0 -g3 -DNDEBUG -gdwarf-2+++配合,避免由于编译优化导致部分调试信息丢失;+++--add-module+++指定开源模块的源码路径。 +其中,+++--prefix+++表示nginx安装目录;+++--with-debug+++允许nginx打开debug模式,并与+++-O0 -g3 -DNDEBUG -gdwarf-2+++配合,避免由于编译优化导致部分调试信息丢失;+++--add-module+++指定开源模块的源码路径。 +++-fsanitize=address -DNGX_DEBUG_PALLOC=1+++将屏蔽nginx memory pool,并允许内存debug 使用以下命令执行脚本: [source,shell] @@ -141,12 +141,12 @@ image::./imgs/debug-nginx.png[调试nginx] 参考: -1. 负载均衡:link:https://www.nginx.org.cn/article/detail/440[] -2. 高可用配置:link:https://blog.csdn.net/IT_10/article/details/89365436[] -3. nginx开发:link:https://tengine.taobao.org/book/[] -4. nginx开发入门:link:https://www.nginx.org.cn/article/detail/443[] -5. nginx中文文档:link:https://wizardforcel.gitbooks.io/nginx-doc/content/index.html[] -6. nginx开发:link:https://www.kancloud.cn/kancloud/master-nginx-develop/51798[] +1. 负载均衡解释:link:https://www.nginx.org.cn/article/detail/440[] +2. 高可用配置示例:link:https://blog.csdn.net/IT_10/article/details/89365436[] +3. nginx开发参考1:link:https://tengine.taobao.org/book/[] +4. nginx开发参考2:link:https://www.nginx.org.cn/article/detail/443[] +5. nginx中文配置手册:link:https://wizardforcel.gitbooks.io/nginx-doc/content/index.html[] +6. nginx开发参考3:link:https://www.kancloud.cn/kancloud/master-nginx-develop/51798[] == 四. 开发流程