[Lldb-commits] [lldb] r155617 - /lldb/trunk/source/Core/DataBufferMemoryMap.cpp

Jason Molenda jmolenda at apple.com
Wed Apr 25 23:39:52 PDT 2012


Author: jmolenda
Date: Thu Apr 26 01:39:51 2012
New Revision: 155617

URL: http://llvm.org/viewvc/llvm-project?rev=155617&view=rev
Log:
Add an Error string specifically for when we hit an ENOMEM when
trying to mmap a file fails so parent caller function can 
provide helpful information to use about what went wrong.


Modified:
    lldb/trunk/source/Core/DataBufferMemoryMap.cpp

Modified: lldb/trunk/source/Core/DataBufferMemoryMap.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/DataBufferMemoryMap.cpp?rev=155617&r1=155616&r2=155617&view=diff
==============================================================================
--- lldb/trunk/source/Core/DataBufferMemoryMap.cpp (original)
+++ lldb/trunk/source/Core/DataBufferMemoryMap.cpp Thu Apr 26 01:39:51 2012
@@ -207,6 +207,10 @@
                                 }
                             }
                         }
+                        if (error.GetError() == ENOMEM)
+                        {
+                           error.SetErrorStringWithFormat("could not allocate %lld bytes of memory to mmap in file", (uint64_t) length);
+                        }
                     }
                     else
                     {





More information about the lldb-commits mailing list