summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp')
-rw-r--r--lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
index 0dfee5ef473..6f3aa685e65 100644
--- a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
+++ b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
@@ -657,6 +657,17 @@ namespace
m_error.SetErrorString("failed to get architecture");
}
}
+#elif defined (__mips__)
+ elf_gregset_t regs;
+ PTRACE(PTRACE_GETREGS, m_tid, NULL, &regs, sizeof regs, m_error);
+ if (m_error.Success())
+ {
+ lldb_private::ArchSpec arch;
+ if (monitor->GetArchitecture(arch))
+ m_value.SetBytes((void *)(((unsigned char *)(regs)) + m_offset), 8, arch.GetByteOrder());
+ else
+ m_error.SetErrorString("failed to get architecture");
+ }
#else
Log *log (ProcessPOSIXLog::GetLogIfAllCategoriesSet (POSIX_LOG_REGISTERS));
@@ -733,6 +744,14 @@ namespace
PTRACE(PTRACE_SETREGSET, m_tid, &regset, &ioVec, sizeof regs, m_error);
}
}
+#elif defined (__mips__)
+ elf_gregset_t regs;
+ PTRACE(PTRACE_GETREGS, m_tid, NULL, &regs, sizeof regs, m_error);
+ if (m_error.Success())
+ {
+ ::memcpy((void *)(((unsigned char *)(&regs)) + m_offset), m_value.GetBytes(), 8);
+ PTRACE(PTRACE_SETREGS, m_tid, NULL, &regs, sizeof regs, m_error);
+ }
#else
void* buf;
Log *log (ProcessPOSIXLog::GetLogIfAllCategoriesSet (POSIX_LOG_REGISTERS));
OpenPOWER on IntegriCloud