summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormortimer <mortimer@cvs.openbsd.org>2019-11-27 17:25:04 +0000
committermortimer <mortimer@cvs.openbsd.org>2019-11-27 17:25:04 +0000
commitef9bd43e529c1cca474c19812253e58b17eef098 (patch)
tree29b6380ce9fb2a3947f29cff43f73a2f86dbe85d
parent23fa7691a08fcff69bf86782f0c272a355eae83a (diff)
In lldb, use a OpenBSD signal map instead of leveraging the FreeBSD one.
ok kettenis@
-rw-r--r--gnu/llvm/tools/lldb/source/Plugins/Process/Utility/CMakeLists.txt7
-rw-r--r--gnu/llvm/tools/lldb/source/Plugins/Process/Utility/OpenBSDSignals.cpp23
-rw-r--r--gnu/llvm/tools/lldb/source/Plugins/Process/Utility/OpenBSDSignals.h27
-rw-r--r--gnu/llvm/tools/lldb/source/Target/UnixSignals.cpp21
-rw-r--r--gnu/usr.bin/clang/liblldbPluginProcess/Makefile3
5 files changed, 65 insertions, 16 deletions
diff --git a/gnu/llvm/tools/lldb/source/Plugins/Process/Utility/CMakeLists.txt b/gnu/llvm/tools/lldb/source/Plugins/Process/Utility/CMakeLists.txt
index bda0ad626f6..b3d2850238d 100644
--- a/gnu/llvm/tools/lldb/source/Plugins/Process/Utility/CMakeLists.txt
+++ b/gnu/llvm/tools/lldb/source/Plugins/Process/Utility/CMakeLists.txt
@@ -1,5 +1,3 @@
-include_directories(../../../Utility/)
-
add_lldb_library(lldbPluginProcessUtility PLUGIN
DynamicRegisterInfo.cpp
FreeBSDSignals.cpp
@@ -7,10 +5,12 @@ add_lldb_library(lldbPluginProcessUtility PLUGIN
HistoryThread.cpp
HistoryUnwind.cpp
InferiorCallPOSIX.cpp
+ LinuxProcMaps.cpp
LinuxSignals.cpp
MipsLinuxSignals.cpp
NativeRegisterContextRegisterInfo.cpp
NetBSDSignals.cpp
+ OpenBSDSignals.cpp
RegisterContextDarwin_arm.cpp
RegisterContextDarwin_arm64.cpp
RegisterContextDarwin_i386.cpp
@@ -39,11 +39,13 @@ add_lldb_library(lldbPluginProcessUtility PLUGIN
RegisterContextPOSIX_arm64.cpp
RegisterContextPOSIX_mips64.cpp
RegisterContextPOSIX_powerpc.cpp
+ RegisterContextPOSIX_ppc64le.cpp
RegisterContextPOSIX_s390x.cpp
RegisterContextPOSIX_x86.cpp
RegisterContextThreadMemory.cpp
RegisterInfoPOSIX_arm.cpp
RegisterInfoPOSIX_arm64.cpp
+ RegisterInfoPOSIX_ppc64le.cpp
StopInfoMachException.cpp
ThreadMemory.cpp
UnwindLLDB.cpp
@@ -58,7 +60,6 @@ add_lldb_library(lldbPluginProcessUtility PLUGIN
lldbSymbol
lldbTarget
lldbUtility
- lldbPluginProcessElfCore
LINK_COMPONENTS
Support
)
diff --git a/gnu/llvm/tools/lldb/source/Plugins/Process/Utility/OpenBSDSignals.cpp b/gnu/llvm/tools/lldb/source/Plugins/Process/Utility/OpenBSDSignals.cpp
new file mode 100644
index 00000000000..4340de47a91
--- /dev/null
+++ b/gnu/llvm/tools/lldb/source/Plugins/Process/Utility/OpenBSDSignals.cpp
@@ -0,0 +1,23 @@
+//===-- OpenBSDSignals.cpp --------------------------------------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "OpenBSDSignals.h"
+
+using namespace lldb_private;
+
+OpenBSDSignals::OpenBSDSignals() : UnixSignals() { Reset(); }
+
+void OpenBSDSignals::Reset() {
+ UnixSignals::Reset();
+
+ // SIGNO NAME SUPPRESS STOP NOTIFY DESCRIPTION
+ // ====== ============ ======== ====== ======
+ // ===================================================
+ AddSignal(32, "SIGTHR", false, false, false, "thread library AST");
+}
diff --git a/gnu/llvm/tools/lldb/source/Plugins/Process/Utility/OpenBSDSignals.h b/gnu/llvm/tools/lldb/source/Plugins/Process/Utility/OpenBSDSignals.h
new file mode 100644
index 00000000000..d4234b0a584
--- /dev/null
+++ b/gnu/llvm/tools/lldb/source/Plugins/Process/Utility/OpenBSDSignals.h
@@ -0,0 +1,27 @@
+//===-- OpenBSDSignals.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_OpenBSDSignals_H_
+#define liblldb_OpenBSDSignals_H_
+
+#include "lldb/Target/UnixSignals.h"
+
+namespace lldb_private {
+
+class OpenBSDSignals : public UnixSignals {
+public:
+ OpenBSDSignals();
+
+private:
+ void Reset() override;
+};
+
+} // namespace lldb_private
+
+#endif // liblldb_OpenBSDSignals_H_
diff --git a/gnu/llvm/tools/lldb/source/Target/UnixSignals.cpp b/gnu/llvm/tools/lldb/source/Target/UnixSignals.cpp
index a4ec32bd007..db5ac5dc3bd 100644
--- a/gnu/llvm/tools/lldb/source/Target/UnixSignals.cpp
+++ b/gnu/llvm/tools/lldb/source/Target/UnixSignals.cpp
@@ -7,17 +7,14 @@
//
//===----------------------------------------------------------------------===//
-// C Includes
-// C++ Includes
-// Other libraries and framework includes
-// Project includes
#include "lldb/Target/UnixSignals.h"
#include "Plugins/Process/Utility/FreeBSDSignals.h"
#include "Plugins/Process/Utility/LinuxSignals.h"
#include "Plugins/Process/Utility/MipsLinuxSignals.h"
#include "Plugins/Process/Utility/NetBSDSignals.h"
-#include "lldb/Core/ArchSpec.h"
+#include "Plugins/Process/Utility/OpenBSDSignals.h"
#include "lldb/Host/StringConvert.h"
+#include "lldb/Utility/ArchSpec.h"
using namespace lldb_private;
@@ -46,8 +43,9 @@ lldb::UnixSignalsSP UnixSignals::Create(const ArchSpec &arch) {
}
}
case llvm::Triple::FreeBSD:
- case llvm::Triple::OpenBSD:
return std::make_shared<FreeBSDSignals>();
+ case llvm::Triple::OpenBSD:
+ return std::make_shared<OpenBSDSignals>();
case llvm::Triple::NetBSD:
return std::make_shared<NetBSDSignals>();
default:
@@ -66,9 +64,8 @@ UnixSignals::~UnixSignals() = default;
void UnixSignals::Reset() {
// This builds one standard set of Unix Signals. If yours aren't quite in
- // this
- // order, you can either subclass this class, and use Add & Remove to change
- // them
+ // this order, you can either subclass this class, and use Add & Remove to
+ // change them
// or you can subclass and build them afresh in your constructor;
//
// Note: the signals below are the Darwin signals. Do not change these!
@@ -89,7 +86,7 @@ void UnixSignals::Reset() {
AddSignal(10, "SIGBUS", false, true, true, "bus error");
AddSignal(11, "SIGSEGV", false, true, true, "segmentation violation");
AddSignal(12, "SIGSYS", false, true, true, "bad argument to system call");
- AddSignal(13, "SIGPIPE", false, true, true,
+ AddSignal(13, "SIGPIPE", false, false, false,
"write on a pipe with no one to read it");
AddSignal(14, "SIGALRM", false, false, false, "alarm clock");
AddSignal(15, "SIGTERM", false, true, true,
@@ -306,8 +303,8 @@ UnixSignals::GetFilteredSignals(llvm::Optional<bool> should_suppress,
bool signal_notify = false;
GetSignalInfo(signo, signal_suppress, signal_stop, signal_notify);
- // If any of filtering conditions are not met,
- // we move on to the next signal.
+ // If any of filtering conditions are not met, we move on to the next
+ // signal.
if (should_suppress.hasValue() &&
signal_suppress != should_suppress.getValue())
continue;
diff --git a/gnu/usr.bin/clang/liblldbPluginProcess/Makefile b/gnu/usr.bin/clang/liblldbPluginProcess/Makefile
index acbb117b1d1..6754da12412 100644
--- a/gnu/usr.bin/clang/liblldbPluginProcess/Makefile
+++ b/gnu/usr.bin/clang/liblldbPluginProcess/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.4 2019/11/09 16:45:48 mortimer Exp $
+# $OpenBSD: Makefile,v 1.5 2019/11/27 17:25:03 mortimer Exp $
LIB= lldbPluginProcess
NOPIC=
@@ -33,6 +33,7 @@ SRCS= CrashReason.cpp \
NativeRegisterContextRegisterInfo.cpp \
NativeThreadOpenBSD.cpp \
NetBSDSignals.cpp \
+ OpenBSDSignals.cpp \
ProcessElfCore.cpp \
ProcessGDBRemote.cpp \
ProcessGDBRemoteLog.cpp \