Update RecordingMemoryManager as per change to RuntimeDyld base class
authorDaniel Malea <daniel.malea@intel.com>
Fri, 16 Nov 2012 19:17:44 +0000 (19:17 +0000)
committerDaniel Malea <daniel.malea@intel.com>
Fri, 16 Nov 2012 19:17:44 +0000 (19:17 +0000)
made in upstream llvm (r168114)

llvm-svn: 168184

lldb/include/lldb/Expression/RecordingMemoryManager.h
lldb/source/Expression/RecordingMemoryManager.cpp

index 270f01f..b9758e1 100644 (file)
@@ -184,11 +184,14 @@ public:
     /// @param[in] SectionID
     ///     A unique identifier for the section.
     ///
+    /// @param[in] IsReadOnly
+    ///     Flag indicating the section is read-only.
+    ///
     /// @return
     ///     Allocated space.
     //------------------------------------------------------------------
     virtual uint8_t *allocateDataSection(uintptr_t Size, unsigned Alignment,
-                                         unsigned SectionID);
+                                         unsigned SectionID, bool IsReadOnly);
 
     //------------------------------------------------------------------
     /// Allocate space for a global variable, and add it to the
@@ -207,6 +210,18 @@ public:
                                     unsigned Alignment);
 
     //------------------------------------------------------------------
+    /// Called when object loading is complete and section page
+    /// permissions can be applied. Currently unimplemented for LLDB.
+    ///
+    /// @param[out] ErrMsg
+    ///     The error that prevented the page protection from succeeding.
+    ///
+    /// @return
+    ///     True in case of failure, false in case of success.
+    //------------------------------------------------------------------
+    bool applyPermissions(std::string *ErrMsg) { return false; }
+
+    //------------------------------------------------------------------
     /// Passthrough interface stub
     //------------------------------------------------------------------
     virtual void deallocateFunctionBody(void *Body);
index da24603..4d9c721 100644 (file)
@@ -124,9 +124,9 @@ RecordingMemoryManager::allocateCodeSection(uintptr_t Size, unsigned Alignment,
 }
 
 uint8_t *
-RecordingMemoryManager::allocateDataSection(uintptr_t Size, unsigned Alignment, unsigned SectionID)
+RecordingMemoryManager::allocateDataSection(uintptr_t Size, unsigned Alignment, unsigned SectionID, bool IsReadOnly)
 {
-    uint8_t *return_value = m_default_mm_ap->allocateDataSection(Size, Alignment, SectionID);
+    uint8_t *return_value = m_default_mm_ap->allocateDataSection(Size, Alignment, SectionID, IsReadOnly);
     
     Allocation allocation;
     allocation.m_size = Size;