diff options
author | Nitesh Jain <nitesh.jain@imgtec.com> | 2016-10-12 10:21:09 +0000 |
---|---|---|
committer | Nitesh Jain <nitesh.jain@imgtec.com> | 2016-10-12 10:21:09 +0000 |
commit | 8999edf2f69029246971265f4e0128e0a4d6d725 (patch) | |
tree | 83a572e99b810c43db6e633bff646bcb7a750daa /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp | |
parent | fd0d7b21e0b974dcb8ee6257ae4ef4fa7398e80b (diff) | |
download | bcm5719-llvm-8999edf2f69029246971265f4e0128e0a4d6d725.tar.gz bcm5719-llvm-8999edf2f69029246971265f4e0128e0a4d6d725.zip |
[LLDB][MIPS] Fix qProcessInfo to return correct pointer size based on ELF ABI
Reviewers: clayborg, labath
Subscribers: jaydeep, bhushan, slthakur, lldb-commits
Differential Revision: https://reviews.llvm.org/D25021
llvm-svn: 284001
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp index 9dfb47d1a76..7c46c21261d 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp @@ -1262,13 +1262,12 @@ void GDBRemoteCommunicationServerCommon:: // Nothing. break; } - - if (proc_triple.isArch64Bit()) - response.PutCString("ptrsize:8;"); - else if (proc_triple.isArch32Bit()) - response.PutCString("ptrsize:4;"); - else if (proc_triple.isArch16Bit()) - response.PutCString("ptrsize:2;"); + // In case of MIPS64, pointer size is depend on ELF ABI + // For N32 the pointer size is 4 and for N64 it is 8 + std::string abi = proc_arch.GetTargetABI(); + if (!abi.empty()) + response.Printf("elf_abi:%s;", abi.c_str()); + response.Printf("ptrsize:%d;", proc_arch.GetAddressByteSize()); } } |