Page MenuHomePhabricator

Consolidate UnixSignals setting/getting in Process.

Authored by tfiala on Aug 28 2014, 12:53 PM.



This change does the following:

  • eliminates the Process::GetUnixSignals() virtual method and replaces with a fixed getter.
  • replaces the Process UnixSignals storage with a shared pointer.
  • guarantees that Process::GetUnixSignals() can always return a UnixSignals reference.
  • adds a Process constructor variant that can be passed the UnixSignalsSP. When the constructor without the UnixSignalsSP is specified, the Host's default UnixSignals is used.
  • adds a host-specific version of GetUnixSignals() that is used when we need the host's appropriate UnixSignals variant.
  • replaces GetUnixSignals() overrides in PlatformElfCore, ProcessGDBRemote, ProcessFreeBSD and ProcessLinux with code that appropriately sets the Process::UnixSignals for the process.

This change also enables some future patches that will enable llgs to be used for local Linux debugging.

Note I'm not currently using HostInfo for GetUnixSignals. I am happy to do that in a follow-up patch, but right now I want to minimize the number of changes vs. other branches and keep that other change separate.

Diff Detail

Event Timeline

tfiala updated this revision to Diff 13053.Aug 28 2014, 12:53 PM
tfiala retitled this revision from to Consolidate UnixSignals setting/getting in Process..
tfiala updated this object.
tfiala edited the test plan for this revision. (Show Details)
tfiala added a reviewer: emaste.
tfiala added a subscriber: Unknown Object (MLST).
tfiala updated this revision to Diff 13054.Aug 28 2014, 12:59 PM

Small tweak - a flag from another branch snuck in. Harmless for the change but still not intended to be there.

Any feedback on this? If not, I'll go ahead and get this in later today.

The modification to source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp is not appropriate in this patch. It already went in as a separate change ( svn r216745 here:

tfiala accepted this revision.Aug 29 2014, 10:46 AM
tfiala added a reviewer: tfiala.

Put it up here:
svn commit
Sending include/lldb/Host/Host.h
Sending include/lldb/Target/Process.h
Sending include/lldb/lldb-private-forward.h
Sending lldb.xcodeproj/project.pbxproj
Sending source/Host/common/Host.cpp
Sending source/Host/freebsd/Host.cpp
Sending source/Host/linux/Host.cpp
Sending source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp
Sending source/Plugins/Process/FreeBSD/ProcessFreeBSD.h
Sending source/Plugins/Process/Linux/ProcessLinux.cpp
Sending source/Plugins/Process/Linux/ProcessLinux.h
Sending source/Plugins/Process/POSIX/ProcessPOSIX.cpp
Sending source/Plugins/Process/POSIX/ProcessPOSIX.h
Sending source/Plugins/Process/elf-core/ProcessElfCore.cpp
Sending source/Plugins/Process/elf-core/ProcessElfCore.h
Sending source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
Sending source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
Sending source/Target/Process.cpp
Transmitting file data ..................
Committed revision 216748.

This revision is now accepted and ready to land.Aug 29 2014, 10:46 AM
tfiala closed this revision.Aug 29 2014, 10:46 AM