[Lldb-commits] [PATCH] D14952: Create new "platform process connect" command

Tamas Berghammer via lldb-commits lldb-commits at lists.llvm.org
Tue Nov 24 07:01:00 PST 2015


tberghammer created this revision.
tberghammer added reviewers: labath, clayborg.
tberghammer added a subscriber: lldb-commits.
Herald added subscribers: srhines, danalbert, tberghammer, emaste.

Create new "platform process connect" command

The standard remote debugging workflow with gdb is to start the
application on the remote host under gdbserver (e.g.: gdbserver :5039
a.out) and then connect to it with gdb.

The same workflow is supported by debugserver/lldb-gdbserver with a very
similar syntax but to access all features of lldb we need to be
connected also to an lldb-platform instance running on the target.

Before this change this had to be done manually with starting a separate
lldb-platform on the target machine and then connecting to it with lldb
before connecting to the process.

This change add a new command to lldb called "lldb platform connect"
what makes it possible to connect to a platform and a process instance
with a single command with specifying only a single connection port.
With this command replacing gdbserver in a gdb based worflow is usually
as simple as replacing the command to execute gdbserver with executing
lldb-platform.

Example for the new workflow:
* On the target:
  lldb-server platform --listen localhost:5432 -- a.out arg1 arg2
* On the host:
  (lldb) platform select remote-android
  (lldb) platform process connect connect://localhost:5432

http://reviews.llvm.org/D14952

Files:
  include/lldb/Target/Platform.h
  source/Commands/CommandObjectPlatform.cpp
  source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.cpp
  source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.h
  source/Plugins/Platform/POSIX/PlatformPOSIX.cpp
  source/Plugins/Platform/POSIX/PlatformPOSIX.h
  source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
  source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h
  source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
  source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h
  source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp
  source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.h
  tools/lldb-server/lldb-platform.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14952.41043.patch
Type: text/x-patch
Size: 17046 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20151124/f11f0a67/attachment-0001.bin>


More information about the lldb-commits mailing list