Reputation: 141
I'm trying to remotely launch and debug a new process with lldb
without much success.
Attaching to an already launched process works well by running these commands:
process connect <url>
process attach -P gdb-remote --pid <pid>
But if I want debugserver
to launch the executable by itself I'm running into troubles. Especially, I have no clue what arguments should I pass to target create
.
According to this page LLDB "will transparently take care of [..] downloading the executable in order to be able to debug", yet target create
seem to always require a local file. If I specify the remote file via -r
I get either unable to open target file
or remote --> local transfer without local path is not implemented yet
errors. If I set the target to a local file (such as a local copy of the remote's loader executable) without using -r
, then attempt to run process launch -p gdb-remote -s <remote path>
LLDB will attempt running the local path on the remote machine and fail.
What are the correct commands I need to use in order to launch a remote process?
Upvotes: 3
Views: 2111
Reputation: 141
After contacting LLDB's mailing list Greg updated the documentation page, which now clearly explains what I have to do (Specifically I was missing the script
lines, which appear to be the correct way to set the remote executable path)
Upvotes: 1