Update RecordingMemoryManager as per change to RuntimeDyld base class

made in upstream llvm (r168114)

llvm-svn: 168184
This commit is contained in:
Daniel Malea 2012-11-16 19:17:44 +00:00
parent 3669de4c97
commit f0854b070a
2 changed files with 18 additions and 3 deletions

View 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
@ -206,6 +209,18 @@ public:
virtual uint8_t *allocateGlobal(uintptr_t Size,
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
//------------------------------------------------------------------

View 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;