[Lldb-commits] [lldb] [lldb] Part 2 of 2 - Refactor `CommandObject::DoExecute(...)` return `void` (not `bool`) (PR #69991)

Jason Molenda via lldb-commits lldb-commits at lists.llvm.org
Mon Oct 23 23:37:31 PDT 2023


================
@@ -1541,18 +1539,18 @@ class CommandObjectMemoryWrite : public CommandObjectParsed {
 
     if (!buffer.GetString().empty()) {
       Status error;
-      if (process->WriteMemory(addr, buffer.GetString().data(),
-                               buffer.GetString().size(),
-                               error) == buffer.GetString().size())
-        return true;
-      else {
+      const char *bufferData = buffer.GetString().data();
----------------
jasonmolenda wrote:

The local variables in most lldb methods follow a naming convention of `word_word_word`, so `buffer_data`, buffer_size`, `write_size` in this case, you can see `item_byte_size` earlier in this method for instance.  I would recommend being consistent with the convention used in this method.

https://github.com/llvm/llvm-project/pull/69991


More information about the lldb-commits mailing list