博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
[转]Avoiding GDB Signal Noise.
阅读量:4974 次
发布时间:2019-06-12

本文共 1288 字,大约阅读时间需要 4 分钟。

原文: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) cContinuing.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 SIGUSR1Signal        Stop      Print   Pass to program DescriptionSIGUSR1       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 nostopSignal        Stop      Print   Pass to program DescriptionSIGUSR1       No        No      Yes             User defined signal 1

  

转载于:https://www.cnblogs.com/Proteas/p/3879677.html

你可能感兴趣的文章
SQL语言之概述(一)
查看>>
软件建模——第9章 毕业论文管理系统—面向对象方法
查看>>
[SDOI2008]洞穴勘测
查看>>
Difference between Linearizability and Serializability
查看>>
IDEA使用操作文档
查看>>
UIView
查看>>
添加日期选择控件
查看>>
bzoj4765: 普通计算姬 (分块 && BIT)
查看>>
看完漫画秒懂区块链
查看>>
Oracle命令类别
查看>>
stc12c5a60s2驱动TEA5767收音机模块硬件调试总结
查看>>
vue中提示$index is not defined
查看>>
css选择器
查看>>
ASP.NET上传下载文件
查看>>
Galaxy Nexus 全屏显示-隐藏Navigation Bar
查看>>
Spring中使用Velocity模板
查看>>
上周热点回顾(8.18-8.24)
查看>>
Feature toggle
查看>>
day02
查看>>
gvim 配置Pydiction
查看>>