diff options
author | Todd Fiala <todd.fiala@gmail.com> | 2014-06-21 00:48:09 +0000 |
---|---|---|
committer | Todd Fiala <todd.fiala@gmail.com> | 2014-06-21 00:48:09 +0000 |
commit | f105f588b31b4384bb48f528784cb05ae0eec060 (patch) | |
tree | 9188c052211583fb8522a9ac3b1ef61f15e6a75a /lldb/source/Plugins/Process/gdb-remote | |
parent | d119fa028ac28ed4ec0bf11d1178bf58dedf72a7 (diff) | |
download | bcm5719-llvm-f105f588b31b4384bb48f528784cb05ae0eec060.tar.gz bcm5719-llvm-f105f588b31b4384bb48f528784cb05ae0eec060.zip |
Fix a gdbremote bug in _M/_m stub support detection.
When a stub reported $#00 (unsupported) for _M and _m
packets, the unsupported response was not handled and
the client then marked the _M/_m commands as definitely
supported. However, they would always fail, preventing
lldb's fallback InferiorCallMmap-based allocation strategy
from being used to attempt to allocate memory in the inferior
process space.
llvm-svn: 211425
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote')
-rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp index 4ba2ca1e435..f7beac2100e 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp @@ -1881,7 +1881,9 @@ GDBRemoteCommunicationClient::AllocateMemory (size_t size, uint32_t permissions) StringExtractorGDBRemote response; if (SendPacketAndWaitForResponse (packet, packet_len, response, false) == PacketResult::Success) { - if (!response.IsErrorResponse()) + if (response.IsUnsupportedResponse()) + m_supports_alloc_dealloc_memory = eLazyBoolNo; + else if (!response.IsErrorResponse()) return response.GetHexMaxU64(false, LLDB_INVALID_ADDRESS); } else @@ -1904,7 +1906,9 @@ GDBRemoteCommunicationClient::DeallocateMemory (addr_t addr) StringExtractorGDBRemote response; if (SendPacketAndWaitForResponse (packet, packet_len, response, false) == PacketResult::Success) { - if (response.IsOKResponse()) + if (response.IsUnsupportedResponse()) + m_supports_alloc_dealloc_memory = eLazyBoolNo; + else if (response.IsOKResponse()) return true; } else |