pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

lldb-netbsd: Fix build after rebase



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Wed Mar 29 03:12:37 2017 +0200
Changeset:	5e8be9f6b08f89eec86e8a33e3ef904327962d5e

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_NativeRegisterContextNetBSD__x86__64.cpp
	lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD__x86__64.h
Added Files:
	lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD.h
	lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.cpp
	lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.h

Log Message:
lldb-netbsd: Fix build after rebase

This code is still in progress.

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=5e8be9f6b08f89eec86e8a33e3ef904327962d5e

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 lldb-netbsd/distinfo                               |  11 +-
 ..._Plugins_Process_NetBSD_NativeProcessNetBSD.cpp |  22 +-
 ..._Process_NetBSD_NativeRegisterContextNetBSD.cpp |  83 +--
 ...ns_Process_NetBSD_NativeRegisterContextNetBSD.h |  31 ++
 ...NetBSD_NativeRegisterContextNetBSD__x86__64.cpp | 568 +--------------------
 ...s_NetBSD_NativeRegisterContextNetBSD__x86__64.h | 100 +---
 ...e_Plugins_Process_NetBSD_NativeThreadNetBSD.cpp |  35 ++
 ...rce_Plugins_Process_NetBSD_NativeThreadNetBSD.h |  16 +
 8 files changed, 153 insertions(+), 713 deletions(-)

diffs:
diff --git a/lldb-netbsd/distinfo b/lldb-netbsd/distinfo
index 514a56a3d3..ff1d47cce0 100644
--- a/lldb-netbsd/distinfo
+++ b/lldb-netbsd/distinfo
@@ -16,10 +16,13 @@ SHA1 (patch-source_CMakeLists.txt) = 5dacabc3f39c23bdfd432b5a4895866157b97aa0
 SHA1 (patch-source_Host_common_Host.cpp) = 7d48b8bb1e4350ba6d3ddc6357b9b8dc82d6b32d
 SHA1 (patch-source_Host_netbsd_Host.cpp) = 92ea9aa9c21d11126e7532a860e59f408175d8d4
 SHA1 (patch-source_Plugins_DynamicLoader_POSIX-DYLD_DYLDRendezvous.cpp) = 32d683eb388ded96e7f9aedec827202b5b056392
-SHA1 (patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp) = 571634cea5b2fc369e4ff2c5807b81cf820ff380
-SHA1 (patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD.cpp) = b167df99822ea185082ff5fb03683653cbadc685
-SHA1 (patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD__x86__64.cpp) = bbd23695df72cde26bbad7280a801d677f75e73b
-SHA1 (patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD__x86__64.h) = d883851599eb3278df6f3b2b5854ede3589713f5
+SHA1 (patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp) = 1915bc4243ca42d50d0014d076dddf3a412ab4a2
+SHA1 (patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD.cpp) = 1c4e5f6f6bf6f665ed659b195de02f7ca26827c9
+SHA1 (patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD.h) = b5b66057b90010ea9048a43238366a5647fa48f8
+SHA1 (patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD__x86__64.cpp) = ea9781e8a37719bee1baad234f3a59720a1720d4
+SHA1 (patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD__x86__64.h) = 4717298b6ce2923218f99042d8369639f5665c6a
+SHA1 (patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.cpp) = bd6777974a75faf1c98683e838d1048eceac3e57
+SHA1 (patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.h) = 66782e7dce1533d4ccce1ab7518f9760c50ec675
 SHA1 (patch-source_Plugins_Process_elf-core_ProcessElfCore.cpp) = 0a64e526ed3eca089ee54d3bb54385f4d26fc7d1
 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 9597a1862a..b8f05dd65e 100644
--- a/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp
+++ b/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp
@@ -44,23 +44,37 @@ $NetBSD$
      }
    }
  }
