Fixed an issue where large memory writes might not get chunked up into smaller
packets in GDB remote.
Also fixed a compiler warning for an unhandled case for a switch.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@131397 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
index 9564624..0a65b98 100644
--- a/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ b/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -1520,6 +1520,14 @@
size_t
ProcessGDBRemote::DoWriteMemory (addr_t addr, const void *buf, size_t size, Error &error)
{
+ if (size > m_max_memory_size)
+ {
+ // Keep memory read sizes down to a sane limit. This function will be
+ // called multiple times in order to complete the task by
+ // lldb_private::Process so it is ok to do this.
+ size = m_max_memory_size;
+ }
+
StreamString packet;
packet.Printf("M%llx,%zx:", addr, size);
packet.PutBytesAsRawHex8(buf, size, lldb::endian::InlHostByteOrder(), lldb::endian::InlHostByteOrder());
diff --git a/source/Symbol/ClangASTType.cpp b/source/Symbol/ClangASTType.cpp
index c473e19..c8c5e76 100644
--- a/source/Symbol/ClangASTType.cpp
+++ b/source/Symbol/ClangASTType.cpp
@@ -262,6 +262,7 @@
//default: assert(0 && "Unknown builtin type!");
case clang::BuiltinType::UnknownAny:
case clang::BuiltinType::Void:
+ case clang::BuiltinType::BoundMember:
break;
case clang::BuiltinType::Bool: return lldb::eFormatBoolean;
diff --git a/source/Target/Process.cpp b/source/Target/Process.cpp
index 47a4c1c..f185d57 100644
--- a/source/Target/Process.cpp
+++ b/source/Target/Process.cpp
@@ -1913,7 +1913,7 @@
BreakpointSiteList::collection::const_iterator end = m_breakpoint_site_list.GetMap()->end();
if (iter == end || iter->second->GetLoadAddress() > addr + size)
- return DoWriteMemory(addr, buf, size, error);
+ return WriteMemoryPrivate (addr, buf, size, error);
BreakpointSiteList::collection::const_iterator pos;
size_t bytes_written = 0;