[Lldb-commits] [PATCH] D113521: Allow lldb to launch a remote executable when there isn't a local copy

Jim Ingham via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Nov 9 15:18:58 PST 2021


jingham created this revision.
jingham added reviewers: clayborg, labath, jasonmolenda, JDevlieghere.
jingham requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

lldb doesn't need to have a local copy of the binary that it is going to ask the remote stub to run for it, it can send the remote stub a path to the binary, and then read the executable module out of memory once the binary has been launched.

There is a workflow for providing an alternate remote path, but it hangs the information off the executable module, which if you don't have a local copy of the file you can't make.

So I came up with an alternate workflow for the case where you don't have a local executable copy, using LaunchInfo::SetExecutableFile.  If you tell a target or connected process to Launch, and the LaunchInfo has an executable file but the target doesn't, then send the LaunchInfo's executable file to the remote stub, to see if it can launch it.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D113521

Files:
  lldb/source/Commands/CommandObjectProcess.cpp
  lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
  lldb/source/Target/Process.cpp
  lldb/test/API/functionalities/gdb_remote_client/TestNoLocalFile.py

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D113521.385974.patch
Type: text/x-patch
Size: 26914 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20211109/a07a86ca/attachment-0001.bin>


More information about the lldb-commits mailing list