Page MenuHomePhabricator

Add API control of the signal disposition.
ClosedPublic

Authored by eatnumber1 on Jun 19 2014, 1:56 PM.

Details

Reviewers
tfiala
Summary

This commit allows you to control the signals that lldb will suppress, stop or forward using the Python and C++ APIs.

Diff Detail

Event Timeline

eatnumber1 updated this revision to Diff 10658.Jun 19 2014, 1:56 PM
eatnumber1 retitled this revision from to Add API control of the signal disposition..
eatnumber1 updated this object.
eatnumber1 edited the test plan for this revision. (Show Details)
eatnumber1 added a reviewer: tfiala.
tfiala edited edge metadata.Jun 23 2014, 12:02 PM

Look good, I'm testing it locally now against a few different build systems.

tfiala added a subscriber: Unknown Object (MLST).Jun 23 2014, 12:34 PM
tfiala accepted this revision.Jun 23 2014, 12:36 PM
tfiala edited edge metadata.

I've tested it on Ubuntu 12.04 cmake/ninja, and (with adjustments to build file) MacOSX 10.9.3/Xcode 6 beta.

Linux x86_64 local test suite is running complete and passing.
New test is running on MacOSX without error.

This revision is now accepted and ready to land.Jun 23 2014, 12:36 PM
tfiala closed this revision.Jun 23 2014, 12:39 PM

svn commit
Sending include/lldb/API/SBDefines.h
Sending include/lldb/API/SBProcess.h
Adding include/lldb/API/SBUnixSignals.h
Sending include/lldb/lldb-defines.h
Sending include/lldb/lldb-forward.h
Sending lldb.xcodeproj/project.pbxproj
Sending scripts/Python/build-swig-Python.sh
Sending scripts/Python/interface/SBProcess.i
Sending scripts/lldb.swig
Sending source/API/CMakeLists.txt
Sending source/API/SBProcess.cpp
Adding source/API/SBUnixSignals.cpp
Transmitting file data ............
Committed revision 211526.

Argh, missed adding new files from change list. Foiled by rsync masking the issue. Update with unchecked in new files coming momentarily...

Adding test/python_api/signals
Adding test/python_api/signals/Makefile
Adding test/python_api/signals/TestSignalsAPI.py
Adding test/python_api/signals/main.cpp
Transmitting file data ...
Committed revision 211535.

That's the test methods that were missing. Ed Maste caught the .i file before I got to it.

Sorry, by "this file" I mean SBUnixSignals.cpp

This breaks the windows build. The name of this file suggests that it's
platform specific, but none of the code in particular that it's using is
actually platform specific. Should this file be compiled on Windows or not?

It should be just as platform dependant as the UnixSignals object it relies
on. I didn't originally write it with windows in mind.

What's standard procedure here? Rollback? Or fix forward?

Without looking at the code, how does Windows deal with the UnixSignals
object? Is it just not built?

Thanks. It looks like UnixSignals.cpp is compiled on Windows, therefore
this should too. For whatever reason, the list of files to compile for the
API are maintained in a different CMake location on Windows than on
non-Windows. So when adding a file to API, you need to add it in two
places. Don't revert, I'll just check in a fix that compiles on Windows.
Already tested it locally, just wanted to confirm your intent first.