This is an archive of the discontinued LLVM Phabricator instance.

Extract attach core logic from SBTarget::Attach* methods into unified SBTarget::AttachToProcess and make it work with platform for remote attach purposes.
ClosedPublic

Authored by ovyalov on Feb 6 2015, 9:30 AM.

Details

Reviewers
vharron
clayborg
Summary

SBTarget::Attach, SBTarget::AttachToProcessWithID and SBTarget::AttachToProcessWithName use the same core logic - extracted it into new static method SBTarget::AttachToProcess.
Made SBTarget::AttachToProcess to support remote attach if a platform is available and can debug a process - this makes TestHelloWorld to pass in case of remote platform on Linux (test is passing when test suite and platform are running on the same machine, fully distributed test run requires further investigation).

Diff Detail

Event Timeline

ovyalov updated this revision to Diff 19490.Feb 6 2015, 9:30 AM
ovyalov retitled this revision from to Extract attach core logic from SBTarget::Attach* methods into unified SBTarget::AttachToProcess and make it work with platform for remote attach purposes..
ovyalov updated this object.
ovyalov edited the test plan for this revision. (Show Details)
ovyalov added reviewers: vharron, clayborg.
ovyalov added a subscriber: Unknown Object (MLST).
clayborg edited edge metadata.Feb 6 2015, 9:48 AM

I can't login to comment, I am home sick today, but I would rather not add anything extra to the SB header files. Can you move this static function into lldb_private::Target instead? We really should try to keep the SB layer free from any distractions.

ovyalov updated this revision to Diff 19512.Feb 6 2015, 1:44 PM
ovyalov edited edge metadata.

Thanks for suggestion - added Target::Attach method and wired it with SBTarget::Attach* methods and CommandObjectProcessAttach.
Please take another look.

Friendly ping.

clayborg accepted this revision.Feb 10 2015, 11:16 AM
clayborg edited edge metadata.

Looks good.

This revision is now accepted and ready to land.Feb 10 2015, 11:16 AM