diff options
author | Greg Clayton <gclayton@apple.com> | 2011-05-16 02:35:02 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2011-05-16 02:35:02 +0000 |
commit | b4aaf2e78d3b1d5aab1578b5ffd99310217303aa (patch) | |
tree | 375426171c053e0e52b2c43753c7f1a0c0923b64 /lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp | |
parent | 92e18ed40fa561cbe533d6a8be2659c2ac1969c4 (diff) | |
download | bcm5719-llvm-b4aaf2e78d3b1d5aab1578b5ffd99310217303aa.tar.gz bcm5719-llvm-b4aaf2e78d3b1d5aab1578b5ffd99310217303aa.zip |
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.
llvm-svn: 131397
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp index 95646241427..0a65b987a40 100644 --- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp @@ -1520,6 +1520,14 @@ ProcessGDBRemote::DoReadMemory (addr_t addr, void *buf, size_t size, Error &erro 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()); |