Index: source/Plugins/Process/Linux/NativeProcessLinux.cpp =================================================================== --- source/Plugins/Process/Linux/NativeProcessLinux.cpp +++ source/Plugins/Process/Linux/NativeProcessLinux.cpp @@ -659,14 +659,14 @@ m_error.SetErrorString("failed to get architecture"); } } -#elif defined (__mips__) +#elif defined (__mips__) || defined (__arm__) elf_gregset_t regs; PTRACE(PTRACE_GETREGS, m_tid, NULL, ®s, 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()); + m_value.SetBytes((void *)(((unsigned char *)(regs)) + m_offset), arch.GetAddressByteSize(), arch.GetByteOrder()); else m_error.SetErrorString("failed to get architecture"); } @@ -746,13 +746,19 @@ PTRACE(PTRACE_SETREGSET, m_tid, ®set, &ioVec, sizeof regs, m_error); } } -#elif defined (__mips__) +#elif defined (__mips__) || defined (__arm__) elf_gregset_t regs; PTRACE(PTRACE_GETREGS, m_tid, NULL, ®s, sizeof regs, m_error); if (m_error.Success()) { - ::memcpy((void *)(((unsigned char *)(®s)) + m_offset), m_value.GetBytes(), 8); - PTRACE(PTRACE_SETREGS, m_tid, NULL, ®s, sizeof regs, m_error); + lldb_private::ArchSpec arch; + if (monitor->GetArchitecture(arch)) + { + ::memcpy((void *)(((unsigned char *)(®s)) + m_offset), m_value.GetBytes(), arch.GetAddressByteSize()); + PTRACE(PTRACE_SETREGS, m_tid, NULL, ®s, sizeof regs, m_error); + } + else + m_error.SetErrorString("failed to get architecture"); } #else void* buf;