Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
572 views
in Technique[技术] by (71.8m points)

macos - Permanently configuring LLDB (in Xcode 4.3.2) not to stop on signals

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

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

However, if I put

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

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

How can I make LLDB never stop on certain signals?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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).

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

Xcode 4 Breakpoint Screenshot

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...