This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Simplify RemoteAwarePlatform::ResolveExecutable
Needs ReviewPublic

Authored by labath on Jan 18 2022, 1:14 AM.

Details

Summary

The function had three branches:

  • host
  • remote-but-not-connected
  • remote-and-connected

All three branches overlap to varying degrees. This patch reduces them
to two by merging the two remote branches. The main difference between
the two is (or should be -- the code is fairly convoluted, so it's hard
to be certain) that in the connected case we can try to download the
module from the remote system.

However, there's no need to fork the code for that. We can just proceed
with the normal (connected) search sequence and let the sub-operations
that require a connected host fail.

Diff Detail

Event Timeline

labath requested review of this revision.Jan 18 2022, 1:14 AM
labath created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptJan 18 2022, 1:14 AM

I've added as reviewers everyone who has touched this function recently, in case you have some checks/use-cases you want to try, or can think of other reasons to not do this.