[Lldb-commits] [lldb] r357136 - [Process] Reorder declarations and document ReadMemoryFromInferior.

Davide Italiano via lldb-commits lldb-commits at lists.llvm.org
Wed Mar 27 17:07:33 PDT 2019


Author: davide
Date: Wed Mar 27 17:07:33 2019
New Revision: 357136

URL: http://llvm.org/viewvc/llvm-project?rev=357136&view=rev
Log:
[Process] Reorder declarations and document ReadMemoryFromInferior.

Modified:
    lldb/trunk/include/lldb/Target/Process.h

Modified: lldb/trunk/include/lldb/Target/Process.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/Process.h?rev=357136&r1=357135&r2=357136&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/Process.h (original)
+++ lldb/trunk/include/lldb/Target/Process.h Wed Mar 27 17:07:33 2019
@@ -1615,6 +1615,39 @@ public:
                             Status &error);
 
   //------------------------------------------------------------------
+  /// Read of memory from a process.
+  ///
+  /// This function has the same semantics of ReadMemory except that it
+  /// bypasses caching.
+  ///
+  /// \param[in] vm_addr
+  ///     A virtual load address that indicates where to start reading
+  ///     memory from.
+  ///
+  /// \param[out] buf
+  ///     A byte buffer that is at least \a size bytes long that
+  ///     will receive the memory bytes.
+  ///
+  /// \param[in] size
+  ///     The number of bytes to read.
+  ///
+  /// \param[out] error
+  ///     An error that indicates the success or failure of this
+  ///     operation. If error indicates success (error.Success()),
+  ///     then the value returned can be trusted, otherwise zero
+  ///     will be returned.
+  ///
+  /// \return
+  ///     The number of bytes that were actually read into \a buf. If
+  ///     the returned number is greater than zero, yet less than \a
+  ///     size, then this function will get called again with \a
+  ///     vm_addr, \a buf, and \a size updated appropriately. Zero is
+  ///     returned in the case of an error.
+  //------------------------------------------------------------------
+  size_t ReadMemoryFromInferior(lldb::addr_t vm_addr, void *buf, size_t size,
+                                Status &error);
+
+  //------------------------------------------------------------------
   /// Read a NULL terminated string from memory
   ///
   /// This function will read a cache page at a time until a NULL string
@@ -1661,9 +1694,6 @@ public:
   size_t ReadCStringFromMemory(lldb::addr_t vm_addr, std::string &out_str,
                                Status &error);
 
-  size_t ReadMemoryFromInferior(lldb::addr_t vm_addr, void *buf, size_t size,
-                                Status &error);
-
   //------------------------------------------------------------------
   /// Reads an unsigned integer of the specified byte size from process
   /// memory.




More information about the lldb-commits mailing list