[Lldb-commits] [PATCH] D10996: Avoid going through Platform when creating a NativeProcessProtocol instance

Pavel Labath labath at google.com
Tue Jul 7 08:20:10 PDT 2015


labath added reviewers: ovyalov, clayborg.
labath added a subscriber: lldb-commits.

This commit avoids the Platform instance when spawning or attaching to a process in lldb-server.
Instead, I have the server call a (static) method of NativeProcessProtocol directly. The reason
for this is that I believe that NativeProcessProtocol should be decoupled from the Platform
(after all, it always knows which platform it is running on, unlike the rest of lldb).
Additionally, the kind of platform actions a NativeProcessProtocol instance is likely to differ
greatly from the platform actions of the lldb client, so I think the separation makes sense.

After this, the only dependency NativeProcessLinux has on PlatformLinux is the ResolveExecutable
method, which needs additional refactoring.

http://reviews.llvm.org/D10996

Files:
  include/lldb/Host/common/NativeProcessProtocol.h
  include/lldb/Target/Platform.h
  source/Plugins/Platform/Kalimba/PlatformKalimba.cpp
  source/Plugins/Platform/Kalimba/PlatformKalimba.h
  source/Plugins/Platform/Linux/PlatformLinux.cpp
  source/Plugins/Platform/Linux/PlatformLinux.h
  source/Plugins/Process/Linux/NativeProcessLinux.cpp
  source/Plugins/Process/Linux/NativeProcessLinux.h
  source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
  source/Target/Platform.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D10996.29183.patch
Type: text/x-patch
Size: 16843 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150707/a8217bc1/attachment.bin>


More information about the lldb-commits mailing list