aboutsummaryrefslogtreecommitdiff
path: root/source/Plugins/Process/gdb-remote
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2016-11-25 19:15:31 +0000
committerDimitry Andric <dim@FreeBSD.org>2016-11-25 19:15:31 +0000
commit4ee8c119c71a06dcad1e0fecc8c675e480e59337 (patch)
treed0b329e28aa1f4a0fc00c9763bcb3b2f5bf505ea /source/Plugins/Process/gdb-remote
parent3b6b9a026ed26abe3a3f1470da00ae1f478c4aca (diff)
downloadsrc-4ee8c119c71a06dcad1e0fecc8c675e480e59337.tar.gz
src-4ee8c119c71a06dcad1e0fecc8c675e480e59337.zip
Notes
Notes: svn path=/vendor/lldb/dist/; revision=309164 svn path=/vendor/lldb/lldb-release_391-r289601/; revision=310167; tag=vendor/lldb/lldb-release_391-r289601
Diffstat (limited to 'source/Plugins/Process/gdb-remote')
-rw-r--r--source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp7
-rw-r--r--source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp12
2 files changed, 13 insertions, 6 deletions
diff --git a/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp b/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
index c90706a88b84..a792bbbd1385 100644
--- a/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
+++ b/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
@@ -2856,6 +2856,7 @@ GDBRemoteCommunicationClient::GetCurrentProcessInfo (bool allow_lazy)
std::string os_name;
std::string vendor_name;
std::string triple;
+ std::string elf_abi;
uint32_t pointer_byte_size = 0;
StringExtractor extractor;
ByteOrder byte_order = eByteOrderInvalid;
@@ -2917,6 +2918,11 @@ GDBRemoteCommunicationClient::GetCurrentProcessInfo (bool allow_lazy)
if (pid != LLDB_INVALID_PROCESS_ID)
++num_keys_decoded;
}
+ else if (name.compare("elf_abi") == 0)
+ {
+ elf_abi = value;
+ ++num_keys_decoded;
+ }
}
if (num_keys_decoded > 0)
m_qProcessInfo_is_valid = eLazyBoolYes;
@@ -2930,6 +2936,7 @@ GDBRemoteCommunicationClient::GetCurrentProcessInfo (bool allow_lazy)
if (!triple.empty ())
{
m_process_arch.SetTriple (triple.c_str ());
+ m_process_arch.SetFlags(elf_abi);
if (pointer_byte_size)
{
assert (pointer_byte_size == m_process_arch.GetAddressByteSize());
diff --git a/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp b/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp
index 7f876fb393d9..26a2e697e854 100644
--- a/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp
+++ b/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp
@@ -1235,12 +1235,12 @@ GDBRemoteCommunicationServerCommon::CreateProcessInfoResponse_DebugServerStyle (
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());
}
}