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

llvm-svn: 255592
This commit is contained in:
Kamil Rytarowski 2015-12-15 00:50:19 +00:00
parent 2bc6a5ad84
commit cec6b45aec
4 changed files with 69 additions and 1 deletions

View File

@ -9,6 +9,7 @@ add_lldb_library(lldbPluginProcessUtility
InferiorCallPOSIX.cpp
LinuxSignals.cpp
MipsLinuxSignals.cpp
NetBSDSignals.cpp
RegisterContextDarwin_arm.cpp
RegisterContextDarwin_arm64.cpp
RegisterContextDarwin_i386.cpp

View File

@ -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
}

View File

@ -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_

View File

@ -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>();
}