@@ -1589,6 +1589,42 @@ class Process : public std::enable_shared_from_this<Process>,
1589
1589
size_t ReadMemoryFromInferior (lldb::addr_t vm_addr, void *buf, size_t size,
1590
1590
Status &error);
1591
1591
1592
+ typedef lldb::IterationAction (ReadMemoryChunkCallback)(lldb::Status &,
1593
+ DataBufferHeap &, lldb
1594
+ : addr_t ,
1595
+ lldb::offset_t );
1596
+ // / Read of memory from a process in discrete chunks, terminating
1597
+ // / either when all bytes are read, or the supplied callback returns
1598
+ // / IterationAction::Stop
1599
+ // /
1600
+ // / \param[in] vm_addr
1601
+ // / A virtual load address that indicates where to start reading
1602
+ // / memory from.
1603
+ // /
1604
+ // / \param[in] data
1605
+ // / The data buffer heap to use to read the chunk. The chunk size
1606
+ // / depends upon the byte size of the buffer.
1607
+ // /
1608
+ // / \param[in] size
1609
+ // / The number of bytes to read.
1610
+ // /
1611
+ // / \param[in] callback
1612
+ // / The callback to invoke when a chunk is read from memory.
1613
+ // / \param[in] cacheReads
1614
+ // / Whether to use the ReadMemory instead of ReadMemory inferior, defaults
1615
+ // / to false.
1616
+ // /
1617
+ // / \return
1618
+ // / The number of bytes that were actually read into \a buf and
1619
+ // / written to the provided callback.
1620
+ // / If the returned number is greater than zero, yet less than \a
1621
+ // / size, then this function will get called again with \a
1622
+ // / vm_addr, \a buf, and \a size updated appropriately. Zero is
1623
+ // / returned in the case of an error.
1624
+ size_t ReadMemoryInChunks (lldb::addr_t vm_addr, DataBufferHeap &data,
1625
+ size_t size, ReadMemoryChunkCallback callback,
1626
+ bool cacheReads = false );
1627
+
1592
1628
// / Read a NULL terminated C string from memory
1593
1629
// /
1594
1630
// / This function will read a cache page at a time until the NULL
0 commit comments