pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
lldb-netbsd: Cleanup PlatformNetBSD code
Module Name: pkgsrc-wip
Committed By: Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By: kamil
Date: Sun Feb 5 02:50:15 2017 +0100
Changeset: 2461b2fd253fb5df6f5b8c084eb5a0b2efc2e011
Modified Files:
lldb-netbsd/distinfo
lldb-netbsd/patches/patch-source_Plugins_Platform_NetBSD_PlatformNetBSD.cpp
lldb-netbsd/patches/patch-source_Plugins_Platform_NetBSD_PlatformNetBSD.h
lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp
Log Message:
lldb-netbsd: Cleanup PlatformNetBSD code
Catch up after r294114 - Clean up PlatformLinux code
Sponsored by <The NetBSD Foundation>
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=2461b2fd253fb5df6f5b8c084eb5a0b2efc2e011
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
lldb-netbsd/distinfo | 6 +-
...urce_Plugins_Platform_NetBSD_PlatformNetBSD.cpp | 87 ++++------------------
...source_Plugins_Platform_NetBSD_PlatformNetBSD.h | 17 +++--
..._Plugins_Process_NetBSD_NativeProcessNetBSD.cpp | 2 +-
4 files changed, 28 insertions(+), 84 deletions(-)
diffs:
diff --git a/lldb-netbsd/distinfo b/lldb-netbsd/distinfo
index 76f31f5b85..adefd2a3c9 100644
--- a/lldb-netbsd/distinfo
+++ b/lldb-netbsd/distinfo
@@ -35,14 +35,14 @@ SHA1 (patch-source_Plugins_Language_Java_JavaLanguage.cpp) = 960b3bc5de14a872a7d
SHA1 (patch-source_Plugins_Language_ObjC_ObjCLanguage.cpp) = 018caf2ea5a3b867986a03ae0337c3ced01fe040
SHA1 (patch-source_Plugins_Platform_MacOSX_PlatformAppleSimulator.cpp) = 4c7a6d571d194fc767f268a327a2d4bef8bde0de
SHA1 (patch-source_Plugins_Platform_MacOSX_PlatformDarwin.cpp) = 75b5190bec7299b59083f73af9b5f97df0cbde2a
-SHA1 (patch-source_Plugins_Platform_NetBSD_PlatformNetBSD.cpp) = 03f19a72814e94da205f227c9d67c2c0c39eec1d
-SHA1 (patch-source_Plugins_Platform_NetBSD_PlatformNetBSD.h) = c95a91f230e3504eb1adc07f1b58ef5805a335fc
+SHA1 (patch-source_Plugins_Platform_NetBSD_PlatformNetBSD.cpp) = 347acfd6a40de060a950dcec4c67467a01d73fcc
+SHA1 (patch-source_Plugins_Platform_NetBSD_PlatformNetBSD.h) = 3cf5ac4116e42610b32cf2fb446713cf1208ef53
SHA1 (patch-source_Plugins_Process_CMakeLists.txt) = c689ff4ec455234f8d506dc9eb8e0ed7f750d426
SHA1 (patch-source_Plugins_Process_FreeBSD_ProcessFreeBSD.cpp) = 49c782a47840578716009abf3093cba731551bb9
SHA1 (patch-source_Plugins_Process_Linux_NativeProcessLinux.cpp) = 9d7ec5c7cb34120814d9cd2b039f2f64aa3c1451
SHA1 (patch-source_Plugins_Process_MacOSX-Kernel_ProcessKDP.cpp) = d6162941eba2011128b5db1aa50f0aa4983a45e5
SHA1 (patch-source_Plugins_Process_NetBSD_CMakeLists.txt) = 483584dad2dba01dccd065435a5d75eedf11b3c6
-SHA1 (patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp) = 728f910dd8cbc31b59ed3e8c3226d9203c0a59b7
+SHA1 (patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp) = af6aceac694ed5c94538a6851e8d7f85a0726709
SHA1 (patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.h) = c48bb2dd45682164ab904b8b3f7664b91ac35d5b
SHA1 (patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.cpp) = 4369b37e51c367787a12c7f935a8f5daf274841e
SHA1 (patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.h) = 22e5c436baea68b38058c8387318d08c7a43c149
diff --git a/lldb-netbsd/patches/patch-source_Plugins_Platform_NetBSD_PlatformNetBSD.cpp b/lldb-netbsd/patches/patch-source_Plugins_Platform_NetBSD_PlatformNetBSD.cpp
index fbc0dea033..1cc44b1180 100644
--- a/lldb-netbsd/patches/patch-source_Plugins_Platform_NetBSD_PlatformNetBSD.cpp
+++ b/lldb-netbsd/patches/patch-source_Plugins_Platform_NetBSD_PlatformNetBSD.cpp
@@ -2,30 +2,28 @@ $NetBSD$
--- source/Plugins/Platform/NetBSD/PlatformNetBSD.cpp.orig 2017-02-04 18:35:35.000000000 +0000
+++ source/Plugins/Platform/NetBSD/PlatformNetBSD.cpp
-@@ -20,24 +20,107 @@
+@@ -19,25 +19,45 @@
+ // C++ Includes
// Other libraries and framework includes
// Project includes
- #include "lldb/Breakpoint/BreakpointLocation.h"
+-#include "lldb/Breakpoint/BreakpointLocation.h"
-#include "lldb/Breakpoint/BreakpointSite.h"
#include "lldb/Core/Debugger.h"
+-#include "lldb/Core/Module.h"
+-#include "lldb/Core/ModuleSpec.h"
+#include "lldb/Core/Log.h"
- #include "lldb/Core/Module.h"
-+#include "lldb/Core/ModuleList.h"
- #include "lldb/Core/ModuleSpec.h"
#include "lldb/Core/PluginManager.h"
-#include "lldb/Host/Host.h"
+#include "lldb/Core/State.h"
+#include "lldb/Host/FileSpec.h"
#include "lldb/Host/HostInfo.h"
-+#include "lldb/Interpreter/OptionValueProperties.h"
-+#include "lldb/Interpreter/Property.h"
#include "lldb/Target/Process.h"
+#include "lldb/Target/Target.h"
#include "lldb/Utility/Error.h"
+#include "lldb/Utility/StreamString.h"
+
+// Define these constants from NetBSD mman.h for use when targeting
-+// remote linux systems even when host has different values.
++// remote netbsd systems even when host has different values.
+#define MAP_PRIVATE 0x0002
+#define MAP_ANON 0x1000
@@ -36,63 +34,6 @@ $NetBSD$
+static uint32_t g_initialize_count = 0;
+
+//------------------------------------------------------------------
-+/// Code to handle the PlatformNetBSD settings
-+//------------------------------------------------------------------
-+
-+namespace {
-+class PlatformNetBSDProperties : public Properties {
-+public:
-+ PlatformNetBSDProperties();
-+
-+ ~PlatformNetBSDProperties() override = default;
-+
-+ static ConstString &GetSettingName();
-+
-+private:
-+ static const PropertyDefinition *GetStaticPropertyDefinitions();
-+};
-+
-+typedef std::shared_ptr<PlatformNetBSDProperties> PlatformNetBSDPropertiesSP;
-+
-+} // anonymous namespace
-+
-+PlatformNetBSDProperties::PlatformNetBSDProperties() : Properties() {
-+ m_collection_sp.reset(new OptionValueProperties(GetSettingName()));
-+ m_collection_sp->Initialize(GetStaticPropertyDefinitions());
-+}
-+
-+ConstString &PlatformNetBSDProperties::GetSettingName() {
-+ static ConstString g_setting_name("netbsd");
-+ return g_setting_name;
-+}
-+
-+const PropertyDefinition *
-+PlatformNetBSDProperties::GetStaticPropertyDefinitions() {
-+ static PropertyDefinition g_properties[] = {
-+ {NULL, OptionValue::eTypeInvalid, false, 0, NULL, NULL, NULL}};
-+
-+ return g_properties;
-+}
-+
-+static const PlatformNetBSDPropertiesSP &GetGlobalProperties() {
-+ static PlatformNetBSDPropertiesSP g_settings_sp;
-+ if (!g_settings_sp)
-+ g_settings_sp.reset(new PlatformNetBSDProperties());
-+ return g_settings_sp;
-+}
-+
-+void PlatformNetBSD::DebuggerInitialize(Debugger &debugger) {
-+ if (!PluginManager::GetSettingForPlatformPlugin(
-+ debugger, PlatformNetBSDProperties::GetSettingName())) {
-+ const bool is_global_setting = true;
-+ PluginManager::CreateSettingForPlatformPlugin(
-+ debugger, GetGlobalProperties()->GetValueProperties(),
-+ ConstString("Properties for the PlatformNetBSD plug-in."),
-+ is_global_setting);
-+ }
-+}
-+
-+//------------------------------------------------------------------
+
PlatformSP PlatformNetBSD::CreateInstance(bool force, const ArchSpec *arch) {
- // The only time we create an instance is when we are creating a remote
@@ -115,7 +56,7 @@ $NetBSD$
bool create = force;
if (create == false && arch && arch->IsValid()) {
-@@ -51,8 +134,19 @@ PlatformSP PlatformNetBSD::CreateInstanc
+@@ -51,8 +71,19 @@ PlatformSP PlatformNetBSD::CreateInstanc
break;
}
}
@@ -137,7 +78,7 @@ $NetBSD$
return PlatformSP();
}
-@@ -66,211 +160,51 @@ ConstString PlatformNetBSD::GetPluginNam
+@@ -66,211 +97,51 @@ ConstString PlatformNetBSD::GetPluginNam
}
}
@@ -171,7 +112,7 @@ $NetBSD$
+ PluginManager::RegisterPlugin(
+ PlatformNetBSD::GetPluginNameStatic(false),
+ PlatformNetBSD::GetPluginDescriptionStatic(false),
-+ PlatformNetBSD::CreateInstance, PlatformNetBSD::DebuggerInitialize);
++ PlatformNetBSD::CreateInstance, nullptr);
}
}
@@ -228,7 +169,9 @@ $NetBSD$
- m_major_os_version, m_minor_os_version, m_update_os_version);
- return false;
-}
--
++ : PlatformPOSIX(is_host) // This is the local host platform
++{}
+
-bool PlatformNetBSD::GetRemoteOSBuildString(std::string &s) {
- if (m_remote_platform_sp)
- return m_remote_platform_sp->GetRemoteOSBuildString(s);
@@ -350,9 +293,7 @@ $NetBSD$
- old_module_sp_ptr, did_create_ptr);
- }
- }
-+ : PlatformPOSIX(is_host) // This is the local host platform
-+{}
-
+-
- if (!module_sp) {
- // Fall back to the local platform and find the file locally
- error = Platform::GetSharedModule(module_spec, process, module_sp,
@@ -367,7 +308,7 @@ $NetBSD$
bool PlatformNetBSD::GetSupportedArchitectureAtIndex(uint32_t idx,
ArchSpec &arch) {
-@@ -323,79 +257,239 @@ bool PlatformNetBSD::GetSupportedArchite
+@@ -323,79 +194,239 @@ bool PlatformNetBSD::GetSupportedArchite
}
void PlatformNetBSD::GetStatus(Stream &strm) {
diff --git a/lldb-netbsd/patches/patch-source_Plugins_Platform_NetBSD_PlatformNetBSD.h b/lldb-netbsd/patches/patch-source_Plugins_Platform_NetBSD_PlatformNetBSD.h
index aee8991eb8..3b74437e2d 100644
--- a/lldb-netbsd/patches/patch-source_Plugins_Platform_NetBSD_PlatformNetBSD.h
+++ b/lldb-netbsd/patches/patch-source_Plugins_Platform_NetBSD_PlatformNetBSD.h
@@ -2,10 +2,14 @@ $NetBSD$
--- source/Plugins/Platform/NetBSD/PlatformNetBSD.h.orig 2017-02-04 18:35:35.000000000 +0000
+++ source/Plugins/Platform/NetBSD/PlatformNetBSD.h
-@@ -14,96 +14,59 @@
- // C++ Includes
- // Other libraries and framework includes
- // Project includes
+@@ -10,100 +10,57 @@
+ #ifndef liblldb_PlatformNetBSD_h_
+ #define liblldb_PlatformNetBSD_h_
+
+-// C Includes
+-// C++ Includes
+-// Other libraries and framework includes
+-// Project includes
-#include "lldb/Target/Platform.h"
+#include "Plugins/Platform/POSIX/PlatformPOSIX.h"
@@ -18,13 +22,12 @@ $NetBSD$
PlatformNetBSD(bool is_host);
- ~PlatformNetBSD() override = default;
-+ ~PlatformNetBSD() override;
-
+-
- //------------------------------------------------------------
- // Class functions
- //------------------------------------------------------------
- static lldb::PlatformSP CreateInstance(bool force, const ArchSpec *arch);
-+ static void DebuggerInitialize(Debugger &debugger);
++ ~PlatformNetBSD() override;
static void Initialize();
diff --git a/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp b/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp
index 69b899b5b6..bc00ba8ad6 100644
--- a/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp
+++ b/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp
@@ -1,6 +1,6 @@
$NetBSD$
---- source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp.orig 2017-02-05 00:41:08.548506512 +0000
+--- source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp.orig 2017-02-05 01:46:10.616321206 +0000
+++ source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp
@@ -0,0 +1,1387 @@
+//===-- NativeProcessNetBSD.cpp -------------------------------- -*- C++ -*-===//
Home |
Main Index |
Thread Index |
Old Index