This is an archive of the discontinued LLVM Phabricator instance.

Allow `target create` with no local file
ClosedPublic

Authored by jingham on May 4 2022, 10:33 AM.

Details

Summary

In 92eaad2dd7adb5ee92f397cef85ab11f2612294e I made it possible to run a debug session with only a remote path to the file you are debugging using the SB API's. This patch makes it possible to do this using target create --remote-file <some_path> without supplying a local file as well.

Prior to this change we errored out saying that we haven't implemented copying the binary back from the remote. I didn't implement the copy back (in the case I'm interested in - iOS debugging - we don't actually have a way for lldb to do that). This patch doesn't impede doing that, I just didn't need it. I think for some object file formats debugging w/o the binary file is hard because of what doesn't get mapped in. I didn't try to arbitrate that, I'm assuming anybody who has to do this knows what they are going to get.

If there's a connected platform that can check that the remote file exists, it will do so, otherwise we trust the user's input - if it isn't there the process launch is going to fail with no-such-file so it will be pretty clear what went wrong.

Diff Detail

Event Timeline

jingham created this revision.May 4 2022, 10:33 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 4 2022, 10:33 AM
jingham requested review of this revision.May 4 2022, 10:33 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 4 2022, 10:33 AM
This revision is now accepted and ready to land.May 4 2022, 10:45 AM
clayborg accepted this revision.May 5 2022, 12:31 PM
labath accepted this revision.May 9 2022, 1:30 AM