[Lldb-commits] [PATCH] D28808: Fix a bug where lldb does not	respect the packet size.
    Greg Clayton via Phabricator via lldb-commits 
    lldb-commits at lists.llvm.org
       
    Wed Jan 18 08:50:34 PST 2017
    
    
  
clayborg requested changes to this revision.
clayborg added a comment.
This revision now requires changes to proceed.
A few cleanups on the logging. See inlined comments.
================
Comment at: source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp:4004
+        // hope that data being written is small enough to fit.
+        Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
+        if (log)
----------------
We should use a GDB remote log channel instead of the LLDB channel. Since this is communication based I suggest:
```
  Log *log(ProcessGDBRemoteLog::GetLogIfAnyCategoryIsSet(GDBR_LOG_COMM| GDBR_LOG_MEMORY));
```
================
Comment at: source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp:4006-4007
+        if (log)
+          log->Warning("Packet size is too small."
+                       "LLDB may face problems while writing memory");
+      }
----------------
Missing space between "small." and "LLDB". We should also warn once, not every time.
https://reviews.llvm.org/D28808
    
    
More information about the lldb-commits
mailing list