[Lldb-commits] [PATCH] D31231: Reuse appropriate Launch and Attach on NetBSD

Kamil Rytarowski via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Mar 21 19:13:58 PDT 2017


krytarowski created this revision.
krytarowski added a project: LLDB.
Herald added a subscriber: mgorny.

NetBSD ships with NativeProcessNetBSD  inherited from NativeProcessProtocol.

Link Plugins/Process/gdb-remote with lldbPluginProcessNetBSD in order to resolve
correctly the linking to Launch and Attach from the NetBSD plugin.

Sponsored by <The NetBSD Foundation>


Repository:
  rL LLVM

https://reviews.llvm.org/D31231

Files:
  source/Host/common/NativeProcessProtocol.cpp
  source/Plugins/Process/gdb-remote/CMakeLists.txt


Index: source/Plugins/Process/gdb-remote/CMakeLists.txt
===================================================================
--- source/Plugins/Process/gdb-remote/CMakeLists.txt
+++ source/Plugins/Process/gdb-remote/CMakeLists.txt
@@ -11,6 +11,10 @@
   list(APPEND LLDB_PLUGINS lldbPluginProcessLinux)
 endif()
 
+if(CMAKE_SYSTEM_NAME MATCHES "NetBSD")
+  list(APPEND LLDB_PLUGINS lldbPluginProcessNetBSD)
+endif()
+
 add_lldb_library(lldbPluginProcessGDBRemote PLUGIN
   GDBRemoteClientBase.cpp
   GDBRemoteCommunication.cpp
Index: source/Host/common/NativeProcessProtocol.cpp
===================================================================
--- source/Host/common/NativeProcessProtocol.cpp
+++ source/Host/common/NativeProcessProtocol.cpp
@@ -504,7 +504,7 @@
     return Error("failed to retrieve a valid architecture from the exe module");
 }
 
-#ifndef __linux__
+#if !defined(__linux__) && !defined(__NetBSD__)
 // These need to be implemented to support lldb-gdb-server on a given platform.
 // Stubs are
 // provided to make the rest of the code link on non-supported platforms.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31231.92589.patch
Type: text/x-patch
Size: 1088 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20170322/d79704dd/attachment.bin>


More information about the lldb-commits mailing list