This change adds a utility that uses the kill -l command to get the
correct signal number. Falls back to using SBUnixSignals, and finally
signal.SIG<signal> if all else fails.
Details
- Reviewers
ovyalov clayborg tberghammer - Commits
- rGf59d050968b9: Added utility function to get correct signal number from remote platform.
rLLDB238850: Added utility function to get correct signal number from remote platform.
rL238850: Added utility function to get correct signal number from remote platform.
Diff Detail
Event Timeline
test/lldbutil.py | ||
---|---|---|
934 | I want to use getattr(signal, signal_name) as a fallback if kill -l can't find anything. Actually, it'd be better if we can check for a valid remote process first and try getting a signal value from that before falling back to getattr. |
test/lldbutil.py | ||
---|---|---|
934 | Yep - fallback to process instance if presented is a good option - e.g., in this case remote test invocation Linux->OSX should pass well. |
test/lldbutil.py | ||
---|---|---|
956 | target.GetProcess() ? |
Nit: to avoid nesting - if not lldb.remote_platform return getattr(signal, signal_name)