Around emacs, linux, etc.
apache及其module的调试
- gdb httpd
用gdb加载httpd进程 - (gdb) b break-point
设置断点,可以设置函数名、行数等…… - (gdb) run -X -d /usr/local/apache
执行httpd,这个是关键的,-X参数会让httpd以debug模式运行,debug模式是单进程的,这样才好调试。-d /usr/local/apache是设置运行的目录。
另外,gdb httpd pid可以attach一个正在运行的httpd来调试。
| Print article | This entry was posted by Jay Xie on 2006/04/30 at 3:03 pm, and is filed under Apache. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |