gdb调试, sig32问题

    抓内存错误时,挂gdb运行程序,总是碰到Program received signal SIG32, Real-time event 32.的问题,程序总是被挂起,

然后就需要不停的c(continue),很麻烦

    解决方法:在进入gdb之后,运行程序之前,输入handle SIG32 nostop命令,可以让程序接收到sig32信号时,不挂起

    log:


Welcome to HiLinux, using uClibc-0.9.28
# cd /mnt/
#./gdb eis
GNU gdb 6.4
Copyright 2005 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "--host=arm-uclibc-linux --target="...Using host libthread_db library "/lib/libthread_db.so.1".

(gdb) handle SIG32 nostop
Signal        Stop Print Pass to program Description
SIG32         No Yes Yes  Real-time event 32
(gdb) r
Starting program: /mnt/eis

 

 

    另外记录一下core dump的用法

    首先,文件系统必须是可写的,因为需要创建core dump文件

    在运行程序之前,输入ulimit -c unlimited命令,也可以加core dump文件的大小限制,比如ulimit -c 4096

    具体过程如下:

cd /mnt
# ulimit -c unlimited
#./eis

>>>>>>>  Built Application : at Dec 26 2008 at 21:50:15  <<<<<<<<

Segmentation fault (core dumped)
#ls
core.80   eis       gdb
# ./gdb eis core.80
GNU gdb 6.4
Copyright 2005 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "--host=arm-uclibc-linux --target="...Using host libthread_db library "/lib/libthread_db.so.1".


warning: exec file is newer than core file.
Core was generated by `./eis'.
Program terminated with signal 11, Segmentation fault.
#0  0x0020f498 in throwException (exceptionH=Cannot access memory at address 0xbebc8aac
) at frame.c:545
545 frame.c: No such file or directory.
 in frame.c
(gdb) bt
#0  0x0020f498 in throwException (exceptionH=Cannot access memory at address 0xbebc8aac
) at frame.c:545
Cannot access memory at address 0xbebc8adc
(gdb)

 

这里只能打出一行堆栈,还不清楚为什么

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值