diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2017-04-20 21:21:28 +0000 | 
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2017-04-20 21:21:28 +0000 | 
| commit | d44a35e87e405ae98902dc491ba70ed82f58f592 (patch) | |
| tree | c943b2e42186cf1629dc15a3b6604514996993ee /packages/Python/lldbsuite/test/lang | |
| parent | 74a628f776edb588bff8f8f5cc16eac947c9d631 (diff) | |
Notes
Diffstat (limited to 'packages/Python/lldbsuite/test/lang')
| -rw-r--r-- | packages/Python/lldbsuite/test/lang/c/register_variables/test.c | 13 | ||||
| -rw-r--r-- | packages/Python/lldbsuite/test/lang/cpp/class_static/TestStaticVariables.py | 16 | 
2 files changed, 17 insertions, 12 deletions
| diff --git a/packages/Python/lldbsuite/test/lang/c/register_variables/test.c b/packages/Python/lldbsuite/test/lang/c/register_variables/test.c index 476c32899edc..b95253ef9eea 100644 --- a/packages/Python/lldbsuite/test/lang/c/register_variables/test.c +++ b/packages/Python/lldbsuite/test/lang/c/register_variables/test.c @@ -1,17 +1,26 @@  #include <stdio.h> +#if defined(__arm__) || defined(__aarch64__) +// Clang does not accept regparm attribute on these platforms. +// Fortunately, the default calling convention passes arguments in registers +// anyway. +#define REGPARM(N) +#else +#define REGPARM(N) __attribute__((regparm(N))) +#endif +  struct bar {    int m1;    int m2;  }; -void f1(int a, struct bar *b) __attribute__((noinline)) __attribute__((regparm(2))); +void f1(int a, struct bar *b) __attribute__((noinline)) REGPARM(2);  void f1(int a, struct bar *b)  {    b->m2 = b->m1 + a; // set breakpoint here  } -void f2(struct bar *b) __attribute__((noinline)) __attribute__((regparm(1))); +void f2(struct bar *b) __attribute__((noinline)) REGPARM(1);  void f2(struct bar *b)  {    int c = b->m2; diff --git a/packages/Python/lldbsuite/test/lang/cpp/class_static/TestStaticVariables.py b/packages/Python/lldbsuite/test/lang/cpp/class_static/TestStaticVariables.py index 10e29e9899dc..0100a2727b38 100644 --- a/packages/Python/lldbsuite/test/lang/cpp/class_static/TestStaticVariables.py +++ b/packages/Python/lldbsuite/test/lang/cpp/class_static/TestStaticVariables.py @@ -57,16 +57,12 @@ class StaticVariableTestCase(TestBase):                  startstr="(int) A::g_points[1].x = 11")      @expectedFailureAll( -        oslist=lldbplatformutil.getDarwinOSTriples(), -        bugnumber="<rdar://problem/28706946>") -    @expectedFailureAll( -        compiler=[ -            "clang", -            "gcc"], +        compiler=["gcc"],          bugnumber="Compiler emits incomplete debug info")      @expectedFailureAll( -        oslist=['freebsd'], -        bugnumber='llvm.org/pr20550 failing on FreeBSD-11') +        compiler=["clang"], +        compiler_version=["<", "3.8"], +        bugnumber='llvm.org/pr20550')      @add_test_categories(['pyapi'])      def test_with_python_api(self):          """Test Python APIs on file and class static variables.""" @@ -105,11 +101,11 @@ class StaticVariableTestCase(TestBase):              if name == 'g_points':                  self.assertTrue(                      val.GetValueType() == lldb.eValueTypeVariableStatic) -                self.assertTrue(val.GetNumChildren() == 2) +                self.assertEqual(val.GetNumChildren(), 2)              elif name == 'A::g_points':                  self.assertTrue(                      val.GetValueType() == lldb.eValueTypeVariableGlobal) -                self.assertTrue(val.GetNumChildren() == 2) +                self.assertEqual(val.GetNumChildren(), 2)                  child1 = val.GetChildAtIndex(1)                  self.DebugSBValue(child1)                  child1_x = child1.GetChildAtIndex(0) | 