-@@ -403,7 +438,14 @@ Error NativeProcessNetBSD::Resume(const 
+@@ -389,10 +424,12 @@ Error NativeProcessNetBSD::Resume(const 
+     return Error();
+   }
+ 
++  Error error;
++
+   switch (action->state) {
+   case eStateRunning: {
+     // Run the thread, possibly feeding it the signal.
+-    Error error = NativeProcessNetBSD::PtraceWrapper(PT_CONTINUE, GetID(),
++    error = NativeProcessNetBSD::PtraceWrapper(PT_CONTINUE, GetID(),
+                                                      (void *)1, action->signal);
+     if (!error.Success())
+       return error;
+@@ -403,7 +440,14 @@ Error NativeProcessNetBSD::Resume(const 
      break;
    }
    case eStateStepping:
 -    return Error("Not implemented");
 +    // Run the thread, possibly feeding it the signal.
-+    Error error = NativeProcessNetBSD::PtraceWrapper(PT_STEP, GetID(),(void *)1, action->signal);
++    error = NativeProcessNetBSD::PtraceWrapper(PT_STEP, GetID(),(void *)1, action->signal);
 +    if (!error.Success())
 +      return error;
 +    for (const auto &thread_sp : m_threads) {
 +      static_pointer_cast<NativeThreadNetBSD>(thread_sp)->SetStepping();
 +    }
-+    SetState(eStateStepping, true)
++    SetState(eStateStepping, true);
      break;
  
    case eStateSuspended:
-@@ -850,9 +892,6 @@ NativeThreadNetBSDSP NativeProcessNetBSD
+@@ -850,9 +894,6 @@ NativeThreadNetBSDSP NativeProcessNetBSD
  ::pid_t NativeProcessNetBSD::Attach(lldb::pid_t pid, Error &error) {
    Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
  
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 73803f66f5..5e04a7c5f4 100644
--- a/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD.cpp
+++ b/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD.cpp
@@ -2,42 +2,10 @@ $NetBSD$
 
 --- source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD.cpp.orig	2017-03-29 00:14:15.000000000 +0000
 +++ source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD.cpp
-@@ -25,6 +25,88 @@ NativeRegisterContextNetBSD::NativeRegis
-     : NativeRegisterContextRegisterInfo(native_thread, concrete_frame_idx,
-                                         reg_info_interface_p) {}
+@@ -41,6 +41,22 @@ Error NativeRegisterContextNetBSD::Write
+   return DoWriteGPR(buf);
+ }
  
-+lldb::ByteOrder NativeRegisterContextNetBSD::GetByteOrder() const {
-+  // Get the target process whose privileged thread was used for the register
-+  // read.
-+  lldb::ByteOrder byte_order = lldb::eByteOrderInvalid;
-+
-+  NativeProcessProtocolSP process_sp(m_thread.GetProcess());
-+  if (!process_sp)
-+    return byte_order;
-+
-+  if (!process_sp->GetByteOrder(byte_order)) {
-+    // FIXME log here
-+  }
-+
-+  return byte_order;
-+}
-+
-+Error NativeRegisterContextNetBSD::ReadGPR() {
-+  void *buf = GetGPRBuffer();
-+  if (!buf)
-+    return Error("GPR buffer is NULL");
-+
-+  return DoReadGPR(buf);
-+}
-+
-+Error NativeRegisterContextNetBSD::WriteGPR() {
-+  void *buf = GetGPRBuffer();
-+  if (!buf)
-+    return Error("GPR buffer is NULL");
-+
-+  return DoWriteGPR(buf);
-+}
-+
 +Error NativeRegisterContextNetBSD::ReadFPR() {
 +  void *buf = GetFPRBuffer();
 +  if (!buf)
@@ -54,40 +22,23 @@ $NetBSD$
 +  return DoWriteFPR(buf);
 +}
 +
-+Error NativeRegisterContextNetBSD::DoReadGPR(void *buf) {
-+  return NativeProcessNetBSD::PtraceWrapper(PT_GETREGS, GetProcessPid(),
-+                                            buf, m_thread.GetID());
-+}
-+
-+Error NativeRegisterContextNetBSD::DoWriteGPR(void *buf) {
-+  return NativeProcessNetBSD::PtraceWrapper(PT_SETREGS, GetProcessPid(),
-+                                            buf, m_thread.GetID());
-+}
-+
+ Error NativeRegisterContextNetBSD::DoReadGPR(void *buf) {
+   return NativeProcessNetBSD::PtraceWrapper(PT_GETREGS, GetProcessPid(), buf,
+                                             m_thread.GetID());
+@@ -51,6 +67,16 @@ Error NativeRegisterContextNetBSD::DoWri
+                                             m_thread.GetID());
+ }
+ 
 +Error NativeRegisterContextNetBSD::DoReadFPR(void *buf) {
-+  return NativeProcessNetBSD::PtraceWrapper(PT_GETFPREGS, GetProcessPid(),
-+                                            buf, m_thread.GetID());
++  return NativeProcessNetBSD::PtraceWrapper(PT_GETFPREGS, GetProcessPid(), buf,
++                                            m_thread.GetID());
 +}
 +
 +Error NativeRegisterContextNetBSD::DoWriteFPR(void *buf) {
-+  return NativeProcessNetBSD::PtraceWrapper(PT_SETFPREGS, GetProcessPid(),
-+                                            buf, m_thread.GetID());
-+}
-+
-+NativeProcessNetBSD &NativeRegisterContextNetBSD::GetProcess() {
-+  auto process_sp = std::static_pointer_cast<NativeProcessNetBSD>(
-+      m_thread.GetProcess());
-+  assert(process_sp);
-+  return *process_sp;
-+}
-+
-+pid_t NativeRegisterContextNetBSD::GetProcessPid() {
-+  NativeProcessNetBSD &process = GetProcess();
-+  lldb::pid_t pid = process.GetID();
-+
-+  return pid;
++  return NativeProcessNetBSD::PtraceWrapper(PT_SETFPREGS, GetProcessPid(), buf,
++                                            m_thread.GetID());
 +}
 +
- Error NativeRegisterContextNetBSD::ReadGPR() {
-   void *buf = GetGPRBuffer();
-   if (!buf)
+ NativeProcessNetBSD &NativeRegisterContextNetBSD::GetProcess() {
+   auto process_sp =
+       std::static_pointer_cast<NativeProcessNetBSD>(m_thread.GetProcess());
diff --git a/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD.h b/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD.h
new file mode 100644
index 0000000000..ed776c85a0
--- /dev/null
+++ b/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD.h
@@ -0,0 +1,31 @@
+$NetBSD$
+
+--- source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD.h.orig	2017-03-29 00:14:15.000000000 +0000
++++ source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD.h
+@@ -37,13 +37,26 @@ public:
+ protected:
+   virtual Error ReadGPR();
+   virtual Error WriteGPR();
++
++  virtual Error ReadFPR();
++  virtual Error WriteFPR();
++
+   virtual void *GetGPRBuffer() { return nullptr; }
+   virtual size_t GetGPRSize() {
+     return GetRegisterInfoInterface().GetGPRSize();
+   }
++
++  virtual void *GetFPRBuffer() { return nullptr; }
++  virtual size_t GetFPRSize() {
++    return 0;
++  }
++
+   virtual Error DoReadGPR(void *buf);
+   virtual Error DoWriteGPR(void *buf);
+ 
++  virtual Error DoReadFPR(void *buf);
++  virtual Error DoWriteFPR(void *buf);
++
+   virtual NativeProcessNetBSD &GetProcess();
+   virtual ::pid_t GetProcessPid();
+ };
diff --git a/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD__x86__64.cpp b/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD__x86__64.cpp
index 35baaa9fba..b55dc0ae05 100644
--- a/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD__x86__64.cpp
+++ b/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD__x86__64.cpp
@@ -2,563 +2,23 @@ $NetBSD$
 
 --- source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp.orig	2017-03-29 00:14:15.000000000 +0000
 +++ source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp
-@@ -11,6 +11,559 @@
- 
- #include "NativeRegisterContextNetBSD_x86_64.h"
- 
-+#include "lldb/Utility/DataBufferHeap.h"
-+#include "lldb/Utility/Log.h"
-+#include "lldb/Core/RegisterValue.h"
-+#include "lldb/Host/HostInfo.h"
-+#include "lldb/Utility/Error.h"
-+
-+#include "Plugins/Process/Utility/RegisterContextNetBSD_x86_64.h"
-+
-+#include <elf.h>
-+
-+using namespace lldb_private;
-+using namespace lldb_private::process_netbsd;
-+
-+// ----------------------------------------------------------------------------
-+// Private namespace.
-+// ----------------------------------------------------------------------------
-+
-+namespace {
-+// x86 64-bit general purpose registers.
-+static const uint32_t g_gpr_regnums_x86_64[] = {
-+    lldb_rax_x86_64,    lldb_rbx_x86_64,    lldb_rcx_x86_64, lldb_rdx_x86_64,
-+    lldb_rdi_x86_64,    lldb_rsi_x86_64,    lldb_rbp_x86_64, lldb_rsp_x86_64,
-+    lldb_r8_x86_64,     lldb_r9_x86_64,     lldb_r10_x86_64, lldb_r11_x86_64,
-+    lldb_r12_x86_64,    lldb_r13_x86_64,    lldb_r14_x86_64, lldb_r15_x86_64,
-+    lldb_rip_x86_64,    lldb_rflags_x86_64, lldb_cs_x86_64,  lldb_fs_x86_64,
-+    lldb_gs_x86_64,     lldb_ss_x86_64,     lldb_ds_x86_64,  lldb_es_x86_64,
-+    lldb_eax_x86_64,    lldb_ebx_x86_64,    lldb_ecx_x86_64, lldb_edx_x86_64,
-+    lldb_edi_x86_64,    lldb_esi_x86_64,    lldb_ebp_x86_64, lldb_esp_x86_64,
-+    lldb_r8d_x86_64,  // Low 32 bits or r8
-+    lldb_r9d_x86_64,  // Low 32 bits or r9
-+    lldb_r10d_x86_64, // Low 32 bits or r10
-+    lldb_r11d_x86_64, // Low 32 bits or r11
-+    lldb_r12d_x86_64, // Low 32 bits or r12
-+    lldb_r13d_x86_64, // Low 32 bits or r13
-+    lldb_r14d_x86_64, // Low 32 bits or r14
-+    lldb_r15d_x86_64, // Low 32 bits or r15
-+    lldb_ax_x86_64,     lldb_bx_x86_64,     lldb_cx_x86_64,  lldb_dx_x86_64,
-+    lldb_di_x86_64,     lldb_si_x86_64,     lldb_bp_x86_64,  lldb_sp_x86_64,
-+    lldb_r8w_x86_64,  // Low 16 bits or r8
-+    lldb_r9w_x86_64,  // Low 16 bits or r9
-+    lldb_r10w_x86_64, // Low 16 bits or r10
-+    lldb_r11w_x86_64, // Low 16 bits or r11
-+    lldb_r12w_x86_64, // Low 16 bits or r12
-+    lldb_r13w_x86_64, // Low 16 bits or r13
-+    lldb_r14w_x86_64, // Low 16 bits or r14
-+    lldb_r15w_x86_64, // Low 16 bits or r15
-+    lldb_ah_x86_64,     lldb_bh_x86_64,     lldb_ch_x86_64,  lldb_dh_x86_64,
-+    lldb_al_x86_64,     lldb_bl_x86_64,     lldb_cl_x86_64,  lldb_dl_x86_64,
-+    lldb_dil_x86_64,    lldb_sil_x86_64,    lldb_bpl_x86_64, lldb_spl_x86_64,
-+    lldb_r8l_x86_64,    // Low 8 bits or r8
-+    lldb_r9l_x86_64,    // Low 8 bits or r9
-+    lldb_r10l_x86_64,   // Low 8 bits or r10
-+    lldb_r11l_x86_64,   // Low 8 bits or r11
-+    lldb_r12l_x86_64,   // Low 8 bits or r12
-+    lldb_r13l_x86_64,   // Low 8 bits or r13
-+    lldb_r14l_x86_64,   // Low 8 bits or r14
-+    lldb_r15l_x86_64,   // Low 8 bits or r15
-+    LLDB_INVALID_REGNUM // register sets need to end with this flag
-+};
-+static_assert((sizeof(g_gpr_regnums_x86_64) / sizeof(g_gpr_regnums_x86_64[0])) -
-+                      1 ==
-+                  k_num_gpr_registers_x86_64,
-+              "g_gpr_regnums_x86_64 has wrong number of register infos");
-+
-+// x86 64-bit floating point registers.
-+static const uint32_t g_fpu_regnums_x86_64[] = {
-+    lldb_fctrl_x86_64,     lldb_fstat_x86_64, lldb_ftag_x86_64,
-+    lldb_fop_x86_64,       lldb_fiseg_x86_64, lldb_fioff_x86_64,
-+    lldb_foseg_x86_64,     lldb_fooff_x86_64, lldb_mxcsr_x86_64,
-+    lldb_mxcsrmask_x86_64, lldb_st0_x86_64,   lldb_st1_x86_64,
-+    lldb_st2_x86_64,       lldb_st3_x86_64,   lldb_st4_x86_64,
-+    lldb_st5_x86_64,       lldb_st6_x86_64,   lldb_st7_x86_64,
-+    lldb_mm0_x86_64,       lldb_mm1_x86_64,   lldb_mm2_x86_64,
-+    lldb_mm3_x86_64,       lldb_mm4_x86_64,   lldb_mm5_x86_64,
-+    lldb_mm6_x86_64,       lldb_mm7_x86_64,   lldb_xmm0_x86_64,
-+    lldb_xmm1_x86_64,      lldb_xmm2_x86_64,  lldb_xmm3_x86_64,
-+    lldb_xmm4_x86_64,      lldb_xmm5_x86_64,  lldb_xmm6_x86_64,
-+    lldb_xmm7_x86_64,      lldb_xmm8_x86_64,  lldb_xmm9_x86_64,
-+    lldb_xmm10_x86_64,     lldb_xmm11_x86_64, lldb_xmm12_x86_64,
-+    lldb_xmm13_x86_64,     lldb_xmm14_x86_64, lldb_xmm15_x86_64,
-+    LLDB_INVALID_REGNUM // register sets need to end with this flag
-+};
-+static_assert((sizeof(g_fpu_regnums_x86_64) / sizeof(g_fpu_regnums_x86_64[0])) -
-+                      1 ==
-+                  k_num_fpr_registers_x86_64,
-+              "g_fpu_regnums_x86_64 has wrong number of register infos");
-+
-+// x86 64-bit AVX registers.
-+static const uint32_t g_avx_regnums_x86_64[] = {
-+    lldb_ymm0_x86_64,   lldb_ymm1_x86_64,  lldb_ymm2_x86_64,  lldb_ymm3_x86_64,
-+    lldb_ymm4_x86_64,   lldb_ymm5_x86_64,  lldb_ymm6_x86_64,  lldb_ymm7_x86_64,
-+    lldb_ymm8_x86_64,   lldb_ymm9_x86_64,  lldb_ymm10_x86_64, lldb_ymm11_x86_64,
-+    lldb_ymm12_x86_64,  lldb_ymm13_x86_64, lldb_ymm14_x86_64, lldb_ymm15_x86_64,
-+    LLDB_INVALID_REGNUM // register sets need to end with this flag
-+};
-+static_assert((sizeof(g_avx_regnums_x86_64) / sizeof(g_avx_regnums_x86_64[0])) -
-+                      1 ==
-+                  k_num_avx_registers_x86_64,
-+              "g_avx_regnums_x86_64 has wrong number of register infos");
-+
-+// x86 64-bit MPX registers.
-+static const uint32_t g_mpx_regnums_x86_64[] = {
-+    lldb_bnd0_x86_64,    lldb_bnd1_x86_64,    lldb_bnd2_x86_64,
-+    lldb_bnd3_x86_64,    lldb_bndcfgu_x86_64, lldb_bndstatus_x86_64,
-+    LLDB_INVALID_REGNUM // register sets need to end with this flag
-+};
-+static_assert((sizeof(g_mpx_regnums_x86_64) / sizeof(g_mpx_regnums_x86_64[0])) -
-+                      1 ==
-+                  k_num_mpx_registers_x86_64,
-+              "g_mpx_regnums_x86_64 has wrong number of register infos");
-+
-+// Number of register sets provided by this context.
-+enum { k_num_extended_register_sets = 2, k_num_register_sets = 4 };
-+
-+// Register sets for x86 64-bit.
-+static const RegisterSet g_reg_sets_x86_64[k_num_register_sets] = {
-+    {"General Purpose Registers", "gpr", k_num_gpr_registers_x86_64,
-+     g_gpr_regnums_x86_64},
-+    {"Floating Point Registers", "fpu", k_num_fpr_registers_x86_64,
-+     g_fpu_regnums_x86_64},
-+    {"Advanced Vector Extensions", "avx", k_num_avx_registers_x86_64,
-+     g_avx_regnums_x86_64},
-+    { "Memory Protection Extensions", "mpx", k_num_mpx_registers_x86_64,
-+     g_mpx_regnums_x86_64}};
-+}
-+
-+#define REG_CONTEXT_SIZE (GetRegisterInfoInterface().GetGPRSize() + sizeof(FPR))
-+
-+// ----------------------------------------------------------------------------
-+// XCR0 extended register sets masks.
-+// ----------------------------------------------------------------------------
-+#define mask_XSTATE_AVX (1ULL << 2)
-+#define mask_XSTATE_BNDREGS (1ULL << 3)
-+#define mask_XSTATE_BNDCFG (1ULL << 4)
-+#define mask_XSTATE_MPX (mask_XSTATE_BNDREGS | mask_XSTATE_BNDCFG)
-+
-+NativeRegisterContextNetBSD *
-+NativeRegisterContextNetBSD::CreateHostNativeRegisterContextNetBSD(
-+    const ArchSpec &target_arch, NativeThreadProtocol &native_thread,
-+    uint32_t concrete_frame_idx) {
-+  return new NativeRegisterContextNetBSD_x86_64(target_arch, native_thread,
-+                                               concrete_frame_idx);
-+}
-+
-+// ----------------------------------------------------------------------------
-+// NativeRegisterContextNetBSD_x86_64 members.
-+// ----------------------------------------------------------------------------
-+
-+static RegisterInfoInterface *
-+CreateRegisterInfoInterface(const ArchSpec &target_arch) {
-+  assert((HostInfo::GetArchitecture().GetAddressByteSize() == 8) &&
-+         "Register setting path assumes this is a 64-bit host");
-+  // X86_64 hosts know how to work with 64-bit and 32-bit EXEs using the
-+  // x86_64 register context.
-+  return new RegisterContextNetBSD_x86_64(target_arch);
-+}
-+
-+NativeRegisterContextNetBSD_x86_64::NativeRegisterContextNetBSD_x86_64(
-+    const ArchSpec &target_arch, NativeThreadProtocol &native_thread,
-+    uint32_t concrete_frame_idx)
-+    : NativeRegisterContextNetBSD(native_thread, concrete_frame_idx,
-+                                 CreateRegisterInfoInterface(target_arch)),
-+      m_gpr_x86_64(), m_fpr_x86_64(), m_dr_x86_64() {
-+}
-+
-+// CONSIDER after local and llgs debugging are merged, register set support can
-+// be moved into a base x86-64 class with IsRegisterSetAvailable made virtual.
-+uint32_t NativeRegisterContextNetBSD_x86_64::GetRegisterSetCount() const {
-+  uint32_t sets = 0;
-+  for (uint32_t set_index = 0; set_index < k_num_register_sets; ++set_index) {
-+    ++sets;
-+  }
-+
-+  return sets;
-+}
-+
-+const RegisterSet *
-+NativeRegisterContextNetBSD_x86_64::GetRegisterSet(uint32_t set_index) const {
-+  switch (GetRegisterInfoInterface().GetTargetArchitecture().GetMachine()) {
-+  case llvm::Triple::x86_64:
-+    return &g_reg_sets_x86_64[set_index];
-+  default:
-+    assert(false && "Unhandled target architecture.");
-+    return nullptr;
-+  }
-+
-+  return nullptr;
-+}
-+
-+int NativeRegisterContextNetBSD_x86_64::GetSetForNativeRegNum(int reg_num) const {
-+  if (reg_num < lldb_fctrl_x86_64)
-+    return GPRegSet;
-+  else
-+    return FPRegSet;
-+}
-+
-+int NativeRegisterContextNetBSD_x86_64::ReadRegisterSet(uint32_t set, bool force) {
-+  switch (set) {
-+  case GPRegSet:
-+    ReadGPR();
-+    return 0;
+@@ -154,6 +154,9 @@ int NativeRegisterContextNetBSD_x86_64::
+   case GPRegSet:
+     ReadGPR();
+     return 0;
 +  case FPRegSet:
 +    ReadFPR();
 +    return 0;
-+  default:
-+    break;
-+  }
-+  return -1;
-+}
-+
-+int NativeRegisterContextNetBSD_x86_64::WriteRegisterSet(uint32_t set) {
-+  switch (set) {
-+  case GPRegSet:
-+    WriteGPR();
-+    return 0;
+   default:
+     break;
+   }
+@@ -164,6 +167,9 @@ int NativeRegisterContextNetBSD_x86_64::
+   case GPRegSet:
+     WriteGPR();
+     return 0;
 +  case FPRegSet:
 +    WriteFPR();
 +    return 0;
-+  default:
-+    break;
-+  }
-+  return -1;
-+}
-+
-+Error NativeRegisterContextNetBSD_x86_64::ReadRegister(
-+    const RegisterInfo *reg_info, RegisterValue &reg_value) {
-+  Error error;
-+
-+  if (!reg_info) {
-+    error.SetErrorString("reg_info NULL");
-+    return error;
-+  }
-+
-+  const uint32_t reg = reg_info->kinds[lldb::eRegisterKindLLDB];
-+  if (reg == LLDB_INVALID_REGNUM) {
-+    // This is likely an internal register for lldb use only and should not be
-+    // directly queried.
-+    error.SetErrorStringWithFormat("register \"%s\" is an internal-only lldb "
-+                                   "register, cannot read directly",
-+                                   reg_info->name);
-+    return error;
-+  }
-+
-+  int set = GetSetForNativeRegNum(reg);
-+  if (set == -1) {
-+    // This is likely an internal register for lldb use only and should not be
-+    // directly queried.
-+    error.SetErrorStringWithFormat("register \"%s\" is in unrecognized set",
-+                                   reg_info->name);
-+    return error;
-+  }
-+
-+  if (ReadRegisterSet(set, false) != 0) {
-+    // This is likely an internal register for lldb use only and should not be
-+    // directly queried.
-+    error.SetErrorStringWithFormat("reading register set for register \"%s\" failed",
-+                                   reg_info->name);
-+    return error;
-+  }
-+
-+  switch (reg) {
-+  case lldb_rax_x86_64:
-+    reg_value = (uint64_t)m_gpr_x86_64.regs[_REG_RAX];
-+    break;
-+  case lldb_rbx_x86_64:
-+    reg_value = (uint64_t)m_gpr_x86_64.regs[_REG_RBX];
-+    break;
-+  case lldb_rcx_x86_64:
-+    reg_value = (uint64_t)m_gpr_x86_64.regs[_REG_RCX];
-+    break;
-+  case lldb_rdx_x86_64:
-+    reg_value = (uint64_t)m_gpr_x86_64.regs[_REG_RDX];
-+    break;
-+  case lldb_rdi_x86_64:
-+    reg_value = (uint64_t)m_gpr_x86_64.regs[_REG_RDI];
-+    break;
-+  case lldb_rsi_x86_64:
-+    reg_value = (uint64_t)m_gpr_x86_64.regs[_REG_RSI];
-+    break;
-+  case lldb_rbp_x86_64:
-+    reg_value = (uint64_t)m_gpr_x86_64.regs[_REG_RBP];
-+    break;
-+  case lldb_rsp_x86_64:
-+    reg_value = (uint64_t)m_gpr_x86_64.regs[_REG_RSP];
-+    break;
-+  case lldb_r8_x86_64:
-+    reg_value = (uint64_t)m_gpr_x86_64.regs[_REG_R8];
-+    break;
-+  case lldb_r9_x86_64:
-+    reg_value = (uint64_t)m_gpr_x86_64.regs[_REG_R9];
-+    break;
-+  case lldb_r10_x86_64:
-+    reg_value = (uint64_t)m_gpr_x86_64.regs[_REG_R10];
-+    break;
-+  case lldb_r11_x86_64:
-+    reg_value = (uint64_t)m_gpr_x86_64.regs[_REG_R11];
-+    break;
-+  case lldb_r12_x86_64:
-+    reg_value = (uint64_t)m_gpr_x86_64.regs[_REG_R12];
-+    break;
-+  case lldb_r13_x86_64:
-+    reg_value = (uint64_t)m_gpr_x86_64.regs[_REG_R13];
-+    break;
-+  case lldb_r14_x86_64:
-+    reg_value = (uint64_t)m_gpr_x86_64.regs[_REG_R14];
-+    break;
-+  case lldb_r15_x86_64:
-+    reg_value = (uint64_t)m_gpr_x86_64.regs[_REG_R15];
-+    break;
-+  case lldb_rip_x86_64:
-+    reg_value = (uint64_t)m_gpr_x86_64.regs[_REG_RIP];
-+    break;
-+  case lldb_rflags_x86_64:
-+    reg_value = (uint64_t)m_gpr_x86_64.regs[_REG_RFLAGS];
-+    break;
-+  case lldb_cs_x86_64:
-+    reg_value = (uint64_t)m_gpr_x86_64.regs[_REG_CS];
-+    break;
-+  case lldb_fs_x86_64:
-+    reg_value = (uint64_t)m_gpr_x86_64.regs[_REG_FS];
-+    break;
-+  case lldb_gs_x86_64:
-+    reg_value = (uint64_t)m_gpr_x86_64.regs[_REG_GS];
-+    break;
-+  case lldb_ss_x86_64:
-+    reg_value = (uint64_t)m_gpr_x86_64.regs[_REG_SS];
-+    break;
-+  case lldb_ds_x86_64:
-+    reg_value = (uint64_t)m_gpr_x86_64.regs[_REG_DS];
-+    break;
-+  case lldb_es_x86_64:
-+    reg_value = (uint64_t)m_gpr_x86_64.regs[_REG_ES];
-+    break;
-+  }
-+
-+  return error;
-+}
-+
-+Error NativeRegisterContextNetBSD_x86_64::WriteRegister(
-+    const RegisterInfo *reg_info, const RegisterValue &reg_value) {
-+
-+  Error error;
-+
-+  if (!reg_info) {
-+    error.SetErrorString("reg_info NULL");
-+    return error;
-+  }
-+
-+  const uint32_t reg = reg_info->kinds[lldb::eRegisterKindLLDB];
-+  if (reg == LLDB_INVALID_REGNUM) {
-+    // This is likely an internal register for lldb use only and should not be
-+    // directly queried.
-+    error.SetErrorStringWithFormat("register \"%s\" is an internal-only lldb "
-+                                   "register, cannot read directly",
-+                                   reg_info->name);
-+    return error;
-+  }
-+
-+  int set = GetSetForNativeRegNum(reg);
-+  if (set == -1) {
-+    // This is likely an internal register for lldb use only and should not be
-+    // directly queried.
-+    error.SetErrorStringWithFormat("register \"%s\" is in unrecognized set",
-+                                   reg_info->name);
-+    return error;
-+  }
-+
-+  if (ReadRegisterSet(set, false) != 0) {
-+    // This is likely an internal register for lldb use only and should not be
-+    // directly queried.
-+    error.SetErrorStringWithFormat("reading register set for register \"%s\" failed",
-+                                   reg_info->name);
-+    return error;
-+  }
-+
-+  switch (reg) {
-+  case lldb_rax_x86_64:
-+    m_gpr_x86_64.regs[_REG_RAX] = reg_value.GetAsUInt64();
-+    break;
-+  case lldb_rbx_x86_64:
-+    m_gpr_x86_64.regs[_REG_RBX] = reg_value.GetAsUInt64();
-+    break;
-+  case lldb_rcx_x86_64:
-+    m_gpr_x86_64.regs[_REG_RCX] = reg_value.GetAsUInt64();
-+    break;
-+  case lldb_rdx_x86_64:
-+    m_gpr_x86_64.regs[_REG_RDX] = reg_value.GetAsUInt64();
-+    break;
-+  case lldb_rdi_x86_64:
-+    m_gpr_x86_64.regs[_REG_RDI] = reg_value.GetAsUInt64();
-+    break;
-+  case lldb_rsi_x86_64:
-+    m_gpr_x86_64.regs[_REG_RSI] = reg_value.GetAsUInt64();
-+    break;
-+  case lldb_rbp_x86_64:
-+    m_gpr_x86_64.regs[_REG_RBP] = reg_value.GetAsUInt64();
-+    break;
-+  case lldb_rsp_x86_64:
-+    m_gpr_x86_64.regs[_REG_RSP] = reg_value.GetAsUInt64();
-+    break;
-+  case lldb_r8_x86_64:
-+    m_gpr_x86_64.regs[_REG_R8] = reg_value.GetAsUInt64();
-+    break;
-+  case lldb_r9_x86_64:
-+    m_gpr_x86_64.regs[_REG_R9] = reg_value.GetAsUInt64();
-+    break;
-+  case lldb_r10_x86_64:
-+    m_gpr_x86_64.regs[_REG_R10] = reg_value.GetAsUInt64();
-+    break;
-+  case lldb_r11_x86_64:
-+    m_gpr_x86_64.regs[_REG_R11] = reg_value.GetAsUInt64();
-+    break;
-+  case lldb_r12_x86_64:
-+    m_gpr_x86_64.regs[_REG_R12] = reg_value.GetAsUInt64();
-+    break;
-+  case lldb_r13_x86_64:
-+    m_gpr_x86_64.regs[_REG_R13] = reg_value.GetAsUInt64();
-+    break;
-+  case lldb_r14_x86_64:
-+    m_gpr_x86_64.regs[_REG_R14] = reg_value.GetAsUInt64();
-+    break;
-+  case lldb_r15_x86_64:
-+    m_gpr_x86_64.regs[_REG_R15] = reg_value.GetAsUInt64();
-+    break;
-+  case lldb_rip_x86_64:
-+    m_gpr_x86_64.regs[_REG_RIP] = reg_value.GetAsUInt64();
-+    break;
-+  case lldb_rflags_x86_64:
-+    m_gpr_x86_64.regs[_REG_RFLAGS] = reg_value.GetAsUInt64();
-+    break;
-+  case lldb_cs_x86_64:
-+    m_gpr_x86_64.regs[_REG_CS] = reg_value.GetAsUInt64();
-+    break;
-+  case lldb_fs_x86_64:
-+    m_gpr_x86_64.regs[_REG_FS] = reg_value.GetAsUInt64();
-+    break;
-+  case lldb_gs_x86_64:
-+    m_gpr_x86_64.regs[_REG_GS] = reg_value.GetAsUInt64();
-+    break;
-+  case lldb_ss_x86_64:
-+    m_gpr_x86_64.regs[_REG_SS] = reg_value.GetAsUInt64();
-+    break;
-+  case lldb_ds_x86_64:
-+    m_gpr_x86_64.regs[_REG_DS] = reg_value.GetAsUInt64();
-+    break;
-+  case lldb_es_x86_64:
-+    m_gpr_x86_64.regs[_REG_ES] = reg_value.GetAsUInt64();
-+    break;
-+  }
-+
-+  if (WriteRegisterSet(set) != 0)
-+    error.SetErrorStringWithFormat(
-+        "failed to write register set");
-+
-+  return error;
-+}
-+
-+Error NativeRegisterContextNetBSD_x86_64::ReadAllRegisterValues(
-+    lldb::DataBufferSP &data_sp) {
-+  Error error;
-+
-+  data_sp.reset(new DataBufferHeap(REG_CONTEXT_SIZE, 0));
-+  if (!data_sp) {
-+    error.SetErrorStringWithFormat(
-+        "failed to allocate DataBufferHeap instance of size %" PRIu64,
-+        REG_CONTEXT_SIZE);
-+    return error;
-+  }
-+
-+  error = ReadGPR();
-+  if (error.Fail())
-+    return error;
-+
-+  error = ReadFPR();
-+  if (error.Fail())
-+    return error;
-+
-+  uint8_t *dst = data_sp->GetBytes();
-+  if (dst == nullptr) {
-+    error.SetErrorStringWithFormat("DataBufferHeap instance of size %" PRIu64
-+                                   " returned a null pointer",
-+                                   REG_CONTEXT_SIZE);
-+    return error;
-+  }
-+
-+  ::memcpy(dst, &m_gpr_x86_64, GetRegisterInfoInterface().GetGPRSize());
-+  dst += GetRegisterInfoInterface().GetGPRSize();
-+
-+    RegisterValue value((uint64_t)-1);
-+  const RegisterInfo *reg_info =
-+      GetRegisterInfoInterface().GetDynamicRegisterInfo("orig_eax");
-+  if (reg_info == nullptr)
-+    reg_info = GetRegisterInfoInterface().GetDynamicRegisterInfo("orig_rax");
-+
-+  return error;
-+}
-+
-+Error NativeRegisterContextNetBSD_x86_64::WriteAllRegisterValues(
-+    const lldb::DataBufferSP &data_sp) {
-+  Error error;
-+
-+  if (!data_sp) {
-+    error.SetErrorStringWithFormat(
-+        "NativeRegisterContextNetBSD_x86_64::%s invalid data_sp provided",
-+        __FUNCTION__);
-+    return error;
-+  }
-+
-+  if (data_sp->GetByteSize() != REG_CONTEXT_SIZE) {
-+    error.SetErrorStringWithFormat(
-+        "NativeRegisterContextNetBSD_x86_64::%s data_sp contained mismatched "
-+        "data size, expected %" PRIu64 ", actual %" PRIu64,
-+        __FUNCTION__, REG_CONTEXT_SIZE, data_sp->GetByteSize());
-+    return error;
-+  }
-+
-+  uint8_t *src = data_sp->GetBytes();
-+  if (src == nullptr) {
-+    error.SetErrorStringWithFormat("NativeRegisterContextNetBSD_x86_64::%s "
-+                                   "DataBuffer::GetBytes() returned a null "
-+                                   "pointer",
-+                                   __FUNCTION__);
-+    return error;
-+  }
-+  ::memcpy(&m_gpr_x86_64, src, GetRegisterInfoInterface().GetGPRSize());
-+
-+  error = WriteGPR();
-+  if (error.Fail())
-+    return error;
-+
-+  src += GetRegisterInfoInterface().GetGPRSize();
-+
-+  error = WriteFPR();
-+  if (error.Fail())
-+    return error;
-+
-+  return error;
-+}
-+
-+#endif // defined(__x86_64__)
-+//===-- NativeRegisterContextNetBSD_x86_64.cpp ---------------*- C++ -*-===//
-+//
-+//                     The LLVM Compiler Infrastructure
-+//
-+// This file is distributed under the University of Illinois Open Source
-+// License. See LICENSE.TXT for details.
-+//
-+//===----------------------------------------------------------------------===//
-+
-+#if defined(__x86_64__)
-+
-+#include "NativeRegisterContextNetBSD_x86_64.h"
-+
- #include "lldb/Core/RegisterValue.h"
- #include "lldb/Host/HostInfo.h"
- #include "lldb/Utility/DataBufferHeap.h"
+   default:
+     break;
+   }
diff --git a/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD__x86__64.h b/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD__x86__64.h
index 179d85187a..8371e22c58 100644
--- a/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD__x86__64.h
+++ b/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD__x86__64.h
@@ -2,90 +2,20 @@ $NetBSD$
 
 --- source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.h.orig	2017-03-29 00:14:15.000000000 +0000
 +++ source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.h
-@@ -1,3 +1,86 @@
-+//===-- NativeRegisterContextNetBSD_x86_64.h ---------------------*- C++ -*-===//
-+//
-+//                     The LLVM Compiler Infrastructure
-+//
-+// This file is distributed under the University of Illinois Open Source
-+// License. See LICENSE.TXT for details.
-+//
-+//===----------------------------------------------------------------------===//
-+
-+#if defined(__x86_64__)
-+
-+#ifndef lldb_NativeRegisterContextNetBSD_x86_64_h
-+#define lldb_NativeRegisterContextNetBSD_x86_64_h
-+
-+#include <sys/param.h>
-+#include <sys/types.h>
-+#include <machine/reg.h>
-+
-+#include "Plugins/Process/NetBSD/NativeRegisterContextNetBSD.h"
-+#include "Plugins/Process/Utility/RegisterContext_x86.h"
-+#include "Plugins/Process/Utility/lldb-x86-register-enums.h"
-+
-+namespace lldb_private {
-+namespace process_netbsd {
-+
-+class NativeProcessNetBSD;
-+
-+class NativeRegisterContextNetBSD_x86_64 : public NativeRegisterContextNetBSD {
-+public:
-+  NativeRegisterContextNetBSD_x86_64(const ArchSpec &target_arch,
-+                                    NativeThreadProtocol &native_thread,
-+                                    uint32_t concrete_frame_idx);
-+
-+  uint32_t GetRegisterSetCount() const override;
-+
-+  const RegisterSet *GetRegisterSet(uint32_t set_index) const override;
-+
-+  Error ReadRegister(const RegisterInfo *reg_info,
-+                     RegisterValue &reg_value) override;
-+
-+  Error WriteRegister(const RegisterInfo *reg_info,
-+                      const RegisterValue &reg_value) override;
-+
-+  Error ReadAllRegisterValues(lldb::DataBufferSP &data_sp) override;
-+
-+  Error WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override;
-+
-+protected:
-+  void *GetGPRBuffer() override { return &m_gpr_x86_64; }
-+
+@@ -48,13 +48,15 @@ public:
+ 
+ protected:
+   void *GetGPRBuffer() override { return &m_gpr_x86_64; }
 +  void *GetFPRBuffer() override { return &m_fpr_x86_64; }
-+
-+  void *GetDBRBuffer() override { return &m_dr_x86_64; }
-+
-+  size_t GetFPRSize() override { return 0; }
-+
-+  Error ReadFPR() override { return Error(); }
-+
-+  Error WriteFPR() override { return Error(); }
-+
-+private:
-+  // Private member types.
-+  enum class RegSet { gpr, fpu, avx, mpx };
-+
-+  // Private member variables.
-+  struct reg m_gpr_x86_64;
+ 
+ private:
+   // Private member types.
+-  enum { GPRegSet };
++  enum { GPRegSet, FPRegSet };
+ 
+   // Private member variables.
+   struct reg m_gpr_x86_64;
 +  struct fpreg m_fpr_x86_64;
-+  struct dbreg m_dr_x86_64;
-+
-+  int GetSetForNativeRegNum(int reg_num) const;
-+
-+  enum { GPRegSet = 4, FPRegSet = 5, DBRegSet = 6 };
-+
-+  int ReadRegisterSet(uint32_t set, bool force);
-+  int WriteRegisterSet(uint32_t set);
-+};
-+
-+} // namespace process_netbsd
-+} // namespace lldb_private
-+
-+#endif // #ifndef lldb_NativeRegisterContextNetBSD_x86_64_h
-+
-+#endif // defined(__x86_64__)
- //===-- NativeRegisterContextNetBSD_x86_64.h --------------------*- C++ -*-===//
- //
- //                     The LLVM Compiler Infrastructure
+ 
+   int GetSetForNativeRegNum(int reg_num) const;
+ 
diff --git a/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.cpp b/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.cpp
new file mode 100644
index 0000000000..c7dc813376
--- /dev/null
+++ b/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.cpp
@@ -0,0 +1,35 @@
+$NetBSD$
+
+--- source/Plugins/Process/NetBSD/NativeThreadNetBSD.cpp.orig	2017-03-29 00:14:15.000000000 +0000
++++ source/Plugins/Process/NetBSD/NativeThreadNetBSD.cpp
+@@ -56,6 +56,18 @@ void NativeThreadNetBSD::SetStoppedByBre
+   m_stop_info.details.signal.signo = SIGTRAP;
+ }
+ 
++void NativeThreadNetBSD::SetStoppedByTrace() {
++  SetStopped();
++  m_stop_info.reason = StopReason::eStopReasonTrace;
++  m_stop_info.details.signal.signo = SIGTRAP;
++}
++
++void NativeThreadNetBSD::SetStoppedByExec() {
++  SetStopped();
++  m_stop_info.reason = StopReason::eStopReasonExec;
++  m_stop_info.details.signal.signo = SIGTRAP;
++}
++
+ void NativeThreadNetBSD::SetStopped() {
+   const StateType new_state = StateType::eStateStopped;
+   m_state = new_state;
+@@ -67,6 +79,11 @@ void NativeThreadNetBSD::SetRunning() {
+   m_stop_info.reason = StopReason::eStopReasonNone;
+ }
+ 
++void NativeThreadNetBSD::SetStepping() {
++  m_state = StateType::eStateStepping;
++  m_stop_info.reason = StopReason::eStopReasonNone;
++}
++
+ std::string NativeThreadNetBSD::GetName() { return std::string(""); }
+ 
+ lldb::StateType NativeThreadNetBSD::GetState() { return m_state; }
diff --git a/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.h b/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.h
new file mode 100644
index 0000000000..adb9a201db
--- /dev/null
+++ b/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.h
@@ -0,0 +1,16 @@
+$NetBSD$
+
+--- source/Plugins/Process/NetBSD/NativeThreadNetBSD.h.orig	2017-03-29 00:14:15.000000000 +0000
++++ source/Plugins/Process/NetBSD/NativeThreadNetBSD.h
+@@ -51,8 +51,11 @@ private:
+ 
+   void SetStoppedBySignal(uint32_t signo, const siginfo_t *info = nullptr);
+   void SetStoppedByBreakpoint();
++  void SetStoppedByTrace();
++  void SetStoppedByExec();
+   void SetStopped();
+   void SetRunning();
++  void SetStepping();
+ 
+   // ---------------------------------------------------------------------
+   // Member Variables



Home | Main Index | Thread Index | Old Index