summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Malea <daniel.malea@intel.com>2012-11-16 19:17:44 +0000
committerDaniel Malea <daniel.malea@intel.com>2012-11-16 19:17:44 +0000
commitf0854b070a230faf48bd432c9d01e801fe8cf82a (patch)
tree886e9d79c7376055fdbbcc4d00c0b6bda417a48f
parent3669de4c97813a457fd135c8f9335998e3b3e085 (diff)
downloadbcm5719-llvm-f0854b070a230faf48bd432c9d01e801fe8cf82a.tar.gz
bcm5719-llvm-f0854b070a230faf48bd432c9d01e801fe8cf82a.zip
Update RecordingMemoryManager as per change to RuntimeDyld base class
made in upstream llvm (r168114) llvm-svn: 168184
-rw-r--r--lldb/include/lldb/Expression/RecordingMemoryManager.h17
-rw-r--r--lldb/source/Expression/RecordingMemoryManager.cpp4
2 files changed, 18 insertions, 3 deletions
diff --git a/lldb/include/lldb/Expression/RecordingMemoryManager.h b/lldb/include/lldb/Expression/RecordingMemoryManager.h
index 270f01f84cb..b9758e17614 100644
--- a/lldb/include/lldb/Expression/RecordingMemoryManager.h
+++ b/lldb/include/lldb/Expression/RecordingMemoryManager.h
@@ -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);
diff --git a/lldb/source/Expression/RecordingMemoryManager.cpp b/lldb/source/Expression/RecordingMemoryManager.cpp
index da246032b47..4d9c7219b07 100644
--- a/lldb/source/Expression/RecordingMemoryManager.cpp
+++ b/lldb/source/Expression/RecordingMemoryManager.cpp
@@ -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;
OpenPOWER on IntegriCloud