gdb 调试后台程序

~/>LTP ltp02 3&
[1] 12605



ps -ef | grep ltp

603:zuzhao   12605 11854  2 03:23 pts/43   00:00:00 LTP ltp02 3


~/>gdb -pid=12605


0x0000003ca0c0b43c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
(gdb) b Refresh ---打断点
(gdb) c  ---继续执行,直到断点
Continuing.
^C   ---ctrl c,继续打新的断点
Program received signal SIGINT, Interrupt.  ---不要管这个提示,不影响
0x0000003ca0c0b43c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
(gdb) b save::sa1  打新的断点
(gdb) c   ---继续执行,直到断点
Continuing.
^C  ---ctrl c,继续打新的断点
Program received signal SIGINT, Interrupt.   ---不要管这个提示,不影响
0x0000003ca0c0b43c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0

(gdb) quit

A debugging session is active.


        Inferior 1 [process 12605] will be detached.


Quit anyway? (y or n) y
Detaching from program: LTP, process 12605





其他的调试方式:

调试过程中,如果想继续打断点,可以按ctrl c:

就是debug里面ctrlc之后可以继续打断点


ps-ef | grep QP

66:xiali      460 11518 0 01:14 pts/69   00:00:00 grep -nQP

1212:xiali    32184    1  3 01:13 pts/94   00:00:02 QPS qps22 2

/u1/xiali/data/log                                                    

:>gdb debugme 32184

附:

(gdb) c

Continuing.

^C

Program received signal SIGINT,Interrupt.

0x0000003ca08e7c53 in__epoll_wait_nocancel () from /lib64/libc.so.6

[8/17/2016 10:49:15] Rambo Zhao: 这个是不是正常的

 正常的




评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值