Added optional calls to lldb_private::Process for getting memory region info
from a process and hooked it up to the new packet that was recently added
to our GDB remote executable named debugserver. Now Process has the following
new calls:
virtual Error
Process::GetMemoryRegionInfo (lldb::addr_t load_addr, MemoryRegionInfo &range_info);
virtual uint32_t
GetLoadAddressPermissions (lldb::addr_t load_addr);
Only the first one needs to be implemented by subclasses that can add this
support.
Cleaned up the way the new packet was implemented in debugserver to be more
useful as an API inside debugserver. Also found an error where finding a region
for an address actually will pick up the next region that follows the address
in the query so we also need ot make sure that the address we requested the
region for falls into the region that gets returned.
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@144976 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h b/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h
index 0f980fe..30d6fb0 100644
--- a/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h
+++ b/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h
@@ -17,6 +17,7 @@
// Other libraries and framework includes
// Project includes
#include "lldb/Core/ArchSpec.h"
+#include "lldb/Target/Process.h"
#include "GDBRemoteCommunication.h"
@@ -196,6 +197,10 @@
bool
DeallocateMemory (lldb::addr_t addr);
+ lldb_private::Error
+ GetMemoryRegionInfo (lldb::addr_t addr,
+ lldb_private::MemoryRegionInfo &range_info);
+
const lldb_private::ArchSpec &
GetHostArchitecture ();
@@ -332,6 +337,7 @@
lldb_private::LazyBool m_supports_vCont_S;
lldb_private::LazyBool m_qHostInfo_is_valid;
lldb_private::LazyBool m_supports_alloc_dealloc_memory;
+ lldb_private::LazyBool m_supports_memory_region_info;
bool
m_supports_qProcessInfoPID:1,