pkgsrc-WIP-changes archive

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

lldb-netbsd: Preliminary code for PT_STEP/PT_CONTINUE, kill SI_KERNEL



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Sun Dec 18 02:15:38 2016 +0100
Changeset:	60ba5e7b799a14136e066133b885dff8afd727b9

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

Log Message:
lldb-netbsd: Preliminary code for PT_STEP/PT_CONTINUE, kill SI_KERNEL

Signal code SI_KERNEL is specific to Linux and FreeBSD.

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=60ba5e7b799a14136e066133b885dff8afd727b9

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

diffstat:
 lldb-netbsd/distinfo                                 |  2 +-
 ...rce_Plugins_Process_NetBSD_NativeThreadNetBSD.cpp | 20 +++++++-------------
 2 files changed, 8 insertions(+), 14 deletions(-)

diffs:
diff --git a/lldb-netbsd/distinfo b/lldb-netbsd/distinfo
index 7073785..1ee0e8f 100644
--- a/lldb-netbsd/distinfo
+++ b/lldb-netbsd/distinfo
@@ -24,7 +24,7 @@ SHA1 (patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD.cpp) = cf5
 SHA1 (patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD.h) = 558e8514b2a8f0595c0e375f308c53d8a9a6e9f1
 SHA1 (patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD__x86__64.cpp) = 601b30ba2a3af18b6a6e8045d5a00415990c0fb1
 SHA1 (patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD__x86__64.h) = b92d756199555c2ba890afa383808ec094266cf1
-SHA1 (patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.cpp) = 9beda569915c550be6a3369000aa3687e18ceedb
+SHA1 (patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.cpp) = b524655c71f19fe579b68d0fe4802d727518b57b
 SHA1 (patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.h) = 9ed9cd17600e661c7fc0e53a3ecb4db91fb62566
 SHA1 (patch-source_Plugins_Process_NetBSD_ProcFileReader.cpp) = dff1193e16aa79d8a577a3db4a9056521911d6f1
 SHA1 (patch-source_Plugins_Process_NetBSD_ProcFileReader.h) = c8393049c7303b466d3ce98ec5581a3155b71aff
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 40bc083..d270853 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	2016-12-17 13:23:23.784878149 +0000
 +++ source/Plugins/Process/NetBSD/NativeThreadNetBSD.cpp
-@@ -0,0 +1,429 @@
+@@ -0,0 +1,423 @@
 +//===-- NativeThreadNetBSD.cpp --------------------------------- -*- C++ -*-===//
 +//
 +//                     The LLVM Compiler Infrastructure
@@ -19,7 +19,6 @@ $NetBSD$
 +
 +#include "NativeProcessNetBSD.h"
 +#include "NativeRegisterContextNetBSD.h"
-+#include "SingleStepCheck.h"
 +
 +#include "lldb/Core/Log.h"
 +#include "lldb/Core/State.h"
@@ -221,8 +220,8 @@ $NetBSD$
 +  if (signo != LLDB_INVALID_SIGNAL_NUMBER)
 +    data = signo;
 +
-+  return NativeProcessNetBSD::PtraceWrapper(PTRACE_CONT, GetID(), nullptr,
-+                                           reinterpret_cast<void *>(data));
++  return NativeProcessNetBSD::PtraceWrapper(PT_CONTINUE, GetID(), (void *)1,
++                                           data);
 +}
 +
 +Error NativeThreadNetBSD::SingleStep(uint32_t signo) {
@@ -239,9 +238,9 @@ $NetBSD$
 +  // breakpoint on the
 +  // next instruction has been setup in NativeProcessNetBSD::Resume.
 +  return NativeProcessNetBSD::PtraceWrapper(
-+      GetProcess().SupportHardwareSingleStepping() ? PTRACE_SINGLESTEP
-+                                                   : PTRACE_CONT,
-+      m_tid, nullptr, reinterpret_cast<void *>(data));
++      GetProcess().SupportHardwareSingleStepping() ? PT_STEP
++                                                   : PT_CONTINUE,
++      GetID(), (void *)1, data);
 +}
 +
 +void NativeThreadNetBSD::SetStoppedBySignal(uint32_t signo,
@@ -263,10 +262,8 @@ $NetBSD$
 +    case SIGBUS:
 +    case SIGFPE:
 +    case SIGILL:
-+      // In case of MIPS64 target, SI_KERNEL is generated for invalid 64bit
-+      // address.
 +      const auto reason =
-+          (info->si_signo == SIGBUS && info->si_code == SI_KERNEL)
++          (info->si_signo == SIGBUS)
 +              ? CrashReason::eInvalidAddress
 +              : GetCrashReason(*info);
 +      m_stop_description = GetCrashReasonString(reason, *info);
@@ -290,9 +287,6 @@ $NetBSD$
 +}
 +
 +void NativeThreadNetBSD::SetStopped() {
-+  if (m_state == StateType::eStateStepping)
-+    MaybeCleanupSingleStepWorkaround();
-+
 +  const StateType new_state = StateType::eStateStopped;
 +  MaybeLogStateChange(new_state);
 +  m_state = new_state;


Home | Main Index | Thread Index | Old Index