[Lldb-commits] [PATCH] D42917: Adapt some tests to work with PPC64le architecture

Ana Julia Caetano via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Feb 5 10:20:27 PST 2018


anajuliapc created this revision.

Merge branch 'master' into adaptPPC64tests


https://reviews.llvm.org/D42917

Files:
  packages/Python/lldbsuite/test/functionalities/watchpoint/multiple_hits/TestMultipleHits.py
  packages/Python/lldbsuite/test/lang/c/register_variables/test.c
  packages/Python/lldbsuite/test/lldbplatformutil.py
  packages/Python/lldbsuite/test/tools/lldb-server/TestLldbGdbServer.py
  source/Host/common/HostInfoBase.cpp


Index: source/Host/common/HostInfoBase.cpp
===================================================================
--- source/Host/common/HostInfoBase.cpp
+++ source/Host/common/HostInfoBase.cpp
@@ -373,6 +373,7 @@
 
   case llvm::Triple::aarch64:
   case llvm::Triple::ppc64:
+  case llvm::Triple::ppc64le:
   case llvm::Triple::x86_64:
     arch_64.SetTriple(triple);
     arch_32.SetTriple(triple.get32BitArchVariant());
Index: packages/Python/lldbsuite/test/tools/lldb-server/TestLldbGdbServer.py
===================================================================
--- packages/Python/lldbsuite/test/tools/lldb-server/TestLldbGdbServer.py
+++ packages/Python/lldbsuite/test/tools/lldb-server/TestLldbGdbServer.py
@@ -330,8 +330,9 @@
         # Ensure we have a program counter register.
         self.assertTrue('pc' in generic_regs)
 
-        # Ensure we have a frame pointer register.
-        self.assertTrue('fp' in generic_regs)
+        # Ensure we have a frame pointer register. PPC64le's FP is the same as SP
+        if(self.getArchitecture() != 'powerpc64le'):
+            self.assertTrue('fp' in generic_regs)
 
         # Ensure we have a stack pointer register.
         self.assertTrue('sp' in generic_regs)
Index: packages/Python/lldbsuite/test/lldbplatformutil.py
===================================================================
--- packages/Python/lldbsuite/test/lldbplatformutil.py
+++ packages/Python/lldbsuite/test/lldbplatformutil.py
@@ -33,6 +33,8 @@
         test_case.expect("register read zero", substrs=['zero = 0x'])
     elif arch in ['s390x']:
         test_case.expect("register read r0", substrs=['r0 = 0x'])
+    elif arch in ['powerpc64le']:
+        test_case.expect("register read r0", substrs=['r0 = 0x'])
     else:
         # TODO: Add check for other architectures
         test_case.fail(
Index: packages/Python/lldbsuite/test/lang/c/register_variables/test.c
===================================================================
--- packages/Python/lldbsuite/test/lang/c/register_variables/test.c
+++ packages/Python/lldbsuite/test/lang/c/register_variables/test.c
@@ -1,6 +1,6 @@
 #include <stdio.h>
 
-#if defined(__arm__) || defined(__aarch64__) || defined (__mips__)
+#if defined(__arm__) || defined(__aarch64__) || defined (__mips__) || defined(__powerpc64__)
 // Clang does not accept regparm attribute on these platforms.
 // Fortunately, the default calling convention passes arguments in registers
 // anyway.
Index: packages/Python/lldbsuite/test/functionalities/watchpoint/multiple_hits/TestMultipleHits.py
===================================================================
--- packages/Python/lldbsuite/test/functionalities/watchpoint/multiple_hits/TestMultipleHits.py
+++ packages/Python/lldbsuite/test/functionalities/watchpoint/multiple_hits/TestMultipleHits.py
@@ -21,7 +21,7 @@
     @expectedFailureAll(
         oslist=["windows"],
         bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
-    @skipIf(bugnumber="llvm.org/pr30758", oslist=["linux"], archs=["arm", "aarch64"])
+    @skipIf(bugnumber="llvm.org/pr30758", oslist=["linux"], archs=["arm", "aarch64", "powerpc64le"])
     def test(self):
         self.build()
         exe = self.getBuildArtifact("a.out")


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42917.132857.patch
Type: text/x-patch
Size: 3273 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20180205/b8fbccfd/attachment-0001.bin>


More information about the lldb-commits mailing list