Skip to content

Commit

Permalink
lldb-netbsd: Support LWP termination events
Browse files Browse the repository at this point in the history
Sponsored by <The NetBSD Foundation>
  • Loading branch information
krytarowski committed Jan 21, 2017
1 parent 7aab540 commit 31a00d3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lldb-netbsd/distinfo
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ 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) = 14ab4de34f904bc3d7965dfd2554021fa83209ac
SHA1 (patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp) = 82352e295c00c6fe810aa88e9b92eea556adf544
SHA1 (patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.h) = bdd9fe37e47de8fa626c7eacf81e07d47a76787c
SHA1 (patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.cpp) = 9fd955c9d472531e2d6293d0fa4ff237af4be405
SHA1 (patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.h) = 52686c2b13e9de5be9818668750b27b5c37843a7
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

--- source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp.orig 2017-01-20 20:30:48.330267591 +0000
+++ source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp
@@ -0,0 +1,1375 @@
@@ -0,0 +1,1384 @@
+//===-- NativeProcessNetBSD.cpp -------------------------------- -*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
Expand Down Expand Up @@ -600,8 +600,17 @@
+ }
+ // _lwp_exit(2)
+ if ((state.pe_report_event & PTRACE_LWP_EXIT) != 0)
+ printf("LWP terminated reported\n");
+ for (size_t i; i < m_threads.size(); i++) {
+ if (static_pointer_cast<NativeThreadNetBSD>(m_threads[i])->GetID() == state.pe_lwp) {
+ m_threads.erase(m_threads.begin() + i);
+ break;
+ }
+ }
+ for (const auto &thread_sp : m_threads) {
+ static_pointer_cast<NativeThreadNetBSD>(thread_sp)->SetStoppedBySignal(info.psi_siginfo.si_signo, &info.psi_siginfo);
+ }
+ }
+ SetState(StateType::eStateStopped, true);
+ break;
+ case TRAP_HWWPT:
+ printf("hw watchpoint reported\n");
Expand Down

0 comments on commit 31a00d3

Please sign in to comment.