[Lldb-commits] [PATCH] [LLDB][MIPS] Getting correct flags for MIPS

Nitesh Jain nitesh.jain at imgtec.com
Wed Jun 24 03:35:15 PDT 2015


Hi clayborg, ovyalov,

REPOSITORY
  rL LLVM

http://reviews.llvm.org/D10685

Files:
  source/Plugins/Platform/Linux/PlatformLinux.cpp

Index: source/Plugins/Platform/Linux/PlatformLinux.cpp
===================================================================
--- source/Plugins/Platform/Linux/PlatformLinux.cpp
+++ source/Plugins/Platform/Linux/PlatformLinux.cpp
@@ -937,9 +937,19 @@
 PlatformLinux::ConvertMmapFlagsToPlatform(unsigned flags)
 {
     uint64_t flags_platform = 0;
+    uint64_t map_anon=MAP_ANON;
+    ArchSpec target_arch = HostInfoBase::GetArchitecture();
+
+    //To get correct flags for MIPS Aricheture
+    if (target_arch.GetTriple ().getArch () == llvm::Triple::mips64
+       || target_arch.GetTriple ().getArch () == llvm::Triple::mips64el 
+       || target_arch.GetTriple ().getArch () == llvm::Triple::mips 
+       || target_arch.GetTriple ().getArch () == llvm::Triple::mipsel)
+          map_anon = 0x800;
+
     if (flags & eMmapFlagsPrivate)
         flags_platform |= MAP_PRIVATE;
     if (flags & eMmapFlagsAnon)
-        flags_platform |= MAP_ANON;
+        flags_platform |= map_anon;
     return flags_platform;
 }

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D10685.28328.patch
Type: text/x-patch
Size: 1018 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150624/5d0ca86a/attachment.bin>


More information about the lldb-commits mailing list