Re: [Lldb-commits] [PATCH] D14042: Add more NetBSD platform glue for lldb

2015-11-07 Thread Kamil Rytarowski via lldb-commits
krytarowski updated this revision to Diff 39639.
krytarowski added a comment.

Rebase to head


Repository:
  rL LLVM

http://reviews.llvm.org/D14042

Files:
  cmake/LLDBDependencies.cmake
  cmake/modules/LLDBConfig.cmake
  source/Initialization/SystemInitializerCommon.cpp
  source/lldb.cpp
  tools/Makefile
  tools/lldb-mi/CMakeLists.txt

Index: tools/lldb-mi/CMakeLists.txt
===
--- tools/lldb-mi/CMakeLists.txt
+++ tools/lldb-mi/CMakeLists.txt
@@ -76,7 +76,7 @@
   Platform.cpp
   )
 
-if ( CMAKE_SYSTEM_NAME MATCHES "Windows" )
+if ( CMAKE_SYSTEM_NAME MATCHES "Windows" OR CMAKE_SYSTEM_NAME MATCHES "NetBSD" 
)
   add_definitions( -DIMPORT_LIBLLDB )
   list(APPEND LLDB_MI_SOURCES
 ${LLDB_SOURCE_ROOT}/Host/common/GetOptInc.cpp
Index: tools/Makefile
===
--- tools/Makefile
+++ tools/Makefile
@@ -13,7 +13,7 @@
 DIRS :=
 
 # enable lldb-gdbserver for supported platforms
-ifneq (,$(strip $(filter $(HOST_OS), FreeBSD Linux GNU/kFreeBSD)))
+ifneq (,$(strip $(filter $(HOST_OS), FreeBSD Linux NetBSD GNU/kFreeBSD)))
 DIRS += lldb-server
 endif
 
Index: source/lldb.cpp
===
--- source/lldb.cpp
+++ source/lldb.cpp
@@ -67,7 +67,7 @@
 
 return g_version_string;
 #else
-// On Linux/FreeBSD/Windows, report a version number in the same style as 
the clang tool.
+// On platforms other than Darwin, report a version number in the same 
style as the clang tool.
 static std::string g_version_str;
 if (g_version_str.empty())
 {
Index: source/Initialization/SystemInitializerCommon.cpp
===
--- source/Initialization/SystemInitializerCommon.cpp
+++ source/Initialization/SystemInitializerCommon.cpp
@@ -33,6 +33,7 @@
 #include "Plugins/Platform/Linux/PlatformLinux.h"
 #include "Plugins/Platform/MacOSX/PlatformMacOSX.h"
 #include "Plugins/Platform/MacOSX/PlatformRemoteiOS.h"
+#include "Plugins/Platform/NetBSD/PlatformNetBSD.h"
 #include "Plugins/Platform/Windows/PlatformWindows.h"
 #include "Plugins/Process/gdb-remote/ProcessGDBRemoteLog.h"
 
Index: cmake/modules/LLDBConfig.cmake
===
--- cmake/modules/LLDBConfig.cmake
+++ cmake/modules/LLDBConfig.cmake
@@ -381,7 +381,8 @@
 # ensure we build lldb-server when an lldb target is being built.
 if ((CMAKE_SYSTEM_NAME MATCHES "Darwin") OR
 (CMAKE_SYSTEM_NAME MATCHES "FreeBSD") OR
-(CMAKE_SYSTEM_NAME MATCHES "Linux"))
+(CMAKE_SYSTEM_NAME MATCHES "Linux") OR
+(CMAKE_SYSTEM_NAME MATCHES "NetBSD"))
 set(LLDB_CAN_USE_LLDB_SERVER 1)
 else()
 set(LLDB_CAN_USE_LLDB_SERVER 0)
Index: cmake/LLDBDependencies.cmake
===
--- cmake/LLDBDependencies.cmake
+++ cmake/LLDBDependencies.cmake
@@ -38,6 +38,7 @@
   lldbPluginPlatformFreeBSD
   lldbPluginPlatformKalimba
   lldbPluginPlatformLinux
+  lldbPluginPlatformNetBSD
   lldbPluginPlatformPOSIX
   lldbPluginPlatformWindows
   lldbPluginObjectContainerMachOArchive
@@ -105,6 +106,13 @@
 )
 endif ()
 
