[Lldb-commits] [lldb] r255592 - Welcome to NetBSD signals
Kamil Rytarowski via lldb-commits
lldb-commits at lists.llvm.org
Mon Dec 14 16:50:19 PST 2015
Author: kamil
Date: Mon Dec 14 18:50:19 2015
New Revision: 255592
URL: http://llvm.org/viewvc/llvm-project?rev=255592&view=rev
Log:
Welcome to NetBSD signals
Summary:
Signals 1-32 are matching the default UNIX platform.
There are platform specific ones above 32.
>From the `/usr/include/sys/signal.h` header:
```
#define SIGPWR 32 /* power fail/restart (not reset when caught) */
#ifdef _KERNEL
#define SIGRTMIN 33 /* Kernel only; not exposed to userland yet */
#define SIGRTMAX 63 /* Kernel only; not exposed to userland yet */
#endif
```
Reviewers: emaste, joerg
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D15482
Added:
lldb/trunk/source/Plugins/Process/Utility/NetBSDSignals.cpp
lldb/trunk/source/Plugins/Process/Utility/NetBSDSignals.h
Modified:
lldb/trunk/source/Plugins/Process/Utility/CMakeLists.txt
lldb/trunk/source/Target/UnixSignals.cpp
Modified: lldb/trunk/source/Plugins/Process/Utility/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/CMakeLists.txt?rev=255592&r1=255591&r2=255592&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/CMakeLists.txt (original)
+++ lldb/trunk/source/Plugins/Process/Utility/CMakeLists.txt Mon Dec 14 18:50:19 2015
@@ -9,6 +9,7 @@ add_lldb_library(lldbPluginProcessUtilit
InferiorCallPOSIX.cpp
LinuxSignals.cpp
MipsLinuxSignals.cpp
+ NetBSDSignals.cpp
RegisterContextDarwin_arm.cpp
RegisterContextDarwin_arm64.cpp
RegisterContextDarwin_i386.cpp
Added: lldb/trunk/source/Plugins/Process/Utility/NetBSDSignals.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/NetBSDSignals.cpp?rev=255592&view=auto
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/NetBSDSignals.cpp (added)
+++ lldb/trunk/source/Plugins/Process/Utility/NetBSDSignals.cpp Mon Dec 14 18:50:19 2015
@@ -0,0 +1,34 @@
+//===-- NetBSDSignals.cpp --------------------------------------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// C Includes
+// C++ Includes
+// Other libraries and framework includes
+// Project includes
+#include "NetBSDSignals.h"
+
+using namespace lldb_private;
+
+NetBSDSignals::NetBSDSignals()
+ : UnixSignals()
+{
+ Reset();
+}
+
+void
+NetBSDSignals::Reset()
+{
+ UnixSignals::Reset();
+ // SIGNO NAME SUPPRESS STOP NOTIFY DESCRIPTION
+ // ====== ============ ======== ====== ====== ===================================================
+ AddSignal (32, "SIGPWR", false, true , true , "power fail/restart (not reset when caught)");
+#ifdef SIGRTMIN /* SIGRTMAX */
+ /* Kernel only; not exposed to userland yet */
+#endif
+}
Added: lldb/trunk/source/Plugins/Process/Utility/NetBSDSignals.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/NetBSDSignals.h?rev=255592&view=auto
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/NetBSDSignals.h (added)
+++ lldb/trunk/source/Plugins/Process/Utility/NetBSDSignals.h Mon Dec 14 18:50:19 2015
@@ -0,0 +1,31 @@
+//===-- NetBSDSignals.h ----------------------------------------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef liblldb_NetBSDSignals_H_
+#define liblldb_NetBSDSignals_H_
+
+// Project includes
+#include "lldb/Target/UnixSignals.h"
+
+namespace lldb_private {
+
+/// NetBSD specific set of Unix signals.
+class NetBSDSignals : public UnixSignals
+{
+public:
+ NetBSDSignals();
+
+private:
+ void
+ Reset() override;
+};
+
+} // namespace lldb_private
+
+#endif // liblldb_NetBSDSignals_H_
Modified: lldb/trunk/source/Target/UnixSignals.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/UnixSignals.cpp?rev=255592&r1=255591&r2=255592&view=diff
==============================================================================
--- lldb/trunk/source/Target/UnixSignals.cpp (original)
+++ lldb/trunk/source/Target/UnixSignals.cpp Mon Dec 14 18:50:19 2015
@@ -19,6 +19,7 @@
#include "Plugins/Process/Utility/FreeBSDSignals.h"
#include "Plugins/Process/Utility/LinuxSignals.h"
#include "Plugins/Process/Utility/MipsLinuxSignals.h"
+#include "Plugins/Process/Utility/NetBSDSignals.h"
using namespace lldb_private;
@@ -63,8 +64,9 @@ UnixSignals::Create(const ArchSpec &arch
}
case llvm::Triple::FreeBSD:
case llvm::Triple::OpenBSD:
- case llvm::Triple::NetBSD:
return std::make_shared<FreeBSDSignals>();
+ case llvm::Triple::NetBSD:
+ return std::make_shared<NetBSDSignals>();
default:
return std::make_shared<UnixSignals>();
}
More information about the lldb-commits
mailing list