Dump JIT memory requirements when "log enable lldb expr" logging is enabled.

Correctly handle invalid 32-bit mmap fail return value in ProcessGDBRemote.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@131394 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
index 172a1cf..9564624 100644
--- a/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ b/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -1637,7 +1637,13 @@
                                     if (result == eExecutionCompleted)
                                     {
                                         allocated_addr = return_value_sp->GetScalar().ULongLong();
-                                        m_addr_to_mmap_size[allocated_addr] = size;
+                                        if (GetAddressByteSize() == 4)
+                                        {
+                                            if (allocated_addr == UINT32_MAX)
+                                                allocated_addr = LLDB_INVALID_ADDRESS;
+                                        }
+                                        if (allocated_addr != LLDB_INVALID_ADDRESS)
+                                            m_addr_to_mmap_size[allocated_addr] = size;
                                     }
                                 }
                             }