[Lldb-commits] [lldb] r131397 - in /lldb/trunk/source: Plugins/Process/gdb-remote/ProcessGDBRemote.cpp Symbol/ClangASTType.cpp Target/Process.cpp

Greg Clayton gclayton at apple.com
Sun May 15 19:35:02 PDT 2011


Author: gclayton
Date: Sun May 15 21:35:02 2011
New Revision: 131397

URL: http://llvm.org/viewvc/llvm-project?rev=131397&view=rev
Log:
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.


Modified:
    lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
    lldb/trunk/source/Symbol/ClangASTType.cpp
    lldb/trunk/source/Target/Process.cpp

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp?rev=131397&r1=131396&r2=131397&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp Sun May 15 21:35:02 2011
@@ -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());

Modified: lldb/trunk/source/Symbol/ClangASTType.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTType.cpp?rev=131397&r1=131396&r2=131397&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/ClangASTType.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTType.cpp Sun May 15 21:35:02 2011
@@ -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;

Modified: lldb/trunk/source/Target/Process.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Process.cpp?rev=131397&r1=131396&r2=131397&view=diff
==============================================================================
--- lldb/trunk/source/Target/Process.cpp (original)
+++ lldb/trunk/source/Target/Process.cpp Sun May 15 21:35:02 2011
@@ -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;





More information about the lldb-commits mailing list