免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1812 | 回复: 2

请问有高手在debain/ubuntu调试apache的经验吗? [复制链接]

论坛徽章:
0
发表于 2012-07-16 21:48 |显示全部楼层
root@debian:/tmp# gdb apache2
GNU gdb (GDB) 7.0.1-debian
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...

warning: The current binary is a PIE (Position Independent Executable), which
GDB does NOT currently support.  Most debugger features will fail if used
in this session.

Reading symbols from /usr/sbin/apache2...done.
(gdb) b ap_process_request
Breakpoint 1 at 0x50374: file /home/tarside/source/apache2-2.2.16/apache2-2.2.16/modules/http/http_request.c, line 276.
(gdb) b main
Breakpoint 2 at 0x22aee: file /home/tarside/source/apache2-2.2.16/apache2-2.2.16/server/main.c, line 452.
(gdb) set args -X
(gdb) run
Starting program: /usr/sbin/apache2 -X
Warning:
Cannot insert breakpoint 1.
Error accessing memory address 0x50362: Input/output error.
Cannot insert breakpoint 2.
Error accessing memory address 0x22ad9: Input/output error.
(gdb)

论坛徽章:
2
CU大牛徽章
日期:2013-04-17 11:46:28CU大牛徽章
日期:2013-04-17 11:46:39
发表于 2012-07-17 00:29 |显示全部楼层
应该跟 gdb 调试其他的程序一样吧

论坛徽章:
1
2015年辞旧岁徽章
日期:2015-03-03 16:54:15
发表于 2012-07-17 01:17 |显示全部楼层
本帖最后由 flw 于 2012-07-17 01:18 编辑

为啥要调试?
打日志应该可以吧。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP