Remove the QAddressIsExecutable packet I added last night.

Add a more general purpose qMemoryRegionInfo packet which can
describe various attributes about a memory region.  Currently it
will return the start address, size, and permissions (read, write,
executable) for the memory region.  It may be possible to add
additional attributes in the future such as whether the region is
designated as stack memory or jitted code a la vmmap.

I still haven't implemented the lldb side of the code to use this
packet yet so there may be unexpected behavior - but the basic implementation looks
about right.  I'll hook it up to lldb soon and fix any problems that crop up.

llvm-svn: 144175
diff --git a/lldb/tools/debugserver/source/MacOSX/MachVMRegion.cpp b/lldb/tools/debugserver/source/MacOSX/MachVMRegion.cpp
index 6299cf4..f12f2b92 100644
--- a/lldb/tools/debugserver/source/MacOSX/MachVMRegion.cpp
+++ b/lldb/tools/debugserver/source/MacOSX/MachVMRegion.cpp
@@ -177,3 +177,27 @@
 
     return true;
 }
+
+bool
+MachVMRegion::GetRegionDescription (char *outbuf, nub_size_t outbufsize)
+{
+  if (m_addr == INVALID_NUB_ADDRESS || m_start == INVALID_NUB_ADDRESS || m_size == 0)
+      return false;
+  snprintf (outbuf, outbufsize, "start:%llx,size:%llx", m_start, m_size);
+  outbuf[outbufsize - 1] = '\0';
+
+  char tmpbuf[128];
+  strcpy (tmpbuf, ",permissions:");
+  if ((m_data.protection & VM_PROT_READ) == VM_PROT_READ)
+      strcat (tmpbuf, "r");
+  if ((m_data.protection & VM_PROT_WRITE) == VM_PROT_WRITE)
+      strcat (tmpbuf, "w");
+  if ((m_data.protection & VM_PROT_EXECUTE) == VM_PROT_EXECUTE)
+      strcat (tmpbuf, "x");
+  strlcat (outbuf, tmpbuf, outbufsize);
+
+  // It would be nice if we could figure out whether the memory region is stack memory or jitted code memory as well
+
+  outbuf[outbufsize - 1] = '\0';
+  return true;
+}