永久配置LLDB(在Xcode 4.3.2中)不停止信号 [英] Permanently configuring LLDB (in Xcode 4.3.2) not to stop on signals

查看:129
本文介绍了永久配置LLDB(在Xcode 4.3.2中)不停止信号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使LLDB(在OS X应用程序的Xcode 4.3.2中运行)不停止某些信号.如果我输入

I'm trying to get LLDB (running in Xcode 4.3.2 with an OS X application) to not stop on certain signals. If I enter

process handle SIGUSR2 -n true -p true -s false

在调试控制台上它可以正常工作,并且LLDB不再在SIGUSR2上停止.

on the debugging console it works fine and LLDB no longer stops on SIGUSR2.

但是,如果我放

command process handle SIGUSR2 -n true -p true -s false

放入〜/.lldbinit,似乎被忽略了.此文件中的其他命令(例如别名)可以正常工作.

into ~/.lldbinit it seems to be ignored. Other commands in this file (e.g. alias) work fine.

如何使LLDB永不停止某些信号?

How can I make LLDB never stop on certain signals?

推荐答案

万一其他人有这个问题,我最终通过在NSApplicationMain()中添加一个断点来解决(对于普通C程序,main()当然会也可以).

In case anyone else ever has this question, I finally solved it by adding a breakpoint in NSApplicationMain() (for plain C programs, main() would of course work as well).

我将断点操作设置为process handle SIGUSR2 -n true -p true -s false,并启用了求值后自动继续"选项.

I set the breakpoint action to process handle SIGUSR2 -n true -p true -s false, and enabled the "Automatically continue after evaluating" option.

如果有人有更好的解决方案,我很高兴听到.

If anyone has a more elegant solution, I'd be happy to hear.

这篇关于永久配置LLDB(在Xcode 4.3.2中)不停止信号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