[Lldb-commits] [lldb] r184125 - Fixed a problem in the expression parser that

Sean Callanan scallanan at apple.com
Mon Jun 17 14:19:31 PDT 2013


Author: spyffe
Date: Mon Jun 17 16:19:31 2013
New Revision: 184125

URL: http://llvm.org/viewvc/llvm-project?rev=184125&view=rev
Log:
Fixed a problem in the expression parser that
caused the IR interpreter not to work if the
process had finished running.

<rdar://problem/14124301>

Modified:
    lldb/trunk/source/Expression/IRMemoryMap.cpp

Modified: lldb/trunk/source/Expression/IRMemoryMap.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/IRMemoryMap.cpp?rev=184125&r1=184124&r2=184125&view=diff
==============================================================================
--- lldb/trunk/source/Expression/IRMemoryMap.cpp (original)
+++ lldb/trunk/source/Expression/IRMemoryMap.cpp Mon Jun 17 16:19:31 2013
@@ -54,7 +54,7 @@ IRMemoryMap::FindSpace (size_t size)
         
     lldb::addr_t ret = LLDB_INVALID_ADDRESS;
     
-    if (process_sp && process_sp->CanJIT())
+    if (process_sp && process_sp->CanJIT() && process_sp->IsAlive())
     {
         Error alloc_error;
         
@@ -285,7 +285,7 @@ IRMemoryMap::Malloc (size_t size, uint8_
         break;
     case eAllocationPolicyMirror:
         process_sp = m_process_wp.lock();
-        if (process_sp && process_sp->CanJIT())
+        if (process_sp && process_sp->CanJIT() && process_sp->IsAlive())
         {
             allocation_address = process_sp->AllocateMemory(allocation_size, permissions, error);
             if (!error.Success())
@@ -307,7 +307,7 @@ IRMemoryMap::Malloc (size_t size, uint8_
         process_sp = m_process_wp.lock();
         if (process_sp)
         {
-            if (process_sp->CanJIT())
+            if (process_sp->CanJIT() && process_sp->IsAlive())
             {
                 allocation_address = process_sp->AllocateMemory(allocation_size, permissions, error);
                 if (!error.Success())
@@ -414,7 +414,7 @@ IRMemoryMap::Free (lldb::addr_t process_
             lldb::ProcessSP process_sp = m_process_wp.lock();
             if (process_sp)
             {
-                if (process_sp->CanJIT())
+                if (process_sp->CanJIT() && process_sp->IsAlive())
                     process_sp->DeallocateMemory(allocation.m_process_alloc); // FindSpace allocated this for real
                 else
                     process_sp->GetReservationCache().Unreserve(allocation.m_process_alloc); // FindSpace registered this memory





More information about the lldb-commits mailing list