xiaobai created this revision.
xiaobai added reviewers: compnerd, JDevlieghere, labath, clayborg, davide.
Herald added subscribers: atanasyan, mgorny, sdardis, emaste.
Herald added a reviewer: jfb.
I plan on setting up a plugin architecture for UnixSignals since I
don't think it makes sense for UnixSignals to know about all the
platform-specific signal classes. The first step is to organize the directories
in a way that makes this easier to do.
https://reviews.llvm.org/D63363
Files:
source/Plugins/CMakeLists.txt
source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h
source/Plugins/Process/Utility/CMakeLists.txt
source/Plugins/Process/Utility/FreeBSDSignals.cpp
source/Plugins/Process/Utility/FreeBSDSignals.h
source/Plugins/Process/Utility/GDBRemoteSignals.cpp
source/Plugins/Process/Utility/GDBRemoteSignals.h
source/Plugins/Process/Utility/LinuxSignals.cpp
source/Plugins/Process/Utility/LinuxSignals.h
source/Plugins/Process/Utility/MipsLinuxSignals.cpp
source/Plugins/Process/Utility/MipsLinuxSignals.h
source/Plugins/Process/Utility/NetBSDSignals.cpp
source/Plugins/Process/Utility/NetBSDSignals.h
source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
source/Plugins/Signals/CMakeLists.txt
source/Plugins/Signals/FreeBSD/CMakeLists.txt
source/Plugins/Signals/FreeBSD/FreeBSDSignals.cpp
source/Plugins/Signals/FreeBSD/FreeBSDSignals.h
source/Plugins/Signals/GDBRemote/CMakeLists.txt
source/Plugins/Signals/GDBRemote/GDBRemoteSignals.cpp
source/Plugins/Signals/GDBRemote/GDBRemoteSignals.h
source/Plugins/Signals/Linux/CMakeLists.txt
source/Plugins/Signals/Linux/LinuxSignals.cpp
source/Plugins/Signals/Linux/LinuxSignals.h
source/Plugins/Signals/Linux/MipsLinuxSignals.cpp
source/Plugins/Signals/Linux/MipsLinuxSignals.h
source/Plugins/Signals/NetBSD/CMakeLists.txt
source/Plugins/Signals/NetBSD/NetBSDSignals.cpp
source/Plugins/Signals/NetBSD/NetBSDSignals.h
source/Target/CMakeLists.txt
source/Target/UnixSignals.cpp
Index: source/Target/UnixSignals.cpp
===================================================================
--- source/Target/UnixSignals.cpp
+++ source/Target/UnixSignals.cpp
@@ -7,10 +7,10 @@
//===----------------------------------------------------------------------===//
#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 "Plugins/Signals/FreeBSD/FreeBSDSignals.h"
+#include "Plugins/Signals/Linux/LinuxSignals.h"
+#include "Plugins/Signals/Linux/MipsLinuxSignals.h"
+#include "Plugins/Signals/NetBSD/NetBSDSignals.h"
#include "lldb/Host/HostInfo.h"
#include "lldb/Host/StringConvert.h"
#include "lldb/Utility/ArchSpec.h"
Index: source/Target/CMakeLists.txt
===================================================================
--- source/Target/CMakeLists.txt
+++ source/Target/CMakeLists.txt
@@ -68,6 +68,9 @@
lldbUtility
lldbPluginExpressionParserClang
lldbPluginProcessUtility
+ lldbPluginSignalsFreeBSD
+ lldbPluginSignalsLinux
+ lldbPluginSignalsNetBSD
LINK_COMPONENTS
Support
Index: source/Plugins/Process/Utility/NetBSDSignals.h
===================================================================
--- /dev/null
+++ source/Plugins/Process/Utility/NetBSDSignals.h
@@ -1,27 +0,0 @@
-//===-- NetBSDSignals.h ----------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef liblldb_NetBSDSignals_H_
-#define liblldb_NetBSDSignals_H_
-
-#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_
Index: source/Plugins/Process/Utility/NetBSDSignals.cpp
===================================================================
--- /dev/null
+++ source/Plugins/Process/Utility/NetBSDSignals.cpp
@@ -1,53 +0,0 @@
-//===-- NetBSDSignals.cpp --------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#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)");
- AddSignal(33, "SIGRTMIN", false, false, false, "real time signal 0");
- AddSignal(34, "SIGRTMIN+1", false, false, false, "real time signal 1");
- AddSignal(35, "SIGRTMIN+2", false, false, false, "real time signal 2");
- AddSignal(36, "SIGRTMIN+3", false, false, false, "real time signal 3");
- AddSignal(37, "SIGRTMIN+4", false, false, false, "real time signal 4");
- AddSignal(38, "SIGRTMIN+5", false, false, false, "real time signal 5");
- AddSignal(39, "SIGRTMIN+6", false, false, false, "real time signal 6");
- AddSignal(40, "SIGRTMIN+7", false, false, false, "real time signal 7");
- AddSignal(41, "SIGRTMIN+8", false, false, false, "real time signal 8");
- AddSignal(42, "SIGRTMIN+9", false, false, false, "real time signal 9");
- AddSignal(43, "SIGRTMIN+10", false, false, false, "real time signal 10");
- AddSignal(44, "SIGRTMIN+11", false, false, false, "real time signal 11");
- AddSignal(45, "SIGRTMIN+12", false, false, false, "real time signal 12");
- AddSignal(46, "SIGRTMIN+13", false, false, false, "real time signal 13");
- AddSignal(47, "SIGRTMIN+14", false, false, false, "real time signal 14");
- AddSignal(48, "SIGRTMIN+15", false, false, false, "real time signal 15");
- AddSignal(49, "SIGRTMIN-14", false, false, false, "real time signal 16");
- AddSignal(50, "SIGRTMAX-13", false, false, false, "real time signal 17");
- AddSignal(51, "SIGRTMAX-12", false, false, false, "real time signal 18");
- AddSignal(52, "SIGRTMAX-11", false, false, false, "real time signal 19");
- AddSignal(53, "SIGRTMAX-10", false, false, false, "real time signal 20");
- AddSignal(54, "SIGRTMAX-9", false, false, false, "real time signal 21");
- AddSignal(55, "SIGRTMAX-8", false, false, false, "real time signal 22");
- AddSignal(56, "SIGRTMAX-7", false, false, false, "real time signal 23");
- AddSignal(57, "SIGRTMAX-6", false, false, false, "real time signal 24");
- AddSignal(58, "SIGRTMAX-5", false, false, false, "real time signal 25");
- AddSignal(59, "SIGRTMAX-4", false, false, false, "real time signal 26");
- AddSignal(60, "SIGRTMAX-3", false, false, false, "real time signal 27");
- AddSignal(61, "SIGRTMAX-2", false, false, false, "real time signal 28");
- AddSignal(62, "SIGRTMAX-1", false, false, false, "real time signal 29");
- AddSignal(63, "SIGRTMAX", false, false, false, "real time signal 30");
-}
Index: source/Plugins/Signals/NetBSD/CMakeLists.txt
===================================================================
--- /dev/null
+++ source/Plugins/Signals/NetBSD/CMakeLists.txt
@@ -0,0 +1,6 @@
+add_lldb_library(lldbPluginSignalsNetBSD PLUGIN
+ NetBSDSignals.cpp
+
+ LINK_LIBS
+ lldbTarget
+)
Index: source/Plugins/Process/Utility/MipsLinuxSignals.h
===================================================================
--- /dev/null
+++ source/Plugins/Process/Utility/MipsLinuxSignals.h
@@ -1,28 +0,0 @@
-//===-- MipsLinuxSignals.h ------------------------------------------*- C++
-//-*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef liblldb_MipsLinuxSignals_H_
-#define liblldb_MipsLinuxSignals_H_
-
-#include "lldb/Target/UnixSignals.h"
-
-namespace lldb_private {
-
-/// Linux specific set of Unix signals.
-class MipsLinuxSignals : public UnixSignals {
-public:
- MipsLinuxSignals();
-
-private:
- void Reset() override;
-};
-
-} // namespace lldb_private
-
-#endif // liblldb_MipsLinuxSignals_H_
Index: source/Plugins/Process/Utility/MipsLinuxSignals.cpp
===================================================================
--- /dev/null
+++ source/Plugins/Process/Utility/MipsLinuxSignals.cpp
@@ -1,93 +0,0 @@
-//===-- MipsLinuxSignals.cpp ----------------------------------------*- C++
-//-*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "MipsLinuxSignals.h"
-
-using namespace lldb_private;
-
-MipsLinuxSignals::MipsLinuxSignals() : UnixSignals() { Reset(); }
-
-void MipsLinuxSignals::Reset() {
- m_signals.clear();
- // SIGNO NAME SUPPRESS STOP NOTIFY DESCRIPTION ALIAS
- // ===== =========== ======== ===== ======
- // ====================================== ========
- AddSignal(1, "SIGHUP", false, true, true, "hangup");
- AddSignal(2, "SIGINT", true, true, true, "interrupt");
- AddSignal(3, "SIGQUIT", false, true, true, "quit");
- AddSignal(4, "SIGILL", false, true, true, "illegal instruction");
- AddSignal(5, "SIGTRAP", true, true, true,
- "trace trap (not reset when caught)");
- AddSignal(6, "SIGABRT", false, true, true, "abort()/IOT trap", "SIGIOT");
- AddSignal(7, "SIGEMT", false, true, true, "terminate process with core dump");
- AddSignal(8, "SIGFPE", false, true, true, "floating point exception");
- AddSignal(9, "SIGKILL", false, true, true, "kill");
- AddSignal(10, "SIGBUS", false, true, true, "bus error");
- AddSignal(11, "SIGSEGV", false, true, true, "segmentation violation");
- AddSignal(12, "SIGSYS", false, true, true, "invalid system call");
- AddSignal(13, "SIGPIPE", false, true, true,
- "write to pipe with reading end closed");
- AddSignal(14, "SIGALRM", false, false, false, "alarm");
- AddSignal(15, "SIGTERM", false, true, true, "termination requested");
- AddSignal(16, "SIGUSR1", false, true, true, "user defined signal 1");
- AddSignal(17, "SIGUSR2", false, true, true, "user defined signal 2");
- AddSignal(18, "SIGCHLD", false, false, true, "child status has changed",
- "SIGCLD");
- AddSignal(19, "SIGPWR", false, true, true, "power failure");
- AddSignal(20, "SIGWINCH", false, true, true, "window size changes");
- AddSignal(21, "SIGURG", false, true, true, "urgent data on socket");
- AddSignal(22, "SIGIO", false, true, true, "input/output ready/Pollable event",
- "SIGPOLL");
- AddSignal(23, "SIGSTOP", true, true, true, "process stop");
- AddSignal(24, "SIGTSTP", false, true, true, "tty stop");
- AddSignal(25, "SIGCONT", false, true, true, "process continue");
- AddSignal(26, "SIGTTIN", false, true, true, "background tty read");
- AddSignal(27, "SIGTTOU", false, true, true, "background tty write");
- AddSignal(28, "SIGVTALRM", false, true, true, "virtual time alarm");
- AddSignal(29, "SIGPROF", false, false, false, "profiling time alarm");
- AddSignal(30, "SIGXCPU", false, true, true, "CPU resource exceeded");
- AddSignal(31, "SIGXFSZ", false, true, true, "file size limit exceeded");
- AddSignal(32, "SIG32", false, false, false,
- "threading library internal signal 1");
- AddSignal(33, "SIG33", false, false, false,
- "threading library internal signal 2");
- AddSignal(34, "SIGRTMIN", false, false, false, "real time signal 0");
- AddSignal(35, "SIGRTMIN+1", false, false, false, "real time signal 1");
- AddSignal(36, "SIGRTMIN+2", false, false, false, "real time signal 2");
- AddSignal(37, "SIGRTMIN+3", false, false, false, "real time signal 3");
- AddSignal(38, "SIGRTMIN+4", false, false, false, "real time signal 4");
- AddSignal(39, "SIGRTMIN+5", false, false, false, "real time signal 5");
- AddSignal(40, "SIGRTMIN+6", false, false, false, "real time signal 6");
- AddSignal(41, "SIGRTMIN+7", false, false, false, "real time signal 7");
- AddSignal(42, "SIGRTMIN+8", false, false, false, "real time signal 8");
- AddSignal(43, "SIGRTMIN+9", false, false, false, "real time signal 9");
- AddSignal(44, "SIGRTMIN+10", false, false, false, "real time signal 10");
- AddSignal(45, "SIGRTMIN+11", false, false, false, "real time signal 11");
- AddSignal(46, "SIGRTMIN+12", false, false, false, "real time signal 12");
- AddSignal(47, "SIGRTMIN+13", false, false, false, "real time signal 13");
- AddSignal(48, "SIGRTMIN+14", false, false, false, "real time signal 14");
- AddSignal(49, "SIGRTMIN+15", false, false, false, "real time signal 15");
- AddSignal(50, "SIGRTMAX-14", false, false, false,
- "real time signal 16"); // switching to SIGRTMAX-xxx to match "kill
- // -l" output
- AddSignal(51, "SIGRTMAX-13", false, false, false, "real time signal 17");
- AddSignal(52, "SIGRTMAX-12", false, false, false, "real time signal 18");
- AddSignal(53, "SIGRTMAX-11", false, false, false, "real time signal 19");
- AddSignal(54, "SIGRTMAX-10", false, false, false, "real time signal 20");
- AddSignal(55, "SIGRTMAX-9", false, false, false, "real time signal 21");
- AddSignal(56, "SIGRTMAX-8", false, false, false, "real time signal 22");
- AddSignal(57, "SIGRTMAX-7", false, false, false, "real time signal 23");
- AddSignal(58, "SIGRTMAX-6", false, false, false, "real time signal 24");
- AddSignal(59, "SIGRTMAX-5", false, false, false, "real time signal 25");
- AddSignal(60, "SIGRTMAX-4", false, false, false, "real time signal 26");
- AddSignal(61, "SIGRTMAX-3", false, false, false, "real time signal 27");
- AddSignal(62, "SIGRTMAX-2", false, false, false, "real time signal 28");
- AddSignal(63, "SIGRTMAX-1", false, false, false, "real time signal 29");
- AddSignal(64, "SIGRTMAX", false, false, false, "real time signal 30");
-}
Index: source/Plugins/Process/Utility/LinuxSignals.h
===================================================================
--- /dev/null
+++ source/Plugins/Process/Utility/LinuxSignals.h
@@ -1,27 +0,0 @@
-//===-- LinuxSignals.h ------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef liblldb_LinuxSignals_H_
-#define liblldb_LinuxSignals_H_
-
-#include "lldb/Target/UnixSignals.h"
-
-namespace lldb_private {
-
-/// Linux specific set of Unix signals.
-class LinuxSignals : public UnixSignals {
-public:
- LinuxSignals();
-
-private:
- void Reset() override;
-};
-
-} // namespace lldb_private
-
-#endif // liblldb_LinuxSignals_H_
Index: source/Plugins/Process/Utility/LinuxSignals.cpp
===================================================================
--- /dev/null
+++ source/Plugins/Process/Utility/LinuxSignals.cpp
@@ -1,92 +0,0 @@
-//===-- LinuxSignals.cpp ----------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "LinuxSignals.h"
-
-using namespace lldb_private;
-
-LinuxSignals::LinuxSignals() : UnixSignals() { Reset(); }
-
-void LinuxSignals::Reset() {
- m_signals.clear();
- // SIGNO NAME SUPPRESS STOP NOTIFY DESCRIPTION ALIAS
- // ===== =========== ======== ===== ======
- // ====================================== ======
- AddSignal(1, "SIGHUP", false, true, true, "hangup");
- AddSignal(2, "SIGINT", true, true, true, "interrupt");
- AddSignal(3, "SIGQUIT", false, true, true, "quit");
- AddSignal(4, "SIGILL", false, true, true, "illegal instruction");
- AddSignal(5, "SIGTRAP", true, true, true,
- "trace trap (not reset when caught)");
- AddSignal(6, "SIGABRT", false, true, true, "abort()/IOT trap", "SIGIOT");
- AddSignal(7, "SIGBUS", false, true, true, "bus error");
- AddSignal(8, "SIGFPE", false, true, true, "floating point exception");
- AddSignal(9, "SIGKILL", false, true, true, "kill");
- AddSignal(10, "SIGUSR1", false, true, true, "user defined signal 1");
- AddSignal(11, "SIGSEGV", false, true, true, "segmentation violation");
- AddSignal(12, "SIGUSR2", false, true, true, "user defined signal 2");
- AddSignal(13, "SIGPIPE", false, true, true,
- "write to pipe with reading end closed");
- AddSignal(14, "SIGALRM", false, false, false, "alarm");
- AddSignal(15, "SIGTERM", false, true, true, "termination requested");
- AddSignal(16, "SIGSTKFLT", false, true, true, "stack fault");
- AddSignal(17, "SIGCHLD", false, false, true, "child status has changed",
- "SIGCLD");
- AddSignal(18, "SIGCONT", false, true, true, "process continue");
- AddSignal(19, "SIGSTOP", true, true, true, "process stop");
- AddSignal(20, "SIGTSTP", false, true, true, "tty stop");
- AddSignal(21, "SIGTTIN", false, true, true, "background tty read");
- AddSignal(22, "SIGTTOU", false, true, true, "background tty write");
- AddSignal(23, "SIGURG", false, true, true, "urgent data on socket");
- AddSignal(24, "SIGXCPU", false, true, true, "CPU resource exceeded");
- AddSignal(25, "SIGXFSZ", false, true, true, "file size limit exceeded");
- AddSignal(26, "SIGVTALRM", false, true, true, "virtual time alarm");
- AddSignal(27, "SIGPROF", false, false, false, "profiling time alarm");
- AddSignal(28, "SIGWINCH", false, true, true, "window size changes");
- AddSignal(29, "SIGIO", false, true, true, "input/output ready/Pollable event",
- "SIGPOLL");
- AddSignal(30, "SIGPWR", false, true, true, "power failure");
- AddSignal(31, "SIGSYS", false, true, true, "invalid system call");
- AddSignal(32, "SIG32", false, false, false,
- "threading library internal signal 1");
- AddSignal(33, "SIG33", false, false, false,
- "threading library internal signal 2");
- AddSignal(34, "SIGRTMIN", false, false, false, "real time signal 0");
- AddSignal(35, "SIGRTMIN+1", false, false, false, "real time signal 1");
- AddSignal(36, "SIGRTMIN+2", false, false, false, "real time signal 2");
- AddSignal(37, "SIGRTMIN+3", false, false, false, "real time signal 3");
- AddSignal(38, "SIGRTMIN+4", false, false, false, "real time signal 4");
- AddSignal(39, "SIGRTMIN+5", false, false, false, "real time signal 5");
- AddSignal(40, "SIGRTMIN+6", false, false, false, "real time signal 6");
- AddSignal(41, "SIGRTMIN+7", false, false, false, "real time signal 7");
- AddSignal(42, "SIGRTMIN+8", false, false, false, "real time signal 8");
- AddSignal(43, "SIGRTMIN+9", false, false, false, "real time signal 9");
- AddSignal(44, "SIGRTMIN+10", false, false, false, "real time signal 10");
- AddSignal(45, "SIGRTMIN+11", false, false, false, "real time signal 11");
- AddSignal(46, "SIGRTMIN+12", false, false, false, "real time signal 12");
- AddSignal(47, "SIGRTMIN+13", false, false, false, "real time signal 13");
- AddSignal(48, "SIGRTMIN+14", false, false, false, "real time signal 14");
- AddSignal(49, "SIGRTMIN+15", false, false, false, "real time signal 15");
- AddSignal(50, "SIGRTMAX-14", false, false, false,
- "real time signal 16"); // switching to SIGRTMAX-xxx to match "kill
- // -l" output
- AddSignal(51, "SIGRTMAX-13", false, false, false, "real time signal 17");
- AddSignal(52, "SIGRTMAX-12", false, false, false, "real time signal 18");
- AddSignal(53, "SIGRTMAX-11", false, false, false, "real time signal 19");
- AddSignal(54, "SIGRTMAX-10", false, false, false, "real time signal 20");
- AddSignal(55, "SIGRTMAX-9", false, false, false, "real time signal 21");
- AddSignal(56, "SIGRTMAX-8", false, false, false, "real time signal 22");
- AddSignal(57, "SIGRTMAX-7", false, false, false, "real time signal 23");
- AddSignal(58, "SIGRTMAX-6", false, false, false, "real time signal 24");
- AddSignal(59, "SIGRTMAX-5", false, false, false, "real time signal 25");
- AddSignal(60, "SIGRTMAX-4", false, false, false, "real time signal 26");
- AddSignal(61, "SIGRTMAX-3", false, false, false, "real time signal 27");
- AddSignal(62, "SIGRTMAX-2", false, false, false, "real time signal 28");
- AddSignal(63, "SIGRTMAX-1", false, false, false, "real time signal 29");
- AddSignal(64, "SIGRTMAX", false, false, false, "real time signal 30");
-}
Index: source/Plugins/Signals/Linux/CMakeLists.txt
===================================================================
--- /dev/null
+++ source/Plugins/Signals/Linux/CMakeLists.txt
@@ -0,0 +1,7 @@
+add_lldb_library(lldbPluginSignalsLinux PLUGIN
+ LinuxSignals.cpp
+ MipsLinuxSignals.cpp
+
+ LINK_LIBS
+ lldbTarget
+)
Index: source/Plugins/Process/Utility/GDBRemoteSignals.h
===================================================================
--- /dev/null
+++ source/Plugins/Process/Utility/GDBRemoteSignals.h
@@ -1,29 +0,0 @@
-//===-- GDBRemoteSignals.h --------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef liblldb_GDBRemoteSignals_H_
-#define liblldb_GDBRemoteSignals_H_
-
-#include "lldb/Target/UnixSignals.h"
-
-namespace lldb_private {
-
-/// Empty set of Unix signals to be filled by PlatformRemoteGDBServer
-class GDBRemoteSignals : public UnixSignals {
-public:
- GDBRemoteSignals();
-
- GDBRemoteSignals(const lldb::UnixSignalsSP &rhs);
-
-private:
- void Reset() override;
-};
-
-} // namespace lldb_private
-
-#endif // liblldb_GDBRemoteSignals_H_
Index: source/Plugins/Process/Utility/GDBRemoteSignals.cpp
===================================================================
--- /dev/null
+++ source/Plugins/Process/Utility/GDBRemoteSignals.cpp
@@ -1,18 +0,0 @@
-//===-- GDBRemoteSignals.cpp ------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "GDBRemoteSignals.h"
-
-using namespace lldb_private;
-
-GDBRemoteSignals::GDBRemoteSignals() : UnixSignals() { Reset(); }
-
-GDBRemoteSignals::GDBRemoteSignals(const lldb::UnixSignalsSP &rhs)
- : UnixSignals(*rhs) {}
-
-void GDBRemoteSignals::Reset() { m_signals.clear(); }
Index: source/Plugins/Signals/GDBRemote/CMakeLists.txt
===================================================================
--- /dev/null
+++ source/Plugins/Signals/GDBRemote/CMakeLists.txt
@@ -0,0 +1,6 @@
+add_lldb_library(lldbPluginSignalsGDBRemote PLUGIN
+ GDBRemoteSignals.cpp
+
+ LINK_LIBS
+ lldbTarget
+)
Index: source/Plugins/Process/Utility/FreeBSDSignals.h
===================================================================
--- /dev/null
+++ source/Plugins/Process/Utility/FreeBSDSignals.h
@@ -1,27 +0,0 @@
-//===-- FreeBSDSignals.h ----------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef liblldb_FreeBSDSignals_H_
-#define liblldb_FreeBSDSignals_H_
-
-#include "lldb/Target/UnixSignals.h"
-
-namespace lldb_private {
-
-/// FreeBSD specific set of Unix signals.
-class FreeBSDSignals : public UnixSignals {
-public:
- FreeBSDSignals();
-
-private:
- void Reset() override;
-};
-
-} // namespace lldb_private
-
-#endif // liblldb_FreeBSDSignals_H_
Index: source/Plugins/Process/Utility/FreeBSDSignals.cpp
===================================================================
--- /dev/null
+++ source/Plugins/Process/Utility/FreeBSDSignals.cpp
@@ -1,86 +0,0 @@
-//===-- FreeBSDSignals.cpp --------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "FreeBSDSignals.h"
-
-using namespace lldb_private;
-
-FreeBSDSignals::FreeBSDSignals() : UnixSignals() { Reset(); }
-
-void FreeBSDSignals::Reset() {
- UnixSignals::Reset();
-
- // SIGNO NAME SUPPRESS STOP NOTIFY DESCRIPTION
- // ====== ============ ======== ====== ======
- // ===================================================
- AddSignal(32, "SIGTHR", false, false, false, "thread interrupt");
- AddSignal(33, "SIGLIBRT", false, false, false,
- "reserved by real-time library");
- AddSignal(65, "SIGRTMIN", false, false, false, "real time signal 0");
- AddSignal(66, "SIGRTMIN+1", false, false, false, "real time signal 1");
- AddSignal(67, "SIGRTMIN+2", false, false, false, "real time signal 2");
- AddSignal(68, "SIGRTMIN+3", false, false, false, "real time signal 3");
- AddSignal(69, "SIGRTMIN+4", false, false, false, "real time signal 4");
- AddSignal(70, "SIGRTMIN+5", false, false, false, "real time signal 5");
- AddSignal(71, "SIGRTMIN+6", false, false, false, "real time signal 6");
- AddSignal(72, "SIGRTMIN+7", false, false, false, "real time signal 7");
- AddSignal(73, "SIGRTMIN+8", false, false, false, "real time signal 8");
- AddSignal(74, "SIGRTMIN+9", false, false, false, "real time signal 9");
- AddSignal(75, "SIGRTMIN+10", false, false, false, "real time signal 10");
- AddSignal(76, "SIGRTMIN+11", false, false, false, "real time signal 11");
- AddSignal(77, "SIGRTMIN+12", false, false, false, "real time signal 12");
- AddSignal(78, "SIGRTMIN+13", false, false, false, "real time signal 13");
- AddSignal(79, "SIGRTMIN+14", false, false, false, "real time signal 14");
- AddSignal(80, "SIGRTMIN+15", false, false, false, "real time signal 15");
- AddSignal(81, "SIGRTMIN+16", false, false, false, "real time signal 16");
- AddSignal(82, "SIGRTMIN+17", false, false, false, "real time signal 17");
- AddSignal(83, "SIGRTMIN+18", false, false, false, "real time signal 18");
- AddSignal(84, "SIGRTMIN+19", false, false, false, "real time signal 19");
- AddSignal(85, "SIGRTMIN+20", false, false, false, "real time signal 20");
- AddSignal(86, "SIGRTMIN+21", false, false, false, "real time signal 21");
- AddSignal(87, "SIGRTMIN+22", false, false, false, "real time signal 22");
- AddSignal(88, "SIGRTMIN+23", false, false, false, "real time signal 23");
- AddSignal(89, "SIGRTMIN+24", false, false, false, "real time signal 24");
- AddSignal(90, "SIGRTMIN+25", false, false, false, "real time signal 25");
- AddSignal(91, "SIGRTMIN+26", false, false, false, "real time signal 26");
- AddSignal(92, "SIGRTMIN+27", false, false, false, "real time signal 27");
- AddSignal(93, "SIGRTMIN+28", false, false, false, "real time signal 28");
- AddSignal(94, "SIGRTMIN+29", false, false, false, "real time signal 29");
- AddSignal(95, "SIGRTMIN+30", false, false, false, "real time signal 30");
- AddSignal(96, "SIGRTMAX-30", false, false, false, "real time signal 31");
- AddSignal(97, "SIGRTMAX-29", false, false, false, "real time signal 32");
- AddSignal(98, "SIGRTMAX-28", false, false, false, "real time signal 33");
- AddSignal(99, "SIGRTMAX-27", false, false, false, "real time signal 34");
- AddSignal(100, "SIGRTMAX-26", false, false, false, "real time signal 35");
- AddSignal(101, "SIGRTMAX-25", false, false, false, "real time signal 36");
- AddSignal(102, "SIGRTMAX-24", false, false, false, "real time signal 37");
- AddSignal(103, "SIGRTMAX-23", false, false, false, "real time signal 38");
- AddSignal(104, "SIGRTMAX-22", false, false, false, "real time signal 39");
- AddSignal(105, "SIGRTMAX-21", false, false, false, "real time signal 40");
- AddSignal(106, "SIGRTMAX-20", false, false, false, "real time signal 41");
- AddSignal(107, "SIGRTMAX-19", false, false, false, "real time signal 42");
- AddSignal(108, "SIGRTMAX-18", false, false, false, "real time signal 43");
- AddSignal(109, "SIGRTMAX-17", false, false, false, "real time signal 44");
- AddSignal(110, "SIGRTMAX-16", false, false, false, "real time signal 45");
- AddSignal(111, "SIGRTMAX-15", false, false, false, "real time signal 46");
- AddSignal(112, "SIGRTMAX-14", false, false, false, "real time signal 47");
- AddSignal(113, "SIGRTMAX-13", false, false, false, "real time signal 48");
- AddSignal(114, "SIGRTMAX-12", false, false, false, "real time signal 49");
- AddSignal(115, "SIGRTMAX-11", false, false, false, "real time signal 50");
- AddSignal(116, "SIGRTMAX-10", false, false, false, "real time signal 51");
- AddSignal(117, "SIGRTMAX-9", false, false, false, "real time signal 52");
- AddSignal(118, "SIGRTMAX-8", false, false, false, "real time signal 53");
- AddSignal(119, "SIGRTMAX-7", false, false, false, "real time signal 54");
- AddSignal(120, "SIGRTMAX-6", false, false, false, "real time signal 55");
- AddSignal(121, "SIGRTMAX-5", false, false, false, "real time signal 56");
- AddSignal(122, "SIGRTMAX-4", false, false, false, "real time signal 57");
- AddSignal(123, "SIGRTMAX-3", false, false, false, "real time signal 58");
- AddSignal(124, "SIGRTMAX-2", false, false, false, "real time signal 59");
- AddSignal(125, "SIGRTMAX-1", false, false, false, "real time signal 60");
- AddSignal(126, "SIGRTMAX", false, false, false, "real time signal 61");
-}
Index: source/Plugins/Signals/FreeBSD/CMakeLists.txt
===================================================================
--- /dev/null
+++ source/Plugins/Signals/FreeBSD/CMakeLists.txt
@@ -0,0 +1,6 @@
+add_lldb_library(lldbPluginSignalsFreeBSD PLUGIN
+ FreeBSDSignals.cpp
+
+ LINK_LIBS
+ lldbTarget
+)
Index: source/Plugins/Signals/CMakeLists.txt
===================================================================
--- /dev/null
+++ source/Plugins/Signals/CMakeLists.txt
@@ -0,0 +1,4 @@
+add_subdirectory(FreeBSD)
+add_subdirectory(GDBRemote)
+add_subdirectory(Linux)
+add_subdirectory(NetBSD)
Index: source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
===================================================================
--- source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -72,7 +72,7 @@
#include "GDBRemoteRegisterContext.h"
#include "Plugins/Platform/MacOSX/PlatformRemoteiOS.h"
-#include "Plugins/Process/Utility/GDBRemoteSignals.h"
+#include "Plugins/Signals/GDBRemote/GDBRemoteSignals.h"
#include "Plugins/Process/Utility/InferiorCallPOSIX.h"
#include "Plugins/Process/Utility/StopInfoMachException.h"
#include "ProcessGDBRemote.h"
Index: source/Plugins/Process/Utility/CMakeLists.txt
===================================================================
--- source/Plugins/Process/Utility/CMakeLists.txt
+++ source/Plugins/Process/Utility/CMakeLists.txt
@@ -1,16 +1,11 @@
add_lldb_library(lldbPluginProcessUtility PLUGIN
AuxVector.cpp
DynamicRegisterInfo.cpp
- FreeBSDSignals.cpp
- GDBRemoteSignals.cpp
HistoryThread.cpp
HistoryUnwind.cpp
InferiorCallPOSIX.cpp
LinuxProcMaps.cpp
- LinuxSignals.cpp
- MipsLinuxSignals.cpp
NativeRegisterContextRegisterInfo.cpp
- NetBSDSignals.cpp
RegisterContextDarwin_arm.cpp
RegisterContextDarwin_arm64.cpp
RegisterContextDarwin_i386.cpp
Index: source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h
===================================================================
--- source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h
+++ source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h
@@ -13,7 +13,6 @@
#include <string>
#include "Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h"
-#include "Plugins/Process/Utility/GDBRemoteSignals.h"
#include "lldb/Target/Platform.h"
namespace lldb_private {
Index: source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
===================================================================
--- source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
+++ source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
@@ -29,7 +29,7 @@
#include "lldb/Utility/StreamString.h"
#include "lldb/Utility/UriParser.h"
-#include "Plugins/Process/Utility/GDBRemoteSignals.h"
+#include "Plugins/Signals/GDBRemote/GDBRemoteSignals.h"
using namespace lldb;
using namespace lldb_private;
Index: source/Plugins/CMakeLists.txt
===================================================================
--- source/Plugins/CMakeLists.txt
+++ source/Plugins/CMakeLists.txt
@@ -14,6 +14,7 @@
add_subdirectory(OperatingSystem)
add_subdirectory(Platform)
add_subdirectory(Process)
+add_subdirectory(Signals)
add_subdirectory(ScriptInterpreter)
add_subdirectory(StructuredData)
add_subdirectory(SymbolFile)
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits