forked from OSchip/llvm-project
Move MemoryRegionInfo out of Target/Process.h into its own header.
lldb-gdbserver and NativeProcessProtocol will use MemoryRegionInfo but don't want to pull in Process.h. Pull this declaration and definition out into its own header. llvm-svn: 210213
This commit is contained in:
parent
175e52f57b
commit
ba78c15c9d
|
@ -0,0 +1,103 @@
|
||||||
|
//===-- MemoryRegionInfo.h ---------------------------------------*- C++ -*-===//
|
||||||
|
//
|
||||||
|
// The LLVM Compiler Infrastructure
|
||||||
|
//
|
||||||
|
// This file is distributed under the University of Illinois Open Source
|
||||||
|
// License. See LICENSE.TXT for details.
|
||||||
|
//
|
||||||
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
#ifndef lldb_MemoryRegionInfo_h
|
||||||
|
#define lldb_MemoryRegionInfo_h
|
||||||
|
|
||||||
|
#include "lldb/Utility/Range.h"
|
||||||
|
|
||||||
|
namespace lldb_private
|
||||||
|
{
|
||||||
|
class MemoryRegionInfo
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
typedef Range<lldb::addr_t, lldb::addr_t> RangeType;
|
||||||
|
|
||||||
|
enum OptionalBool {
|
||||||
|
eDontKnow = -1,
|
||||||
|
eNo = 0,
|
||||||
|
eYes = 1
|
||||||
|
};
|
||||||
|
|
||||||
|
MemoryRegionInfo () :
|
||||||
|
m_range (),
|
||||||
|
m_read (eDontKnow),
|
||||||
|
m_write (eDontKnow),
|
||||||
|
m_execute (eDontKnow)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
~MemoryRegionInfo ()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
RangeType &
|
||||||
|
GetRange()
|
||||||
|
{
|
||||||
|
return m_range;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
Clear()
|
||||||
|
{
|
||||||
|
m_range.Clear();
|
||||||
|
m_read = m_write = m_execute = eDontKnow;
|
||||||
|
}
|
||||||
|
|
||||||
|
const RangeType &
|
||||||
|
GetRange() const
|
||||||
|
{
|
||||||
|
return m_range;
|
||||||
|
}
|
||||||
|
|
||||||
|
OptionalBool
|
||||||
|
GetReadable () const
|
||||||
|
{
|
||||||
|
return m_read;
|
||||||
|
}
|
||||||
|
|
||||||
|
OptionalBool
|
||||||
|
GetWritable () const
|
||||||
|
{
|
||||||
|
return m_write;
|
||||||
|
}
|
||||||
|
|
||||||
|
OptionalBool
|
||||||
|
GetExecutable () const
|
||||||
|
{
|
||||||
|
return m_execute;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
SetReadable (OptionalBool val)
|
||||||
|
{
|
||||||
|
m_read = val;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
SetWritable (OptionalBool val)
|
||||||
|
{
|
||||||
|
m_write = val;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
SetExecutable (OptionalBool val)
|
||||||
|
{
|
||||||
|
m_execute = val;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected:
|
||||||
|
RangeType m_range;
|
||||||
|
OptionalBool m_read;
|
||||||
|
OptionalBool m_write;
|
||||||
|
OptionalBool m_execute;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // #ifndef lldb_MemoryRegionInfo_h
|
|
@ -44,6 +44,7 @@
|
||||||
#include "lldb/Target/ExecutionContextScope.h"
|
#include "lldb/Target/ExecutionContextScope.h"
|
||||||
#include "lldb/Target/JITLoaderList.h"
|
#include "lldb/Target/JITLoaderList.h"
|
||||||
#include "lldb/Target/Memory.h"
|
#include "lldb/Target/Memory.h"
|
||||||
|
#include "lldb/Target/MemoryRegionInfo.h"
|
||||||
#include "lldb/Target/QueueList.h"
|
#include "lldb/Target/QueueList.h"
|
||||||
#include "lldb/Target/ThreadList.h"
|
#include "lldb/Target/ThreadList.h"
|
||||||
#include "lldb/Target/UnixSignals.h"
|
#include "lldb/Target/UnixSignals.h"
|
||||||
|
@ -1335,91 +1336,6 @@ inline bool operator!= (const ProcessModID &lhs, const ProcessModID &rhs)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
class MemoryRegionInfo
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
typedef Range<lldb::addr_t, lldb::addr_t> RangeType;
|
|
||||||
|
|
||||||
enum OptionalBool {
|
|
||||||
eDontKnow = -1,
|
|
||||||
eNo = 0,
|
|
||||||
eYes = 1
|
|
||||||
};
|
|
||||||
|
|
||||||
MemoryRegionInfo () :
|
|
||||||
m_range (),
|
|
||||||
m_read (eDontKnow),
|
|
||||||
m_write (eDontKnow),
|
|
||||||
m_execute (eDontKnow)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
~MemoryRegionInfo ()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
RangeType &
|
|
||||||
GetRange()
|
|
||||||
{
|
|
||||||
return m_range;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
Clear()
|
|
||||||
{
|
|
||||||
m_range.Clear();
|
|
||||||
m_read = m_write = m_execute = eDontKnow;
|
|
||||||
}
|
|
||||||
|
|
||||||
const RangeType &
|
|
||||||
GetRange() const
|
|
||||||
{
|
|
||||||
return m_range;
|
|
||||||
}
|
|
||||||
|
|
||||||
OptionalBool
|
|
||||||
GetReadable () const
|
|
||||||
{
|
|
||||||
return m_read;
|
|
||||||
}
|
|
||||||
|
|
||||||
OptionalBool
|
|
||||||
GetWritable () const
|
|
||||||
{
|
|
||||||
return m_write;
|
|
||||||
}
|
|
||||||
|
|
||||||
OptionalBool
|
|
||||||
GetExecutable () const
|
|
||||||
{
|
|
||||||
return m_execute;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
SetReadable (OptionalBool val)
|
|
||||||
{
|
|
||||||
m_read = val;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
SetWritable (OptionalBool val)
|
|
||||||
{
|
|
||||||
m_write = val;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
SetExecutable (OptionalBool val)
|
|
||||||
{
|
|
||||||
m_execute = val;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected:
|
|
||||||
RangeType m_range;
|
|
||||||
OptionalBool m_read;
|
|
||||||
OptionalBool m_write;
|
|
||||||
OptionalBool m_execute;
|
|
||||||
};
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
/// @class Process Process.h "lldb/Target/Process.h"
|
/// @class Process Process.h "lldb/Target/Process.h"
|
||||||
/// @brief A plug-in interface definition class for debugging a process.
|
/// @brief A plug-in interface definition class for debugging a process.
|
||||||
|
|
|
@ -870,6 +870,7 @@
|
||||||
/* End PBXCopyFilesBuildPhase section */
|
/* End PBXCopyFilesBuildPhase section */
|
||||||
|
|
||||||
/* Begin PBXFileReference section */
|
/* Begin PBXFileReference section */
|
||||||
|
2360092C193FB21500189DB1 /* MemoryRegionInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MemoryRegionInfo.h; path = include/lldb/Target/MemoryRegionInfo.h; sourceTree = "<group>"; };
|
||||||
23EDE3371926AAD500F6A132 /* RegisterInfoInterface.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = RegisterInfoInterface.h; path = Utility/RegisterInfoInterface.h; sourceTree = "<group>"; };
|
23EDE3371926AAD500F6A132 /* RegisterInfoInterface.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = RegisterInfoInterface.h; path = Utility/RegisterInfoInterface.h; sourceTree = "<group>"; };
|
||||||
23EFE388193D1ABC00E54E54 /* SBTypeEnumMember.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SBTypeEnumMember.h; path = include/lldb/API/SBTypeEnumMember.h; sourceTree = "<group>"; };
|
23EFE388193D1ABC00E54E54 /* SBTypeEnumMember.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SBTypeEnumMember.h; path = include/lldb/API/SBTypeEnumMember.h; sourceTree = "<group>"; };
|
||||||
23EFE38A193D1AEC00E54E54 /* SBTypeEnumMember.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = SBTypeEnumMember.cpp; path = source/API/SBTypeEnumMember.cpp; sourceTree = "<group>"; };
|
23EFE38A193D1AEC00E54E54 /* SBTypeEnumMember.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = SBTypeEnumMember.cpp; path = source/API/SBTypeEnumMember.cpp; sourceTree = "<group>"; };
|
||||||
|
@ -3432,6 +3433,7 @@
|
||||||
4CB4430A12491DDA00C13DC2 /* LanguageRuntime.cpp */,
|
4CB4430A12491DDA00C13DC2 /* LanguageRuntime.cpp */,
|
||||||
2690B36F1381D5B600ECFBAE /* Memory.h */,
|
2690B36F1381D5B600ECFBAE /* Memory.h */,
|
||||||
2690B3701381D5C300ECFBAE /* Memory.cpp */,
|
2690B3701381D5C300ECFBAE /* Memory.cpp */,
|
||||||
|
2360092C193FB21500189DB1 /* MemoryRegionInfo.h */,
|
||||||
4CB443F612499B6E00C13DC2 /* ObjCLanguageRuntime.h */,
|
4CB443F612499B6E00C13DC2 /* ObjCLanguageRuntime.h */,
|
||||||
4CB443F212499B5000C13DC2 /* ObjCLanguageRuntime.cpp */,
|
4CB443F212499B5000C13DC2 /* ObjCLanguageRuntime.cpp */,
|
||||||
495BBACF119A0DE700418BEA /* PathMappingList.h */,
|
495BBACF119A0DE700418BEA /* PathMappingList.h */,
|
||||||
|
|
Loading…
Reference in New Issue