[Lldb-commits] [lldb] r210213 - Move MemoryRegionInfo out of Target/Process.h into its own header.
Todd Fiala
todd.fiala at gmail.com
Wed Jun 4 13:13:38 PDT 2014
Author: tfiala
Date: Wed Jun 4 15:13:37 2014
New Revision: 210213
URL: http://llvm.org/viewvc/llvm-project?rev=210213&view=rev
Log:
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.
Added:
lldb/trunk/include/lldb/Target/MemoryRegionInfo.h
Modified:
lldb/trunk/include/lldb/Target/Process.h
lldb/trunk/lldb.xcodeproj/project.pbxproj
Added: lldb/trunk/include/lldb/Target/MemoryRegionInfo.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/MemoryRegionInfo.h?rev=210213&view=auto
==============================================================================
--- lldb/trunk/include/lldb/Target/MemoryRegionInfo.h (added)
+++ lldb/trunk/include/lldb/Target/MemoryRegionInfo.h Wed Jun 4 15:13:37 2014
@@ -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
Modified: lldb/trunk/include/lldb/Target/Process.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/Process.h?rev=210213&r1=210212&r2=210213&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/Process.h (original)
+++ lldb/trunk/include/lldb/Target/Process.h Wed Jun 4 15:13:37 2014
@@ -44,6 +44,7 @@
#include "lldb/Target/ExecutionContextScope.h"
#include "lldb/Target/JITLoaderList.h"
#include "lldb/Target/Memory.h"
+#include "lldb/Target/MemoryRegionInfo.h"
#include "lldb/Target/QueueList.h"
#include "lldb/Target/ThreadList.h"
#include "lldb/Target/UnixSignals.h"
@@ -1335,91 +1336,6 @@ inline bool operator!= (const ProcessMod
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"
/// @brief A plug-in interface definition class for debugging a process.
Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=210213&r1=210212&r2=210213&view=diff
==============================================================================
--- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
+++ lldb/trunk/lldb.xcodeproj/project.pbxproj Wed Jun 4 15:13:37 2014
@@ -870,6 +870,7 @@
/* End PBXCopyFilesBuildPhase 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>"; };
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>"; };
@@ -3432,6 +3433,7 @@
4CB4430A12491DDA00C13DC2 /* LanguageRuntime.cpp */,
2690B36F1381D5B600ECFBAE /* Memory.h */,
2690B3701381D5C300ECFBAE /* Memory.cpp */,
+ 2360092C193FB21500189DB1 /* MemoryRegionInfo.h */,
4CB443F612499B6E00C13DC2 /* ObjCLanguageRuntime.h */,
4CB443F212499B5000C13DC2 /* ObjCLanguageRuntime.cpp */,
495BBACF119A0DE700418BEA /* PathMappingList.h */,
More information about the lldb-commits
mailing list