Skip to content

Commit 8ff4585

Browse files
committed
[Process] Reorder declarations and document ReadMemoryFromInferior.
llvm-svn: 357136
1 parent 454e942 commit 8ff4585

File tree

1 file changed

+33
-3
lines changed

1 file changed

+33
-3
lines changed

lldb/include/lldb/Target/Process.h

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1614,6 +1614,39 @@ class Process : public std::enable_shared_from_this<Process>,
16141614
virtual size_t ReadMemory(lldb::addr_t vm_addr, void *buf, size_t size,
16151615
Status &error);
16161616

1617+
//------------------------------------------------------------------
1618+
/// Read of memory from a process.
1619+
///
1620+
/// This function has the same semantics of ReadMemory except that it
1621+
/// bypasses caching.
1622+
///
1623+
/// \param[in] vm_addr
1624+
/// A virtual load address that indicates where to start reading
1625+
/// memory from.
1626+
///
1627+
/// \param[out] buf
1628+
/// A byte buffer that is at least \a size bytes long that
1629+
/// will receive the memory bytes.
1630+
///
1631+
/// \param[in] size
1632+
/// The number of bytes to read.
1633+
///
1634+
/// \param[out] error
1635+
/// An error that indicates the success or failure of this
1636+
/// operation. If error indicates success (error.Success()),
1637+
/// then the value returned can be trusted, otherwise zero
1638+
/// will be returned.
1639+
///
1640+
/// \return
1641+
/// The number of bytes that were actually read into \a buf. If
1642+
/// the returned number is greater than zero, yet less than \a
1643+
/// size, then this function will get called again with \a
1644+
/// vm_addr, \a buf, and \a size updated appropriately. Zero is
1645+
/// returned in the case of an error.
1646+
//------------------------------------------------------------------
1647+
size_t ReadMemoryFromInferior(lldb::addr_t vm_addr, void *buf, size_t size,
1648+
Status &error);
1649+
16171650
//------------------------------------------------------------------
16181651
/// Read a NULL terminated string from memory
16191652
///
@@ -1661,9 +1694,6 @@ class Process : public std::enable_shared_from_this<Process>,
16611694
size_t ReadCStringFromMemory(lldb::addr_t vm_addr, std::string &out_str,
16621695
Status &error);
16631696

1664-
size_t ReadMemoryFromInferior(lldb::addr_t vm_addr, void *buf, size_t size,
1665-
Status &error);
1666-
16671697
//------------------------------------------------------------------
16681698
/// Reads an unsigned integer of the specified byte size from process
16691699
/// memory.

0 commit comments

Comments
 (0)