[Lldb-commits] [PATCH] D146124: [lldb] Fix a 32 bit warning in ScriptedProcessInterface

David Spickett via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Mar 21 08:34:25 PDT 2023


This revision was automatically updated to reflect the committed changes.
Closed by commit rGe73dd6254e31: [lldb] Fix a 32 bit warning in ScriptedProcessInterface (authored by DavidSpickett).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D146124/new/

https://reviews.llvm.org/D146124

Files:
  lldb/include/lldb/Interpreter/ScriptedProcessInterface.h
  lldb/source/Plugins/Process/scripted/ScriptedProcess.cpp
  lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.cpp
  lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.h


Index: lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.h
===================================================================
--- lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.h
+++ lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.h
@@ -50,8 +50,9 @@
   lldb::DataExtractorSP ReadMemoryAtAddress(lldb::addr_t address, size_t size,
                                             Status &error) override;
 
-  size_t WriteMemoryAtAddress(lldb::addr_t addr, lldb::DataExtractorSP data_sp,
-                              Status &error) override;
+  lldb::offset_t WriteMemoryAtAddress(lldb::addr_t addr,
+                                      lldb::DataExtractorSP data_sp,
+                                      Status &error) override;
 
   StructuredData::ArraySP GetLoadedImages() override;
 
Index: lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.cpp
===================================================================
--- lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.cpp
+++ lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.cpp
@@ -136,7 +136,7 @@
   return data_sp;
 }
 
-size_t ScriptedProcessPythonInterface::WriteMemoryAtAddress(
+lldb::offset_t ScriptedProcessPythonInterface::WriteMemoryAtAddress(
     lldb::addr_t addr, lldb::DataExtractorSP data_sp, Status &error) {
   Status py_error;
   StructuredData::ObjectSP obj =
Index: lldb/source/Plugins/Process/scripted/ScriptedProcess.cpp
===================================================================
--- lldb/source/Plugins/Process/scripted/ScriptedProcess.cpp
+++ lldb/source/Plugins/Process/scripted/ScriptedProcess.cpp
@@ -269,7 +269,7 @@
   if (!data_extractor_sp || !data_extractor_sp->GetByteSize())
     return 0;
 
-  size_t bytes_written =
+  lldb::offset_t bytes_written =
       GetInterface().WriteMemoryAtAddress(vm_addr, data_extractor_sp, error);
 
   if (!bytes_written || bytes_written == LLDB_INVALID_OFFSET)
Index: lldb/include/lldb/Interpreter/ScriptedProcessInterface.h
===================================================================
--- lldb/include/lldb/Interpreter/ScriptedProcessInterface.h
+++ lldb/include/lldb/Interpreter/ScriptedProcessInterface.h
@@ -55,9 +55,9 @@
     return {};
   }
 
-  virtual size_t WriteMemoryAtAddress(lldb::addr_t addr,
-                                      lldb::DataExtractorSP data_sp,
-                                      Status &error) {
+  virtual lldb::offset_t WriteMemoryAtAddress(lldb::addr_t addr,
+                                              lldb::DataExtractorSP data_sp,
+                                              Status &error) {
     return LLDB_INVALID_OFFSET;
   };
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146124.506996.patch
Type: text/x-patch
Size: 2787 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230321/df4d4565/attachment.bin>


More information about the lldb-commits mailing list