llvm-project/lldb/source/Interpreter
Greg Clayton b766a73dfc Added support for attaching to a remote debug server with the new command:
(lldb) process connect <remote-url>

Currently when you specify a file with the file command it helps us to find
a process plug-in that is suitable for debugging. If you specify a file you
can rely upon this to find the correct debugger plug-in:

% lldb a.out
Current executable set to 'a.out' (x86_64).
(lldb) process connect connect://localhost:2345
...

If you don't specify a file, you will need to specify the plug-in name that
you wish to use:

% lldb
(lldb) process connect --plugin process.gdb-remote connect://localhost:2345

Other connection URL examples:

(lldb) process connect connect://localhost:2345
(lldb) process connect tcp://127.0.0.1
(lldb) process connect file:///dev/ttyS1

We are currently treating the "connect://host:port" as a way to do raw socket
connections. If there is a URL for this already, please let me know and we
will adopt it.

So now you can connect to a remote debug server with the ProcessGDBRemote
plug-in. After connection, it will ask for the pid info using the "qC" packet
and if it responds with a valid process ID, it will be equivalent to attaching.
If it response with an error or invalid process ID, the LLDB process will be
in a new state: eStateConnected. This allows us to then download a program or
specify the program to run (using the 'A' packet), or specify a process to
attach to (using the "vAttach" packets), or query info about the processes
that might be available.

llvm-svn: 124846
2011-02-04 01:58:07 +00:00
..
Args.cpp Spelling changes applied from lldb_spelling.diffs from Bruce Mitchener. 2011-01-08 20:28:42 +00:00
CommandInterpreter.cpp Make sure the confirmation input reader calls fflush after writing its output. 2011-02-02 01:17:56 +00:00
CommandObject.cpp Added support for attaching to a remote debug server with the new command: 2011-02-04 01:58:07 +00:00
CommandObjectRegexCommand.cpp Spelling changes applied from lldb_spelling.diffs from Bruce Mitchener. 2011-01-08 20:28:42 +00:00
CommandObjectScript.cpp Split up the Python script interpreter code to allow multiple script interpreter objects to 2011-01-14 00:29:16 +00:00
CommandObjectScript.h Split up the Python script interpreter code to allow multiple script interpreter objects to 2011-01-14 00:29:16 +00:00
CommandReturnObject.cpp Initial checkin of lldb code from internal Apple repo. 2010-06-08 16:52:24 +00:00
Makefile Patch from Stephen Wilson: 2010-12-16 02:03:06 +00:00
Options.cpp Fixed an issue where we were resolving paths when we should have been. 2010-10-20 20:54:39 +00:00
ScriptInterpreter.cpp Added support for some new environment variables within LLDB to enable some 2011-01-27 01:01:10 +00:00
ScriptInterpreterNone.cpp Fixed the way set/show variables were being accessed to being natively 2010-09-18 01:14:36 +00:00
ScriptInterpreterPython.cpp Fix exit instructions for interactive interpreter, now that ctrl-D works. 2011-02-03 20:08:40 +00:00
embedded_interpreter.py Split up the Python script interpreter code to allow multiple script interpreter objects to 2011-01-14 00:29:16 +00:00