sas created this revision.
Herald added subscribers: kristof.beyls, aemerson.

This matches other SysV ABIs that are different on Apple and non-Apple targets,
like `ABISysV_arm.cpp` for instance.


https://reviews.llvm.org/D39335

Files:
  source/Plugins/ABI/SysV-i386/ABISysV_i386.cpp


Index: source/Plugins/ABI/SysV-i386/ABISysV_i386.cpp
===================================================================
--- source/Plugins/ABI/SysV-i386/ABISysV_i386.cpp
+++ source/Plugins/ABI/SysV-i386/ABISysV_i386.cpp
@@ -205,11 +205,12 @@
 ABISP
 ABISysV_i386::CreateInstance(lldb::ProcessSP process_sp, const ArchSpec &arch) 
{
   static ABISP g_abi_sp;
-  if ((arch.GetTriple().getArch() == llvm::Triple::x86) &&
-      (arch.GetTriple().isOSLinux() || arch.GetTriple().isOSFreeBSD())) {
-    if (!g_abi_sp)
-      g_abi_sp.reset(new ABISysV_i386(process_sp));
-    return g_abi_sp;
+  if (arch.GetTriple().getVendor() != llvm::Triple::Apple) {
+    if (arch.GetTriple().getArch() == llvm::Triple::x86) {
+      if (!g_abi_sp)
+        g_abi_sp.reset(new ABISysV_i386(process_sp));
+      return g_abi_sp;
+    }
   }
   return ABISP();
 }


Index: source/Plugins/ABI/SysV-i386/ABISysV_i386.cpp
===================================================================
--- source/Plugins/ABI/SysV-i386/ABISysV_i386.cpp
+++ source/Plugins/ABI/SysV-i386/ABISysV_i386.cpp
@@ -205,11 +205,12 @@
 ABISP
 ABISysV_i386::CreateInstance(lldb::ProcessSP process_sp, const ArchSpec &arch) {
   static ABISP g_abi_sp;
-  if ((arch.GetTriple().getArch() == llvm::Triple::x86) &&
-      (arch.GetTriple().isOSLinux() || arch.GetTriple().isOSFreeBSD())) {
-    if (!g_abi_sp)
-      g_abi_sp.reset(new ABISysV_i386(process_sp));
-    return g_abi_sp;
+  if (arch.GetTriple().getVendor() != llvm::Triple::Apple) {
+    if (arch.GetTriple().getArch() == llvm::Triple::x86) {
+      if (!g_abi_sp)
+        g_abi_sp.reset(new ABISysV_i386(process_sp));
+      return g_abi_sp;
+    }
   }
   return ABISP();
 }
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
  • [Lldb-commits] [PATCH] D39... Stephane Sezer via Phabricator via lldb-commits

Reply via email to