aboutsummaryrefslogtreecommitdiff
path: root/source/Plugins/Process/Utility/InferiorCallPOSIX.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/Plugins/Process/Utility/InferiorCallPOSIX.cpp')
-rw-r--r--source/Plugins/Process/Utility/InferiorCallPOSIX.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/source/Plugins/Process/Utility/InferiorCallPOSIX.cpp b/source/Plugins/Process/Utility/InferiorCallPOSIX.cpp
index 7db83ae5467f..3923c5433406 100644
--- a/source/Plugins/Process/Utility/InferiorCallPOSIX.cpp
+++ b/source/Plugins/Process/Utility/InferiorCallPOSIX.cpp
@@ -14,6 +14,7 @@
#include "lldb/Symbol/ClangASTContext.h"
#include "lldb/Symbol/SymbolContext.h"
#include "lldb/Target/ExecutionContext.h"
+#include "lldb/Target/Platform.h"
#include "lldb/Target/Process.h"
#include "lldb/Target/Target.h"
#include "lldb/Target/ThreadPlanCallFunction.h"
@@ -27,8 +28,6 @@
#define PROT_READ 1
#define PROT_WRITE 2
#define PROT_EXEC 4
-#define MAP_PRIVATE 2
-#define MAP_ANON 0x1000
#endif
using namespace lldb;
@@ -87,10 +86,8 @@ lldb_private::InferiorCallMmap (Process *process,
prot_arg |= PROT_WRITE;
}
- if (flags & eMmapFlagsPrivate)
- flags_arg |= MAP_PRIVATE;
- if (flags & eMmapFlagsAnon)
- flags_arg |= MAP_ANON;
+ const ArchSpec arch = process->GetTarget().GetArchitecture();
+ flags_arg = process->GetTarget().GetPlatform()->ConvertMmapFlagsToPlatform(arch,flags);
AddressRange mmap_range;
if (sc.GetAddressRange(range_scope, 0, use_inline_block_range, mmap_range))