summaryrefslogtreecommitdiffstats
path: root/lldb/source/Host/linux/Host.cpp
diff options
context:
space:
mode:
authorMohit K. Bhakkad <mohit.bhakkad@gmail.com>2015-06-10 10:02:21 +0000
committerMohit K. Bhakkad <mohit.bhakkad@gmail.com>2015-06-10 10:02:21 +0000
commit056c45a4a1ca505b5458a42516bd0e20a4f039c5 (patch)
treef5d6d0c06891b48d37bc7ec57460559b2f77bc9d /lldb/source/Host/linux/Host.cpp
parent11ca263994f20678fc30c7f18f4768d13390b5e4 (diff)
downloadbcm5719-llvm-056c45a4a1ca505b5458a42516bd0e20a4f039c5.tar.gz
bcm5719-llvm-056c45a4a1ca505b5458a42516bd0e20a4f039c5.zip
[LLDB][MIPS] Getting correct signals for MIPS Host
Patch by Nitesh Jain Reviewers: clayborg, ovyalov. Subscribers: jaydeep, bhushan, dsanders, mohit.bhakkad, sagar, labath, lldb-commits. Differential Revision: http://reviews.llvm.org/D10180 llvm-svn: 239463
Diffstat (limited to 'lldb/source/Host/linux/Host.cpp')
-rw-r--r--lldb/source/Host/linux/Host.cpp19
1 files changed, 16 insertions, 3 deletions
diff --git a/lldb/source/Host/linux/Host.cpp b/lldb/source/Host/linux/Host.cpp
index 98b08d0927f..dddd2f3e89d 100644
--- a/lldb/source/Host/linux/Host.cpp
+++ b/lldb/source/Host/linux/Host.cpp
@@ -37,7 +37,7 @@
#include "lldb/Symbol/ObjectFile.h"
#include "Plugins/Process/Linux/ProcFileReader.h"
#include "Plugins/Process/Utility/LinuxSignals.h"
-
+#include "Plugins/Process/Utility/MipsLinuxSignals.h"
using namespace lldb;
using namespace lldb_private;
@@ -390,11 +390,24 @@ Host::GetEnvironment (StringList &env)
return i;
}
+// TODO: Generalize this with a function Host::GetSignals() as discussed at http://reviews.llvm.org/D10180
const lldb_private::UnixSignalsSP&
Host::GetUnixSignals ()
{
- static const lldb_private::UnixSignalsSP s_unix_signals_sp (new process_linux::LinuxSignals ());
- return s_unix_signals_sp;
+ ArchSpec target_arch = HostInfoBase::GetArchitecture();
+ if(target_arch.GetTriple ().getArch () == llvm::Triple::mips64 ||
+ target_arch.GetTriple ().getArch () == llvm::Triple::mips64el ||
+ target_arch.GetTriple ().getArch () == llvm::Triple::mips ||
+ target_arch.GetTriple ().getArch () == llvm::Triple::mipsel) {
+ static const lldb_private::UnixSignalsSP s_unix_signals_sp (new process_linux::MipsLinuxSignals ());
+ return s_unix_signals_sp;
+ }
+ else
+ {
+ static const lldb_private::UnixSignalsSP s_unix_signals_sp (new process_linux::LinuxSignals ());
+ return s_unix_signals_sp;
+ }
+
}
Error
OpenPOWER on IntegriCloud