pkgsrc-WIP-changes archive

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

lldb-netbsd: Implement partly functional SingleStepping



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Sat Jan 21 13:32:01 2017 +0100
Changeset:	4a0275d66c89cb2f10912027b3e737014a68bf0c

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

Log Message:
lldb-netbsd: Implement partly functional SingleStepping

Currently we can step the application, but it doesn't stop after each step.

For now it's good enough to move on.

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=4a0275d66c89cb2f10912027b3e737014a68bf0c

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

diffstat:
 lldb-netbsd/distinfo                                          |  6 +++---
 ...atch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp |  7 +++++--
 ...patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.cpp | 11 ++++++++++-
 .../patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.h  |  4 +++-
 4 files changed, 21 insertions(+), 7 deletions(-)

diffs:
diff --git a/lldb-netbsd/distinfo b/lldb-netbsd/distinfo
index 9e4dcdc..eb7eda0 100644
--- a/lldb-netbsd/distinfo
+++ b/lldb-netbsd/distinfo
@@ -28,10 +28,10 @@ SHA1 (patch-source_Plugins_Platform_NetBSD_PlatformNetBSD.cpp) = 129e853c1f93f06
 SHA1 (patch-source_Plugins_Platform_NetBSD_PlatformNetBSD.h) = 4327a21e79378b8f35adb07614adb41c37bbaf61
 SHA1 (patch-source_Plugins_Process_CMakeLists.txt) = c0168f81da56d9896eb414e6b8bb7262de04ac33
 SHA1 (patch-source_Plugins_Process_NetBSD_CMakeLists.txt) = df17afdf71c29d945c887e318718904793cd48ad
-SHA1 (patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp) = b5160a1d531cf5aeadccb88f73a9365bdddefc2c
+SHA1 (patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp) = 71a3255256a4001c2a40ebc91fe9880b17b4d804
 SHA1 (patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.h) = 3470c54fa069c9df8a70f08d49df319dece9e0c8
-SHA1 (patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.cpp) = a9352bd87a799fdeab544f66533911425765b337
-SHA1 (patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.h) = 2aab40efe7cb29133d08be927de1b58d7f3d3d48
+SHA1 (patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.cpp) = 74f1503d6e402b8429e0b523c394a0fc725f6c1b
+SHA1 (patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.h) = 52686c2b13e9de5be9818668750b27b5c37843a7
 SHA1 (patch-tools_lldb-mi_MICmnBase.cpp) = 851c82ac61e1241018755fbd7236af00379ac986
 SHA1 (patch-tools_lldb-mi_MICmnBase.h) = f550d5e10bcf02fb46472733acdbb820791f22e5
 SHA1 (patch-tools_lldb-mi_MIDriver.cpp) = bf1b5399e82bcfe54d6d852f64ed155328f2064d
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 085596f..68b6f5c 100644
--- a/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp
+++ b/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp
@@ -2,7 +2,7 @@ $NetBSD$
 
 --- source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp.orig	2017-01-20 20:30:48.330267591 +0000
 +++ source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp
-@@ -0,0 +1,1774 @@
+@@ -0,0 +1,1777 @@
 +//===-- NativeProcessNetBSD.cpp -------------------------------- -*- C++ -*-===//
 +//
 +//                     The LLVM Compiler Infrastructure
@@ -541,7 +541,10 @@ $NetBSD$
 +        printf("Breakpoint reported\n");
 +        break;
 +      case TRAP_TRACE:
-+        printf("Single step reported\n");
++        for (const auto &thread_sp : m_threads) {
++          static_pointer_cast<NativeThreadNetBSD>(thread_sp)->SetStoppedByTrace();
++        }
++        SetState(StateType::eStateStopped, true);
 +        break;
 +      case TRAP_EXEC:
 +        {
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 8492c25..d9ba8cb 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-01-20 20:30:48.343442890 +0000
 +++ source/Plugins/Process/NetBSD/NativeThreadNetBSD.cpp
-@@ -0,0 +1,373 @@
+@@ -0,0 +1,382 @@
 +//===-- NativeThreadNetBSD.cpp --------------------------------- -*- C++ -*-===//
 +//
 +//                     The LLVM Compiler Infrastructure
@@ -370,6 +370,15 @@ $NetBSD$
 +  m_stop_info.reason = StopReason::eStopReasonNone;
 +}
 +
++void NativeThreadNetBSD::SetStoppedByTrace() {
++  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_THREAD));
++  if (log)
++    log->Printf("NativeThreadNetBSD::%s()", __FUNCTION__);
++  SetStopped();
++  m_stop_info.reason = StopReason::eStopReasonTrace;
++  m_stop_info.details.signal.signo = SIGTRAP;
++}
++
 +NativeProcessNetBSD &NativeThreadNetBSD::GetProcess() {
 +  auto process_sp = std::static_pointer_cast<NativeProcessNetBSD>(
 +      NativeThreadProtocol::GetProcess());
diff --git a/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.h b/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.h
index cddb40f..57e3d48 100644
--- a/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.h
+++ b/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.h
@@ -2,7 +2,7 @@ $NetBSD$
 
 --- source/Plugins/Process/NetBSD/NativeThreadNetBSD.h.orig	2017-01-20 20:30:48.349697339 +0000
 +++ source/Plugins/Process/NetBSD/NativeThreadNetBSD.h
-@@ -0,0 +1,87 @@
+@@ -0,0 +1,89 @@
 +//===-- NativeThreadNetBSD.h ----------------------------------- -*- C++ -*-===//
 +//
 +//                     The LLVM Compiler Infrastructure
@@ -65,6 +65,8 @@ $NetBSD$
 +
 +  void SetStoppedByExec();
 +
++  void SetStoppedByTrace();
++
 +  void SetRunning();
 +
 +  void SetStepping();


Home | Main Index | Thread Index | Old Index