pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
lldb-netbsd: Fix some bugs and restore most of the includes in .cpp files
Module Name: pkgsrc-wip
Committed By: Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By: kamil
Date: Wed Mar 22 00:19:54 2017 +0100
Changeset: 7e84b8690fd336337b88eb65edae0de2c18fc589
Modified Files:
lldb-netbsd/distinfo
lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp
lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD.cpp
lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.cpp
Log Message:
lldb-netbsd: Fix some bugs and restore most of the includes in .cpp files
This is work in progress to resture buildable version of this package.
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=7e84b8690fd336337b88eb65edae0de2c18fc589
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
lldb-netbsd/distinfo | 6 +-
..._Plugins_Process_NetBSD_NativeProcessNetBSD.cpp | 111 +++++++++++++++++----
..._Process_NetBSD_NativeRegisterContextNetBSD.cpp | 19 +++-
...e_Plugins_Process_NetBSD_NativeThreadNetBSD.cpp | 14 ++-
4 files changed, 123 insertions(+), 27 deletions(-)
diffs:
diff --git a/lldb-netbsd/distinfo b/lldb-netbsd/distinfo
index 67d98e2c40..39e065c679 100644
--- a/lldb-netbsd/distinfo
+++ b/lldb-netbsd/distinfo
@@ -18,13 +18,13 @@ SHA1 (patch-source_Host_common_NativeProcessProtocol.cpp) = 23cc7da280b2123cf020
SHA1 (patch-source_Host_netbsd_Host.cpp) = 92ea9aa9c21d11126e7532a860e59f408175d8d4
SHA1 (patch-source_Plugins_DynamicLoader_POSIX-DYLD_DYLDRendezvous.cpp) = 32d683eb388ded96e7f9aedec827202b5b056392
SHA1 (patch-source_Plugins_Process_NetBSD_CMakeLists.txt) = 558379a5f3b47235dbf670742467e64c05e5900f
-SHA1 (patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp) = ad525be4f4fda8760b07eb38fa5d711453198d49
+SHA1 (patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp) = d4695c351974a6df766b4f4b63acf2314541cc46
SHA1 (patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.h) = 3c9d87046a4399f4ca8a48721b81b49b416ac3e0
-SHA1 (patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD.cpp) = 2e460e87213a0bfae91d516b242c8f99696da014
+SHA1 (patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD.cpp) = 53e098aaaf0b124d98ce57569065924cd8569151
SHA1 (patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD.h) = aa598445b9ab7495cb2c53765bf8a5b1444cab12
SHA1 (patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD__x86__64.cpp) = f6aaa6193389041476a05f022ad55e18b4ec0e20
SHA1 (patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD__x86__64.h) = dee7f3fafaf4688d573075897293d42b498484bf
-SHA1 (patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.cpp) = 6f8dcbedf31f5e4ad829900d537e21acaa718b25
+SHA1 (patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.cpp) = d7bf60f9197bb74e596eff10afd2d637fb31bbef
SHA1 (patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.h) = cc8cfee5f3740e2495282f376428963bb388b844
SHA1 (patch-source_Plugins_Process_elf-core_ThreadElfCore.cpp) = 3427bd2e2de3cd2947123c2f20ed8d5082a16ace
SHA1 (patch-source_Plugins_Process_minidump_ProcessMinidump.cpp) = a71464df2ef56b8b2c8905e8169a85a05cfd27ba
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 85b655d1d0..9364a14665 100644
--- a/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp
+++ b/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp
@@ -2,11 +2,74 @@ $NetBSD$
--- source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp.orig 2017-03-21 20:01:05.000000000 +0000
+++ source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp
-@@ -48,4 +48,1347 @@ Error NativeProcessProtocol::Attach(
- // -----------------------------------------------------------------------------
+@@ -10,16 +10,59 @@
+ #include "NativeProcessNetBSD.h"
- NativeProcessNetBSD::NativeProcessNetBSD()
-- : NativeProcessProtocol(LLDB_INVALID_PROCESS_ID) {}
+ // C Includes
++#include <sys/param.h>
++#include <sys/types.h>
++#include <sys/sysctl.h>
++#include <uvm/uvm_prot.h>
++#include <elf.h>
++#include <errno.h>
++#include <stdint.h>
++#include <string.h>
++#include <unistd.h>
++#include <util.h>
+
+ // C++ Includes
++#include <fstream>
++#include <mutex>
++#include <sstream>
++#include <string>
++#include <unordered_map>
+
+ // Other libraries and framework includes
++#include "lldb/Core/EmulateInstruction.h"
++#include "lldb/Utility/Error.h"
++#include "lldb/Core/ModuleSpec.h"
++#include "lldb/Core/RegisterValue.h"
++#include "lldb/Core/State.h"
++#include "lldb/Host/Host.h"
++#include "lldb/Host/HostProcess.h"
++#include "lldb/Host/ThreadLauncher.h"
++#include "lldb/Host/common/NativeBreakpoint.h"
++#include "lldb/Host/common/NativeRegisterContext.h"
++#include "lldb/Host/posix/ProcessLauncherPosixFork.h"
++#include "lldb/Symbol/ObjectFile.h"
++#include "lldb/Target/Process.h"
++#include "lldb/Target/ProcessLaunchInfo.h"
++#include "lldb/Target/Target.h"
++#include "lldb/Utility/LLDBAssert.h"
++#include "lldb/Host/PseudoTerminal.h"
++#include "lldb/Utility/StringExtractor.h"
++#include "lldb/Utility/DataBufferHeap.h"
+
++#include "NativeThreadNetBSD.h"
+ #include "Plugins/Process/POSIX/ProcessPOSIXLog.h"
+
+ // System includes - They have to be included after framework includes because
+ // they define some
+ // macros which collide with variable names in other modules
++#include <sys/socket.h>
++
++#include <sys/ptrace.h>
++#include <sys/syscall.h>
++#include <sys/types.h>
++#include <sys/user.h>
++#include <sys/wait.h>
++
+
+ using namespace lldb;
+ using namespace lldb_private;
+@@ -27,6 +70,132 @@ using namespace lldb_private::process_ne
+ using namespace llvm;
+
+ // -----------------------------------------------------------------------------
++// Public Instance Methods
++// -----------------------------------------------------------------------------
++
++NativeProcessNetBSD::NativeProcessNetBSD()
+ : NativeProcessProtocol(LLDB_INVALID_PROCESS_ID), m_arch(),
+ m_supports_mem_region(eLazyBoolCalculate), m_mem_region_cache(),
+ m_pending_notification_tid(LLDB_INVALID_THREAD_ID) {}
@@ -129,13 +192,14 @@ $NetBSD$
+}
+
+// -----------------------------------------------------------------------------
-+// Public Static Methods
-+// -----------------------------------------------------------------------------
-+
-+Error NativeProcessProtocol::Launch(
-+ ProcessLaunchInfo &launch_info,
-+ NativeProcessProtocol::NativeDelegate &native_delegate, MainLoop &mainloop,
-+ NativeProcessProtocolSP &native_process_sp) {
+ // Public Static Methods
+ // -----------------------------------------------------------------------------
+
+@@ -34,18 +203,1218 @@ Error NativeProcessProtocol::Launch(
+ ProcessLaunchInfo &launch_info,
+ NativeProcessProtocol::NativeDelegate &native_delegate, MainLoop &mainloop,
+ NativeProcessProtocolSP &native_process_sp) {
+- return Error();
+ Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_PROCESS));
+
+ Error error;
@@ -171,11 +235,12 @@ $NetBSD$
+ launch_info.SetProcessID(native_process_sp->GetID());
+
+ return error;
-+}
-+
-+Error NativeProcessProtocol::Attach(
-+ lldb::pid_t pid, NativeProcessProtocol::NativeDelegate &native_delegate,
-+ MainLoop &mainloop, NativeProcessProtocolSP &native_process_sp) {
+ }
+
+ Error NativeProcessProtocol::Attach(
+ lldb::pid_t pid, NativeProcessProtocol::NativeDelegate &native_delegate,
+ MainLoop &mainloop, NativeProcessProtocolSP &native_process_sp) {
+- return Error();
+ Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_PROCESS));
+ LLDB_LOG(log, "pid = {0:x}", pid);
+
@@ -199,12 +264,14 @@ $NetBSD$
+
+ native_process_sp = native_process_netbsd_sp;
+ return error;
-+}
-+
-+// -----------------------------------------------------------------------------
-+// Public Instance Methods
-+// -----------------------------------------------------------------------------
-+
+ }
+
+ // -----------------------------------------------------------------------------
+ // Public Instance Methods
+ // -----------------------------------------------------------------------------
+
+-NativeProcessNetBSD::NativeProcessNetBSD()
+- : NativeProcessProtocol(LLDB_INVALID_PROCESS_ID) {}
+
+
+void NativeProcessNetBSD::AttachToInferior(MainLoop &mainloop, lldb::pid_t pid,
diff --git a/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD.cpp b/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD.cpp
index 5fdac4f13d..813aa8cec8 100644
--- a/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD.cpp
+++ b/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD.cpp
@@ -2,7 +2,24 @@ $NetBSD$
--- source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD.cpp.orig 2017-03-21 20:01:05.000000000 +0000
+++ source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD.cpp
-@@ -17,3 +17,85 @@ NativeRegisterContextNetBSD::NativeRegis
+@@ -9,6 +9,16 @@
+
+ #include "NativeRegisterContextNetBSD.h"
+
++#include "lldb/Core/RegisterValue.h"
++#include "lldb/Host/common/NativeProcessProtocol.h"
++#include "lldb/Host/common/NativeThreadProtocol.h"
++
++#include "Plugins/Process/POSIX/ProcessPOSIXLog.h"
++
++#include <sys/param.h>
++#include <sys/types.h>
++#include <sys/ptrace.h>
++
+ using namespace lldb_private;
+ using namespace lldb_private::process_netbsd;
+
+@@ -17,3 +27,85 @@ NativeRegisterContextNetBSD::NativeRegis
RegisterInfoInterface *reg_info_interface_p)
: NativeRegisterContextRegisterInfo(native_thread, concrete_frame_idx,
reg_info_interface_p) {}
diff --git a/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.cpp b/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.cpp
index e735fdcd03..06201d1021 100644
--- a/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.cpp
+++ b/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.cpp
@@ -2,7 +2,19 @@ $NetBSD$
--- source/Plugins/Process/NetBSD/NativeThreadNetBSD.cpp.orig 2017-03-21 20:01:05.000000000 +0000
+++ source/Plugins/Process/NetBSD/NativeThreadNetBSD.cpp
-@@ -16,6 +16,382 @@ using namespace lldb;
+@@ -11,11 +11,394 @@
+ #include "NativeRegisterContextNetBSD.h"
+
+ #include "NativeProcessNetBSD.h"
++#include "lldb/Core/RegisterValue.h"
++
++#include "Plugins/Process/POSIX/ProcessPOSIXLog.h"
++
++#include <sys/param.h>
++#include <sys/types.h>
++#include <sys/ptrace.h>
+
+ using namespace lldb;
using namespace lldb_private;
using namespace lldb_private::process_netbsd;
Home |
Main Index |
Thread Index |
Old Index