/// this process.
virtual bool WarnBeforeDetach() const { return true; }
- /// Actually do the reading of memory from a process.
- ///
- /// Subclasses must override this function and can return fewer bytes than
- /// requested when memory requests are too large. This class will break up
- /// the memory requests and keep advancing the arguments along as needed.
- ///
- /// \param[in] vm_addr
- /// A virtual load address that indicates where to start reading
- /// memory from.
- ///
- /// \param[in] size
- /// The number of bytes to read.
- ///
- /// \param[out] buf
- /// A byte buffer that is at least \a size bytes long that
- /// will receive the memory bytes.
- ///
- /// \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.
- /// Zero is returned in the case of an error.
- virtual size_t DoReadMemory(lldb::addr_t vm_addr, void *buf, size_t size,
- Status &error) = 0;
-
/// Read of memory from a process.
///
/// This function will read memory from the current process's address space
bool trap_exceptions = false);
protected:
+ /// Actually do the reading of memory from a process.
+ ///
+ /// Subclasses must override this function and can return fewer bytes than
+ /// requested when memory requests are too large. This class will break up
+ /// the memory requests and keep advancing the arguments along as needed.
+ ///
+ /// \param[in] vm_addr
+ /// A virtual load address that indicates where to start reading
+ /// memory from.
+ ///
+ /// \param[in] size
+ /// The number of bytes to read.
+ ///
+ /// \param[out] buf
+ /// A byte buffer that is at least \a size bytes long that
+ /// will receive the memory bytes.
+ ///
+ /// \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.
+ /// Zero is returned in the case of an error.
+ virtual size_t DoReadMemory(lldb::addr_t vm_addr, void *buf, size_t size,
+ Status &error) = 0;
+
void SetState(lldb::EventSP &event_sp);
lldb::StateType GetPrivateState();
*read_error = false;
// Read the mach header and see whether it looks like a kernel
- if (process->DoReadMemory (addr, &header, sizeof(header), error) !=
+ if (process->ReadMemory(addr, &header, sizeof(header), error) !=
sizeof(header)) {
if (read_error)
*read_error = true;
// For the kernel, we really do need an on-disk file copy of the binary
// to do anything useful. This will force a call to dsymForUUID if it
- // exists, instead of depending on the DebugSymbols preferences being
+ // exists, instead of depending on the DebugSymbols preferences being
// set.
if (IsKernel()) {
if (Symbols::DownloadObjectAndSymbolFile(module_spec, true)) {
jit_descriptor<ptr_t> jit_desc;
const size_t jit_desc_size = sizeof(jit_desc);
Status error;
- size_t bytes_read = m_process->DoReadMemory(m_jit_descriptor_addr, &jit_desc,
- jit_desc_size, error);
+ size_t bytes_read = m_process->ReadMemory(m_jit_descriptor_addr, &jit_desc,
+ jit_desc_size, error);
if (bytes_read != jit_desc_size || !error.Success()) {
LLDB_LOGF(log, "JITLoaderGDB::%s failed to read JIT descriptor",
__FUNCTION__);