[转]Avoiding GDB Signal Noise.
原文:http://peeterjoot.wordpress.com/2010/07/07/avoiding-gdb-signal-noise/
A quick note for future reference (recorded elsewhere and subsequently lost).
Suppose your program handles a signal that gdb intercepts by default, like the following example
(gdb) c
Continuing. Program received signal SIGUSR1, User defined signal 1.
[Switching to Thread 47133440862528 (LWP 4833)]
0x00002ade149d6baa in semtimedop () from /lib64/libc.so.6
(gdb) c
You can hit ‘c’ to continue at this point, but if it happens repeatedly in various threads (like when one thread is calling pthread_kill() to force each other thread in turn to dump its stack and stuff) this repeated ‘c’ing can be a bit of a pain.
For the same SIGUSR1 example above, you can query the gdb handler rules like so:
(gdb) info signal SIGUSR1
Signal Stop Print Pass to program Description
SIGUSR1 Yes Yes Yes User defined signal 1
And if deemed to not be of interest, where you just want your program to continue without prompting or spamming, something like the following does the trick:
(gdb) handle SIGUSR1 noprint nostop
Signal Stop Print Pass to program Description
SIGUSR1 No No Yes User defined signal 1
[转]Avoiding GDB Signal Noise.的更多相关文章
- gdb signal 转
信号是一种软中断,是一种处理异步事件的方法.一般来说,操作系统都支持许多信号.尤其是UNIX,比较重要应用程序一般都会处理信号.UNIX定义了许 多信号,比如SIGINT表示中断字符信号,也就是Ctr ...
- 【转贴】gdb中的信号(signal)相关调试技巧
一篇不错的帖子,讲的是gdb中的信号(signal)相关调试技巧 转自Magic C++论坛 http://www.magicunix.com/index_ch.html http://www.m ...
- GDB调试器
/*this project used for gdb debug c programs*//*At first,using compile command turn out the executab ...
- [转] gdb中忽略信号处理
信号(Signals) 信号是一种软中断,是一种处理异步事件的方法.一般来说,操作系统都支持许多信号.尤其是UNIX,比较重要应用程序一般都会处理信号.UNIX定义了许 多信号,比如SIGINT表示中 ...
- gdb命令调试技巧
gdb命令调试技巧 一.信息显示1.显示gdb版本 (gdb) show version2.显示gdb版权 (gdb) show version or show warranty3.启动时不显示提示信 ...
- gdb中信号
信号(Signals) 信号是一种软中断,是一种处理异步事件的方法.一般来说,操作系统都支持许多信号.尤其是UNIX,比较重要应用程序一般都会处理信号.UNIX定义了许 多信号,比如SIGINT表示中 ...
- GDB基本命令(整合)(转)
directory:添加源文件目录 l src.cpp:line_num可进入文件 如:l src.cpp:10 回车自动重复上一命令 一.gdb调试基本知识a.调试器指示的是将要执行的代码行b.只有 ...
- GDB调试命令手册
使用GDB 启动 $ gdb program # program是你的可执行文件,一般在当前目录 $ gdb program core # gdb同时调试运行程序和cor ...
- G-FAQ – Why is Bit Depth Important?
直接抄: https://apollomapping.com/2012/August/article15.html For this month’s Geospatial Frequently Ask ...
随机推荐
- 跳水Hibernate(一)实例解说
此语一与高二接触SSH三框架,但是,当能力有限.我们没有继续下行.今天,我们正在采取的优势Java金痴迷,随即再次上调,另一项研究SSH.让我们先从SSH中间Hibernate说起. 或许你会问.为什 ...
- UVA11983 - Weird Advertisement(扫描线)
UVA11983 - Weird Advertisement(扫描线) 题目链接 题目大意:给你n个覆盖矩形,问哪些整数点是被覆盖了k次. 题目大意:这题和hdu1542是一个题型.可是这题求的是覆盖 ...
- 2014年辛星jquery解读第二节
*************jquery的语法****************** 1.jquery是通过选取HTML元素,而且对选取的元素运行某些操作,从而完毕某些特效的. 2.因此,我们在使用jQu ...
- Go as continuous delivery tool for .NET
http://simon-says-architecture.com/2014/02/28/go-as-continuous-delivery-tool-for-net/ Following my p ...
- my97 日期控件
官网:http://www.my97.net/ 好多广告啊! 文档地址: http://www.mysuc.com/test/My97DatePicker/
- Java-继承特性
继承的特点: 1.提高了代码的复用性. 2.让类与类之间发生了关系,有了这个关系,才有了多态的特性. (注意:千万不要为了获取其他类的功能,简化代码而继承:必须是类与类之间有所属关系才可以继承,所属关 ...
- exec 重定向
文件中常用的重定向: command > filename把把标准输出重定向到一个新文件中command >> filename 把把标准输出重定向到一个文件中 (追加)comman ...
- Java用ZIP格式压缩和解压缩文件
转载:java jdk实例宝典 感觉讲的非常好就转载在这保存! java.util.zip包实现了Zip格式相关的类库,使用格式zip格式压缩和解压缩文件的时候,须要导入该包. 使用zipoutput ...
- PHP 做 RSA 签名 生成订单(支付宝例子)
/组合签名 $a=time(); $b=substr($a, 1); //生成随机订单号 $orderid= $b.mt_rand(10000,99999); //合作身份者id,以2088开头的16 ...
- Yii中CDbCriteria常用总结
Yii的Active Recorder包装了很多. 特别是把SQL中 把where,order,limit,IN/not IN,like等常用短句都包含进CDbCriteria这个类中去,这样整个代码 ...