[转]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 ...
随机推荐
- android控制文件:ViewPager+Fragment+GridView使用(与AndroidQuery框架结合)
最近我看到一个AndroidQuery该框架.里面Demo,有一个屏幕,让博主喜欢.很顺利的左右滑动,感觉非常好,所以拿来和大家分享一下.看看结果图.: 从图中能够看出.上面的布局是一个Layout里 ...
- C#-TextBox-登录表单password无形---ShinePans
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; usin ...
- JAVA 长整型转换为IP地址的方法
JAVA 长整型转换为IP地址的方法 代码例如以下: /** * 整型解析为IP地址 * @param num * @return */ public static String int2iP(Lon ...
- curl 简单使用
cURL -- Command Line URL viewer -u username:password 以 Basic 方式发送用户名和密码 -d 以 POST 方式发送数据 -X 支持其它动词, ...
- Swift入门教程:基本语法(一)
简介: 什么是S ...
- WPF中的CheckBox的_ (underscore / 下划线)丢失
今天在项目中遇到check box的Content的内容缺少'_', 原因是WPF的ContentPresenter默认会把'_'作为加速键的转义字符. 比方CheckBox的content为&qu ...
- checkbox属性checked="checked"但状态不是勾选状态的解决办法
原因: jQuery API明确说明,1.6+的jQuery要用prop,不能用attr否则无效,尤其是checkBox的checked的属性的判断.
- ASP.NET MVC中对Model进行分步验证的解决方法
原文:ASP.NET MVC中对Model进行分步验证的解决方法 在我之前的文章:ASP.NET MVC2.0结合WF4.0实现用户多步注册流程中将一个用户的注册分成了四步,而这四个步骤都是在完善一个 ...
- C语言库函数大全及应用实例十
原文:C语言库函数大全及应用实例十 [编程资料]C语言库函数大全及应用实例十 函数名: qsort 功 能: 使 ...
- JAVA 代码生成。SimpleCaptcha
去官方网站下载Jar包: http://simplecaptcha.sourceforge.net/ Javadocs: http://simplecaptcha.sourceforge.net/ja ...