pkgsrc-WIP-changes archive

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

lldb-netbsd: Resurrect NativeThreadNetBSD::GetRegisterContext



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Thu Mar 2 01:05:11 2017 +0100
Changeset:	329d9e27b8b8adb9887a80add866fdf28f7b1540

Modified Files:
	lldb-netbsd/distinfo
	lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.cpp

Log Message:
lldb-netbsd: Resurrect NativeThreadNetBSD::GetRegisterContext

TODO: Pass tracee's pid_t to NativeRegisterContextNetBSD.

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=329d9e27b8b8adb9887a80add866fdf28f7b1540

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

diffstat:
 lldb-netbsd/distinfo                               |  2 +-
 ...e_Plugins_Process_NetBSD_NativeThreadNetBSD.cpp | 22 ++++++++++++++++++++--
 2 files changed, 21 insertions(+), 3 deletions(-)

diffs:
diff --git a/lldb-netbsd/distinfo b/lldb-netbsd/distinfo
index 3447e5f16a..5e7a9d582a 100644
--- a/lldb-netbsd/distinfo
+++ b/lldb-netbsd/distinfo
@@ -29,6 +29,6 @@ SHA1 (patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD.cpp) = 2df
 SHA1 (patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD.h) = d7f77fcd065f608a87e724a850dacf4e3fd8d056
 SHA1 (patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD__x86__64.cpp) = a5db8c3cf6cd7157093bf77944722f88cbff6325
 SHA1 (patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD__x86__64.h) = 58803697f65411d1ad62e45c6af68c9271633bac
-SHA1 (patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.cpp) = 0985eaefb605c06185cc14fa1c02c0b9f8318472
+SHA1 (patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.cpp) = cb8757705327e62273bfe9a84dbdbf9cb9b0751a
 SHA1 (patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.h) = c675af8495a75f99bb60cb4ab3fa36223f1cb6f4
 SHA1 (patch-tools_lldb-server_CMakeLists.txt) = 9804b083a1aa0cb7fa06b840a71c28424ad8e01d
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 0c1c2176e6..913a53de2d 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,7 @@ $NetBSD$
 
 --- source/Plugins/Process/NetBSD/NativeThreadNetBSD.cpp.orig	2017-02-28 07:44:53.258980602 +0000
 +++ source/Plugins/Process/NetBSD/NativeThreadNetBSD.cpp
-@@ -0,0 +1,397 @@
+@@ -0,0 +1,415 @@
 +//===-- NativeThreadNetBSD.cpp --------------------------------- -*- C++ -*-===//
 +//
 +//                     The LLVM Compiler Infrastructure
@@ -13,6 +13,7 @@ $NetBSD$
 +//===----------------------------------------------------------------------===//
 +
 +#include "NativeThreadNetBSD.h"
++#include "NativeRegisterContextNetBSD.h"
 +
 +#include <signal.h>
 +#include <sstream>
@@ -138,7 +139,24 @@ $NetBSD$
 +}
 +
 +NativeRegisterContextSP NativeThreadNetBSD::GetRegisterContext() {
-+  return m_reg_context_sp; /* XXX: dummy */
++  // Return the register context if we already created it.
++  if (m_reg_context_sp)
++    return m_reg_context_sp;
++
++  NativeProcessProtocolSP m_process_sp = m_process_wp.lock();
++  if (!m_process_sp)
++    return NativeRegisterContextSP();
++
++  ArchSpec target_arch;
++  if (!m_process_sp->GetArchitecture(target_arch))
++    return NativeRegisterContextSP();
++
++  const uint32_t concrete_frame_idx = 0;
++  m_reg_context_sp.reset(
++      NativeRegisterContextNetBSD::CreateHostNativeRegisterContextNetBSD(
++          target_arch, *this, concrete_frame_idx));
++
++  return m_reg_context_sp;
 +}
 +
 +Error NativeThreadNetBSD::SetWatchpoint(lldb::addr_t addr, size_t size,


Home | Main Index | Thread Index | Old Index