summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Platform
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>2014-02-13 07:11:08 +0000
committerJason Molenda <jmolenda@apple.com>2014-02-13 07:11:08 +0000
commit6223db27780ec34421fa9b22f44119aae68e1024 (patch)
treea369dd864c36569fe97cf706d35afc8aa2abbee3 /lldb/source/Plugins/Platform
parent69e245c01d0dcbaeb9b0fc6c502729acbf12f3fc (diff)
downloadbcm5719-llvm-6223db27780ec34421fa9b22f44119aae68e1024.tar.gz
bcm5719-llvm-6223db27780ec34421fa9b22f44119aae68e1024.zip
The Platform base class now maintains a list of trap handlers
aka asynchronous signal handlers, which subclasses should fill in as appropriate. For most Unix user process environments, the one entry in this list is _sigtramp. For bare-board and kernel environments, there will be different sets of trap handlers. The unwinder needs to know when a frame is a trap handler because the rules it enforces for the frame "above" the trap handler is different from most middle-of-the-stack frames. <rdar://problem/15835846> llvm-svn: 201300
Diffstat (limited to 'lldb/source/Plugins/Platform')
-rw-r--r--lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp4
-rw-r--r--lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp1
-rw-r--r--lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp1
-rw-r--r--lldb/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp2
-rw-r--r--lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp1
-rw-r--r--lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp1
6 files changed, 9 insertions, 1 deletions
diff --git a/lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp b/lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp
index a10c04f60b0..1ebb1435d8e 100644
--- a/lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp
+++ b/lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp
@@ -142,8 +142,10 @@ PlatformFreeBSD::Terminate ()
/// Default Constructor
//------------------------------------------------------------------
PlatformFreeBSD::PlatformFreeBSD (bool is_host) :
-Platform(is_host)
+Platform(is_host),
+m_remote_platform_sp()
{
+ m_trap_handlers.push_back (ConstString ("_sigtramp"));
}
//------------------------------------------------------------------
diff --git a/lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp b/lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp
index c30211c886a..3e42b6adb42 100644
--- a/lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp
+++ b/lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp
@@ -307,6 +307,7 @@ PlatformLinux::PlatformLinux (bool is_host) :
Platform(is_host), // This is the local host platform
m_remote_platform_sp ()
{
+ m_trap_handlers.push_back (ConstString ("_sigtramp"));
}
//------------------------------------------------------------------
diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
index 0f3833841f9..ff4e23596d8 100644
--- a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
+++ b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
@@ -40,6 +40,7 @@ PlatformDarwin::PlatformDarwin (bool is_host) :
PlatformPOSIX(is_host), // This is the local host platform
m_developer_directory ()
{
+ m_trap_handlers.push_back (ConstString ("_sigtramp"));
}
//------------------------------------------------------------------
diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp
index 5e5a8aad465..6378f1a9ef8 100644
--- a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp
+++ b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp
@@ -257,6 +257,8 @@ PlatformDarwinKernel::PlatformDarwinKernel (lldb_private::LazyBool is_ios_debug_
{
SearchForKexts ();
}
+ m_trap_handlers.push_back(ConstString ("trap_from_kernel"));
+ m_trap_handlers.push_back(ConstString ("hndl_double_fault"));
}
//------------------------------------------------------------------
diff --git a/lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp b/lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp
index b5f92dcc3dc..b9bf255f3d5 100644
--- a/lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp
+++ b/lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp
@@ -32,6 +32,7 @@ PlatformPOSIX::PlatformPOSIX (bool is_host) :
Platform(is_host), // This is the local host platform
m_remote_platform_sp ()
{
+ m_trap_handlers.push_back (ConstString ("_sigtramp"));
}
//------------------------------------------------------------------
diff --git a/lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp b/lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
index 80421ad8b24..3b283625448 100644
--- a/lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
+++ b/lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
@@ -135,6 +135,7 @@ PlatformRemoteGDBServer::PlatformRemoteGDBServer () :
Platform(false), // This is a remote platform
m_gdb_client(true)
{
+ m_trap_handlers.push_back (ConstString ("_sigtramp"));
}
//------------------------------------------------------------------
OpenPOWER on IntegriCloud