+# NetBSD-only libraries
+if ( CMAKE_SYSTEM_NAME MATCHES "NetBSD" )
+  list(APPEND LLDB_USED_LIBS
+lldbPluginProcessPOSIX
+)
+endif ()
+
 # Darwin-only libraries
 if ( CMAKE_SYSTEM_NAME MATCHES "Darwin" )
   list(APPEND LLDB_USED_LIBS


Index: tools/lldb-mi/CMakeLists.txt
===
--- tools/lldb-mi/CMakeLists.txt
+++ tools/lldb-mi/CMakeLists.txt
@@ -76,7 +76,7 @@
   Platform.cpp
   )
 
-if ( CMAKE_SYSTEM_NAME MATCHES "Windows" )
+if ( CMAKE_SYSTEM_NAME MATCHES "Windows" OR CMAKE_SYSTEM_NAME MATCHES "NetBSD" )
   add_definitions( -DIMPORT_LIBLLDB )
   list(APPEND LLDB_MI_SOURCES
 ${LLDB_SOURCE_ROOT}/Host/common/GetOptInc.cpp
Index: tools/Makefile
===
--- tools/Makefile
+++ tools/Makefile
@@ -13,7 +13,7 @@
 DIRS :=
 
 # enable lldb-gdbserver for supported platforms
-ifneq (,$(strip $(filter $(HOST_OS), FreeBSD Linux GNU/kFreeBSD)))
+ifneq (,$(strip $(filter $(HOST_OS), FreeBSD Linux NetBSD GNU/kFreeBSD)))
 DIRS += lldb-server
 endif
 
Index: source/lldb.cpp
===
--- source/lldb.cpp
+++ source/lldb.cpp
@@ -67,7 +67,7 @@
 
 return g_version_string;
 #else
-// On Linux/FreeBSD/Windows, report a version number in the same style as the clang tool.
+// On platforms other than Darwin, report a version number in the same style as the clang tool.
 static std::string g_version_str;
 if (g_version_str.empty())
 {
Index: source/Initialization/SystemInitializerCommon.cpp
===
--- source/Initialization/SystemInitializerCommon.cpp
+++ source/Initialization/SystemInitializerCommo

[Lldb-commits] [lldb] r252403 - Add more NetBSD platform glue for lldb

2015-11-07 Thread Bruce Mitchener via lldb-commits
Author: brucem
Date: Sat Nov  7 09:31:54 2015
New Revision: 252403

URL: http://llvm.org/viewvc/llvm-project?rev=252403&view=rev
Log:
Add more NetBSD platform glue for lldb

Summary:
These changes are still incomplete, but  we are almost there.

Changes:
- CMake and gmake code
- SWIG code
- minor code additions

Reviewers: emaste, joerg

Subscribers: youri, akat1, brucem, lldb-commits, joerg

Differential Revision: http://reviews.llvm.org/D14042

Modified:
lldb/trunk/cmake/LLDBDependencies.cmake
lldb/trunk/cmake/modules/LLDBConfig.cmake
lldb/trunk/source/Initialization/SystemInitializerCommon.cpp
lldb/trunk/source/lldb.cpp
lldb/trunk/tools/Makefile
lldb/trunk/tools/lldb-mi/CMakeLists.txt

Modified: lldb/trunk/cmake/LLDBDependencies.cmake
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/LLDBDependencies.cmake?rev=252403&r1=252402&r2=252403&view=diff
==
--- lldb/trunk/cmake/LLDBDependencies.cmake (original)
+++ lldb/trunk/cmake/LLDBDependencies.cmake Sat Nov  7 09:31:54 2015
@@ -38,6 +38,7 @@ set( LLDB_USED_LIBS
   lldbPluginPlatformFreeBSD
   lldbPluginPlatformKalimba
   lldbPluginPlatformLinux
+  lldbPluginPlatformNetBSD
   lldbPluginPlatformPOSIX
   lldbPluginPlatformWindows
   lldbPluginObjectContainerMachOArchive
@@ -104,6 +105,13 @@ if ( CMAKE_SYSTEM_NAME MATCHES "FreeBSD"
 lldbPluginProcessPOSIX
 )
 endif ()
+
+# NetBSD-only libraries
+if ( CMAKE_SYSTEM_NAME MATCHES "NetBSD" )
+  list(APPEND LLDB_USED_LIBS
+lldbPluginProcessPOSIX
+)
+endif ()
 
 # Darwin-only libraries
 if ( CMAKE_SYSTEM_NAME MATCHES "Darwin" )

Modified: lldb/trunk/cmake/modules/LLDBConfig.cmake
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/modules/LLDBConfig.cmake?rev=252403&r1=252402&r2=252403&view=diff
==
--- lldb/trunk/cmake/modules/LLDBConfig.cmake (original)
+++ lldb/trunk/cmake/modules/LLDBConfig.cmake Sat Nov  7 09:31:54 2015
@@ -381,7 +381,8 @@ endif()
 # ensure we build lldb-server when an lldb target is being built.
 if ((CMAKE_SYSTEM_NAME MATCHES "Darwin") OR
 (CMAKE_SYSTEM_NAME MATCHES "FreeBSD") OR
-(CMAKE_SYSTEM_NAME MATCHES "Linux"))
+(CMAKE_SYSTEM_NAME MATCHES "Linux") OR
+(CMAKE_SYSTEM_NAME MATCHES "NetBSD"))
 set(LLDB_CAN_USE_LLDB_SERVER 1)
 else()
 set(LLDB_CAN_USE_LLDB_SERVER 0)

Modified: lldb/trunk/source/Initialization/SystemInitializerCommon.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Initialization/SystemInitializerCommon.cpp?rev=252403&r1=252402&r2=252403&view=diff
==
--- lldb/trunk/source/Initialization/SystemInitializerCommon.cpp (original)
+++ lldb/trunk/source/Initialization/SystemInitializerCommon.cpp Sat Nov  7 
09:31:54 2015
@@ -33,6 +33,7 @@
 #include "Plugins/Platform/Linux/PlatformLinux.h"
 #include "Plugins/Platform/MacOSX/PlatformMacOSX.h"
 #include "Plugins/Platform/MacOSX/PlatformRemoteiOS.h"
+#include "Plugins/Platform/NetBSD/PlatformNetBSD.h"
 #include "Plugins/Platform/Windows/PlatformWindows.h"
 #include "Plugins/Process/gdb-remote/ProcessGDBRemoteLog.h"
 

Modified: lldb/trunk/source/lldb.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/lldb.cpp?rev=252403&r1=252402&r2=252403&view=diff
==
--- lldb/trunk/source/lldb.cpp (original)
+++ lldb/trunk/source/lldb.cpp Sat Nov  7 09:31:54 2015
@@ -67,7 +67,7 @@ lldb_private::GetVersion ()
 
 return g_version_string;
 #else
-// On Linux/FreeBSD/Windows, report a version number in the same style as 
the clang tool.
+// On platforms other than Darwin, report a version number in the same 
style as the clang tool.
 static std::string g_version_str;
 if (g_version_str.empty())
 {

Modified: lldb/trunk/tools/Makefile
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/Makefile?rev=252403&r1=252402&r2=252403&view=diff
==
--- lldb/trunk/tools/Makefile (original)
+++ lldb/trunk/tools/Makefile Sat Nov  7 09:31:54 2015
@@ -13,7 +13,7 @@ include $(LLDB_LEVEL)/../../Makefile.con
 DIRS :=
 
 # enable lldb-gdbserver for supported platforms
-ifneq (,$(strip $(filter $(HOST_OS), FreeBSD Linux GNU/kFreeBSD)))
+ifneq (,$(strip $(filter $(HOST_OS), FreeBSD Linux NetBSD GNU/kFreeBSD)))
 DIRS += lldb-server
 endif
 

Modified: lldb/trunk/tools/lldb-mi/CMakeLists.txt
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/CMakeLists.txt?rev=252403&r1=252402&r2=252403&view=diff
==
--- lldb/trunk/tools/lldb-mi/CMakeLists.txt (original)
+++ lldb/trunk/tools/lldb-mi/CMakeLists.txt Sat Nov  7 09:31:54 2015
@@ -76,7 +76,7 @@ set(LLDB_MI_SOURCES
   Platform.cpp
   )
 
-

Re: [Lldb-commits] [PATCH] D14042: Add more NetBSD platform glue for lldb

2015-11-07 Thread Bruce Mitchener via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL252403: Add more NetBSD platform glue for lldb (authored by 
brucem).

Changed prior to commit:
  http://reviews.llvm.org/D14042?vs=39639&id=39640#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D14042

Files:
  lldb/trunk/cmake/LLDBDependencies.cmake
  lldb/trunk/cmake/modules/LLDBConfig.cmake
  lldb/trunk/source/Initialization/SystemInitializerCommon.cpp
  lldb/trunk/source/lldb.cpp
  lldb/trunk/tools/Makefile
  lldb/trunk/tools/lldb-mi/CMakeLists.txt

Index: lldb/trunk/tools/lldb-mi/CMakeLists.txt
===
--- lldb/trunk/tools/lldb-mi/CMakeLists.txt
+++ lldb/trunk/tools/lldb-mi/CMakeLists.txt
@@ -76,7 +76,7 @@
   Platform.cpp
   )
 
-if ( CMAKE_SYSTEM_NAME MATCHES "Windows" )
+if ( CMAKE_SYSTEM_NAME MATCHES "Windows" OR CMAKE_SYSTEM_NAME MATCHES "NetBSD" 
)
   add_definitions( -DIMPORT_LIBLLDB )
   list(APPEND LLDB_MI_SOURCES
 ${LLDB_SOURCE_ROOT}/Host/common/GetOptInc.cpp
Index: lldb/trunk/tools/Makefile
===
--- lldb/trunk/tools/Makefile
+++ lldb/trunk/tools/Makefile
@@ -13,7 +13,7 @@
 DIRS :=
 
 # enable lldb-gdbserver for supported platforms
-ifneq (,$(strip $(filter $(HOST_OS), FreeBSD Linux GNU/kFreeBSD)))
+ifneq (,$(strip $(filter $(HOST_OS), FreeBSD Linux NetBSD GNU/kFreeBSD)))
 DIRS += lldb-server
 endif
 
Index: lldb/trunk/source/lldb.cpp
===
--- lldb/trunk/source/lldb.cpp
+++ lldb/trunk/source/lldb.cpp
@@ -67,7 +67,7 @@
 
 return g_version_string;
 #else
-// On Linux/FreeBSD/Windows, report a version number in the same style as 
the clang tool.
+// On platforms other than Darwin, report a version number in the same 
style as the clang tool.
 static std::string g_version_str;
 if (g_version_str.empty())
 {
Index: lldb/trunk/source/Initialization/SystemInitializerCommon.cpp
===
--- lldb/trunk/source/Initialization/SystemInitializerCommon.cpp
+++ lldb/trunk/source/Initialization/SystemInitializerCommon.cpp
@@ -33,6 +33,7 @@
 #include "Plugins/Platform/Linux/PlatformLinux.h"
 #include "Plugins/Platform/MacOSX/PlatformMacOSX.h"
 #include "Plugins/Platform/MacOSX/PlatformRemoteiOS.h"
+#include "Plugins/Platform/NetBSD/PlatformNetBSD.h"
 #include "Plugins/Platform/Windows/PlatformWindows.h"
 #include "Plugins/Process/gdb-remote/ProcessGDBRemoteLog.h"
 
Index: lldb/trunk/cmake/modules/LLDBConfig.cmake
===
--- lldb/trunk/cmake/modules/LLDBConfig.cmake
+++ lldb/trunk/cmake/modules/LLDBConfig.cmake
@@ -381,7 +381,8 @@
 # ensure we build lldb-server when an lldb target is being built.
 if ((CMAKE_SYSTEM_NAME MATCHES "Darwin") OR
 (CMAKE_SYSTEM_NAME MATCHES "FreeBSD") OR
-(CMAKE_SYSTEM_NAME MATCHES "Linux"))
+(CMAKE_SYSTEM_NAME MATCHES "Linux") OR
+(CMAKE_SYSTEM_NAME MATCHES "NetBSD"))
 set(LLDB_CAN_USE_LLDB_SERVER 1)
 else()
 set(LLDB_CAN_USE_LLDB_SERVER 0)
Index: lldb/trunk/cmake/LLDBDependencies.cmake
===
--- lldb/trunk/cmake/LLDBDependencies.cmake
+++ lldb/trunk/cmake/LLDBDependencies.cmake
@@ -38,6 +38,7 @@
   lldbPluginPlatformFreeBSD
   lldbPluginPlatformKalimba
   lldbPluginPlatformLinux
+  lldbPluginPlatformNetBSD
   lldbPluginPlatformPOSIX
   lldbPluginPlatformWindows
   lldbPluginObjectContainerMachOArchive
@@ -105,6 +106,13 @@
 )
 endif ()
 
+# NetBSD-only libraries
+if ( CMAKE_SYSTEM_NAME MATCHES "NetBSD" )
+  list(APPEND LLDB_USED_LIBS
+lldbPluginProcessPOSIX
+)
+endif ()
+
 # Darwin-only libraries
 if ( CMAKE_SYSTEM_NAME MATCHES "Darwin" )
   list(APPEND LLDB_USED_LIBS


Index: lldb/trunk/tools/lldb-mi/CMakeLists.txt
===
--- lldb/trunk/tools/lldb-mi/CMakeLists.txt
+++ lldb/trunk/tools/lldb-mi/CMakeLists.txt
@@ -76,7 +76,7 @@
   Platform.cpp
   )
 
-if ( CMAKE_SYSTEM_NAME MATCHES "Windows" )
+if ( CMAKE_SYSTEM_NAME MATCHES "Windows" OR CMAKE_SYSTEM_NAME MATCHES "NetBSD" )
   add_definitions( -DIMPORT_LIBLLDB )
   list(APPEND LLDB_MI_SOURCES
 ${LLDB_SOURCE_ROOT}/Host/common/GetOptInc.cpp
Index: lldb/trunk/tools/Makefile
===
--- lldb/trunk/tools/Makefile
+++ lldb/trunk/tools/Makefile
@@ -13,7 +13,7 @@
 DIRS :=
 
 # enable lldb-gdbserver for supported platforms
-ifneq (,$(strip $(filter $(HOST_OS), FreeBSD Linux GNU/kFreeBSD)))
+ifneq (,$(strip $(filter $(HOST_OS), FreeBSD Linux NetBSD GNU/kFreeBSD)))
 DIRS += lldb-server
 endif
 
Index: lldb/trunk/source/lldb.cpp
===
--- lldb/trunk/source/lldb.cpp
+++ lldb/trunk/source/lldb.cpp
@@ -67,7 +67,7 @@
 
 return g_version_stri

[Lldb-commits] [lldb] r252409 - Fix pessimizing moves. Found by clang.

2015-11-07 Thread Davide Italiano via lldb-commits
Author: davide
Date: Sat Nov  7 12:15:05 2015
New Revision: 252409

URL: http://llvm.org/viewvc/llvm-project?rev=252409&view=rev
Log:
Fix pessimizing moves. Found by clang.

Modified:
lldb/trunk/source/Host/common/Editline.cpp
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp

Modified: lldb/trunk/source/Host/common/Editline.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/Editline.cpp?rev=252409&r1=252408&r2=252409&view=diff
==
--- lldb/trunk/source/Host/common/Editline.cpp (original)
+++ lldb/trunk/source/Host/common/Editline.cpp Sat Nov  7 12:15:05 2015
@@ -203,7 +203,7 @@ namespace lldb_private
 {
 snprintf (history_path, sizeof (history_path), 
"~/%s-widehistory", m_prefix.c_str());
 }
-m_path = std::move (FileSpec (history_path, 
true).GetPath());
+m_path = FileSpec (history_path, true).GetPath();
 }
 if (m_path.empty())
 return NULL;

Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp?rev=252409&r1=252408&r2=252409&view=diff
==
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp Sat Nov  7 
12:15:05 2015
@@ -1621,7 +1621,7 @@ PlatformDarwin::GetOSVersion (uint32_t &
 }
 else if (env_str.startswith(k_dyld_root_path))
 {
-dyld_root_path = 
std::move(env_str.substr(k_dyld_root_path.size()).str());
+dyld_root_path = 
env_str.substr(k_dyld_root_path.size()).str();
 }
 }
 }


___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits