summaryrefslogtreecommitdiff
path: root/packages/Python/lldbsuite/test/lang/objc
diff options
context:
space:
mode:
Diffstat (limited to 'packages/Python/lldbsuite/test/lang/objc')
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/.categories1
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/bitfield_ivars/TestBitfieldIvars.py12
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/bitfield_ivars/main.m52
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/blocks/Makefile6
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/blocks/TestObjCIvarsInBlocks.py135
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/blocks/ivars-in-blocks.h11
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/blocks/ivars-in-blocks.m57
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/blocks/main.m10
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/conflicting-definition/Makefile23
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/conflicting-definition/Test/Foo.h9
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/conflicting-definition/Test/Test.h10
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/conflicting-definition/Test/Test.m8
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/conflicting-definition/Test/Test.mk10
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/conflicting-definition/TestConflictingDefinition.py53
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/conflicting-definition/TestExt/Foo.h9
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/conflicting-definition/TestExt/TestExt.h7
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/conflicting-definition/TestExt/TestExt.m8
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/conflicting-definition/TestExt/TestExt.mk10
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/conflicting-definition/main.m10
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/exceptions/Makefile9
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/exceptions/TestObjCExceptions.py205
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/exceptions/main.mm63
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/forward-decl/Container.h13
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/forward-decl/Container.m27
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/forward-decl/Makefile9
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/forward-decl/TestForwardDecl.py72
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/forward-decl/main.m14
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/foundation/Makefile8
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/foundation/TestConstStrings.py60
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/foundation/TestFoundationDisassembly.py162
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/foundation/TestObjCMethods.py327
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/foundation/TestObjCMethods2.py205
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/foundation/TestObjectDescriptionAPI.py78
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/foundation/TestRuntimeTypes.py62
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/foundation/TestSymbolTable.py74
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/foundation/const-strings.m24
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/foundation/main.m141
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/foundation/my-base.h8
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/foundation/my-base.m10
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/global_ptrs/Makefile6
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/global_ptrs/TestGlobalObjects.py60
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/global_ptrs/main.m11
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/hidden-ivars/InternalDefiner.h11
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/hidden-ivars/InternalDefiner.m31
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/hidden-ivars/Makefile9
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/hidden-ivars/TestHiddenIvars.py241
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/hidden-ivars/main.m54
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/ivar-IMP/Makefile28
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/ivar-IMP/TestObjCiVarIMP.py62
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/ivar-IMP/myclass.h6
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/ivar-IMP/myclass.m16
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/ivar-IMP/repro.m7
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/modules-auto-import/Makefile6
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/modules-auto-import/TestModulesAutoImport.py53
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/modules-auto-import/main.m7
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/modules-cache/Makefile3
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/modules-cache/TestClangModulesCache.py41
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/modules-cache/f.h1
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/modules-cache/main.m5
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/modules-cache/module.modulemap3
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/modules-incomplete/Makefile8
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/modules-incomplete/TestIncompleteModules.py64
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/modules-incomplete/main.m7
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/modules-incomplete/minmax.h2
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/modules-incomplete/module.map9
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/modules-incomplete/myModule.h5
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/modules-incomplete/myModule.m8
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/Makefile9
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/TestModulesInlineFunctions.py47
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/main.m9
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/module.map4
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/myModule.c7
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/myModule.h7
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/modules/Makefile7
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/modules/TestObjCModules.py80
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/modules/main.m12
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc++/Makefile6
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc++/TestObjCXX.py36
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc++/main.mm19
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-baseclass-sbtype/Makefile6
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-baseclass-sbtype/TestObjCBaseClassSBType.py68
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-baseclass-sbtype/main.m22
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-builtin-types/Makefile5
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-builtin-types/TestObjCBuiltinTypes.py64
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-builtin-types/main.cpp9
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-checker/Makefile6
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-checker/TestObjCCheckers.py79
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-checker/main.m32
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-class-method/Makefile6
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-class-method/TestObjCClassMethod.py68
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-class-method/class.m24
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-dyn-sbtype/.categories1
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-dyn-sbtype/Makefile7
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-dyn-sbtype/TestObjCDynamicSBType.py93
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-dyn-sbtype/main.m53
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-dynamic-value/Makefile6
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-dynamic-value/TestObjCDynamicValue.py211
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-dynamic-value/dynamic-value.m147
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-foundation-dictionary-empty/TestNSDictionary0.py6
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-foundation-dictionary-empty/main.m7
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-ivar-offsets/Makefile6
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-ivar-offsets/TestObjCIvarOffsets.py86
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-ivar-offsets/main.m15
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-ivar-offsets/objc-ivar-offsets.h27
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-ivar-offsets/objc-ivar-offsets.m19
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-ivar-protocols/TestIvarProtocols.py6
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-ivar-protocols/main.m33
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-ivar-stripped/Makefile15
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-ivar-stripped/TestObjCIvarStripped.py70
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-ivar-stripped/main.m33
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/Makefile7
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/TestObjCNewSyntax.py204
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/main.m21
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-optimized/Makefile8
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-optimized/TestObjcOptimized.py76
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-optimized/main.m44
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-property/Makefile6
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-property/TestObjCProperty.py139
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-property/main.m113
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-runtime-ivars/Makefile6
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-runtime-ivars/TestRuntimeIvars.py6
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-runtime-ivars/main.m10
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-static-method-stripped/Makefile16
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-static-method-stripped/TestObjCStaticMethodStripped.py80
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-static-method-stripped/static.m29
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-static-method/Makefile6
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-static-method/TestObjCStaticMethod.py75
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-static-method/static.m29
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-stepping/Makefile6
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-stepping/TestObjCStepping.py222
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-stepping/stepping-tests.m138
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-struct-argument/Makefile6
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-struct-argument/TestObjCStructArgument.py69
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-struct-argument/test.m40
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-struct-return/Makefile6
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-struct-return/TestObjCStructReturn.py62
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-struct-return/test.m23
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-super/Makefile6
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-super/TestObjCSuper.py67
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-super/class.m39
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/orderedset/Makefile6
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/orderedset/TestOrderedSet.py18
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/orderedset/main.m8
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/print-obj/Makefile6
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/print-obj/TestPrintObj.py93
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/print-obj/blocked.m73
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/ptr_refs/Makefile5
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/ptr_refs/TestPtrRefsObjC.py49
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/ptr_refs/main.m39
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/radar-9691614/Makefile7
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/radar-9691614/TestObjCMethodReturningBOOL.py48
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/radar-9691614/main.m67
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/rdar-10967107/Makefile7
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/rdar-10967107/TestRdar10967107.py73
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/rdar-10967107/main.m13
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/rdar-11355592/Makefile7
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/rdar-11355592/TestRdar11355592.py82
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/rdar-11355592/main.m37
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/rdar-12408181/Makefile11
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/rdar-12408181/TestRdar12408181.py72
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/rdar-12408181/main.m24
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/real-definition/Bar.h12
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/real-definition/Bar.m43
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/real-definition/Foo.h11
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/real-definition/Foo.m25
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/real-definition/Makefile6
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/real-definition/TestRealDefinition.py101
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/real-definition/main.m13
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/sample/Makefile6
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/sample/main.m70
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/self/Makefile6
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/self/TestObjCSelf.py39
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/self/main.m54
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/Makefile7
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/TestObjCSingleEntryDictionary.py79
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/main.m7
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/unicode-string/TestUnicodeString.py6
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/unicode-string/main.m5
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/variadic_methods/TestVariadicMethods.py6
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/variadic_methods/main.m31
180 files changed, 0 insertions, 7080 deletions
diff --git a/packages/Python/lldbsuite/test/lang/objc/.categories b/packages/Python/lldbsuite/test/lang/objc/.categories
deleted file mode 100644
index 72cf07c1efea..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/.categories
+++ /dev/null
@@ -1 +0,0 @@
-objc
diff --git a/packages/Python/lldbsuite/test/lang/objc/bitfield_ivars/TestBitfieldIvars.py b/packages/Python/lldbsuite/test/lang/objc/bitfield_ivars/TestBitfieldIvars.py
deleted file mode 100644
index c0d006ee53a8..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/bitfield_ivars/TestBitfieldIvars.py
+++ /dev/null
@@ -1,12 +0,0 @@
-from lldbsuite.test import lldbinline
-from lldbsuite.test import decorators
-
-lldbinline.MakeInlineTest(
- __file__,
- globals(),
- [
- # This is a Darwin-only failure related to incorrect expression-
- # evaluation for single-bit ObjC bitfields.
- decorators.skipUnlessDarwin,
- decorators.expectedFailureAll(
- bugnumber="rdar://problem/17990991")])
diff --git a/packages/Python/lldbsuite/test/lang/objc/bitfield_ivars/main.m b/packages/Python/lldbsuite/test/lang/objc/bitfield_ivars/main.m
deleted file mode 100644
index 9ee3bbe66770..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/bitfield_ivars/main.m
+++ /dev/null
@@ -1,52 +0,0 @@
-//===-- main.m -------------------------------------------*- Objective-C-*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#import <Foundation/Foundation.h>
-
-@interface HasBitfield : NSObject {
-@public
- unsigned field1 : 1;
- unsigned field2 : 1;
-};
-
--(id)init;
-@end
-
-@implementation HasBitfield
--(id)init {
- self = [super init];
- field1 = 0;
- field2 = 1;
- return self;
-}
-@end
-
-@interface ContainsAHasBitfield : NSObject {
-@public
- HasBitfield *hb;
-};
--(id)init;
-@end
-
-@implementation ContainsAHasBitfield
--(id)init {
- self = [super init];
- hb = [[HasBitfield alloc] init];
- return self;
-}
-
-@end
-
-int main(int argc, const char * argv[]) {
- ContainsAHasBitfield *chb = [[ContainsAHasBitfield alloc] init];
- printf("%d\n", chb->hb->field2); //% self.expect("expression -- chb->hb->field1", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["= 0"])
- //% self.expect("expression -- chb->hb->field2", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["= 1"]) # this must happen second
- return 0;
-}
-
diff --git a/packages/Python/lldbsuite/test/lang/objc/blocks/Makefile b/packages/Python/lldbsuite/test/lang/objc/blocks/Makefile
deleted file mode 100644
index 0af83591826f..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/blocks/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-LEVEL = ../../../make
-
-OBJC_SOURCES := ivars-in-blocks.m main.m
-LDFLAGS = $(CFLAGS) -lobjc -framework Foundation
-
-include $(LEVEL)/Makefile.rules
diff --git a/packages/Python/lldbsuite/test/lang/objc/blocks/TestObjCIvarsInBlocks.py b/packages/Python/lldbsuite/test/lang/objc/blocks/TestObjCIvarsInBlocks.py
deleted file mode 100644
index d69a171bc7b8..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/blocks/TestObjCIvarsInBlocks.py
+++ /dev/null
@@ -1,135 +0,0 @@
-"""Test printing ivars and ObjC objects captured in blocks that are made in methods of an ObjC class."""
-
-from __future__ import print_function
-
-
-import os
-import time
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestObjCIvarsInBlocks(TestBase):
-
- mydir = TestBase.compute_mydir(__file__)
-
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
- # Find the line numbers to break inside main().
- self.main_source = "main.m"
- self.class_source = "ivars-in-blocks.m"
- self.class_source_file_spec = lldb.SBFileSpec(self.class_source)
-
- @skipUnlessDarwin
- @add_test_categories(['pyapi'])
- @expectedFailureAll(
- archs=["i[3-6]86"],
- bugnumber="This test requires the 2.0 runtime, so it will fail on i386")
- def test_with_python_api(self):
- """Test printing the ivars of the self when captured in blocks"""
- self.build()
- exe = self.getBuildArtifact("a.out")
-
- target = self.dbg.CreateTarget(exe)
- self.assertTrue(target, VALID_TARGET)
-
- breakpoint = target.BreakpointCreateBySourceRegex(
- '// Break here inside the block.', self.class_source_file_spec)
- self.assertTrue(breakpoint, VALID_BREAKPOINT)
-
- breakpoint_two = target.BreakpointCreateBySourceRegex(
- '// Break here inside the class method block.', self.class_source_file_spec)
- self.assertTrue(breakpoint, VALID_BREAKPOINT)
-
- process = target.LaunchSimple(
- None, None, self.get_process_working_directory())
- self.assertTrue(process, "Created a process.")
- self.assertTrue(
- process.GetState() == lldb.eStateStopped,
- "Stopped it too.")
-
- thread_list = lldbutil.get_threads_stopped_at_breakpoint(
- process, breakpoint)
- self.assertTrue(len(thread_list) == 1)
- thread = thread_list[0]
-
- frame = thread.GetFrameAtIndex(0)
- self.assertTrue(frame, "frame 0 is valid")
-
- # First use the FindVariable API to see if we can find the ivar by
- # undecorated name:
- direct_blocky = frame.GetValueForVariablePath("blocky_ivar")
- self.assertTrue(direct_blocky, "Found direct access to blocky_ivar.")
-
- # Now get it as a member of "self" and make sure the two values are
- # equal:
- self_var = frame.GetValueForVariablePath("self")
- self.assertTrue(self_var, "Found self in block.")
- indirect_blocky = self_var.GetChildMemberWithName("blocky_ivar")
- self.assertTrue(indirect_blocky, "Found blocky_ivar through self")
-
- error = lldb.SBError()
- direct_value = direct_blocky.GetValueAsSigned(error)
- self.assertTrue(error.Success(), "Got direct value for blocky_ivar")
-
- indirect_value = indirect_blocky.GetValueAsSigned(error)
- self.assertTrue(error.Success(), "Got indirect value for blocky_ivar")
-
- self.assertTrue(
- direct_value == indirect_value,
- "Direct and indirect values are equal.")
-
- # Now make sure that we can get at the captured ivar through the expression parser.
- # Doing a little trivial math will force this into the real expression
- # parser:
- direct_expr = frame.EvaluateExpression("blocky_ivar + 10")
- self.assertTrue(
- direct_expr,
- "Got blocky_ivar through the expression parser")
-
- # Again, get the value through self directly and make sure they are the
- # same:
- indirect_expr = frame.EvaluateExpression("self->blocky_ivar + 10")
- self.assertTrue(
- indirect_expr,
- "Got blocky ivar through expression parser using self.")
-
- direct_value = direct_expr.GetValueAsSigned(error)
- self.assertTrue(
- error.Success(),
- "Got value from direct use of expression parser")
-
- indirect_value = indirect_expr.GetValueAsSigned(error)
- self.assertTrue(
- error.Success(),
- "Got value from indirect access using the expression parser")
-
- self.assertTrue(
- direct_value == indirect_value,
- "Direct ivar access and indirect through expression parser produce same value.")
-
- process.Continue()
- self.assertTrue(
- process.GetState() == lldb.eStateStopped,
- "Stopped at the second breakpoint.")
-
- thread_list = lldbutil.get_threads_stopped_at_breakpoint(
- process, breakpoint_two)
- self.assertTrue(len(thread_list) == 1)
- thread = thread_list[0]
-
- frame = thread.GetFrameAtIndex(0)
- self.assertTrue(frame, "frame 0 is valid")
-
- expr = frame.EvaluateExpression("(ret)")
- self.assertTrue(
- expr, "Successfully got a local variable in a block in a class method.")
-
- ret_value_signed = expr.GetValueAsSigned(error)
- # print('ret_value_signed = %i' % (ret_value_signed))
- self.assertTrue(
- ret_value_signed == 5,
- "The local variable in the block was what we expected.")
diff --git a/packages/Python/lldbsuite/test/lang/objc/blocks/ivars-in-blocks.h b/packages/Python/lldbsuite/test/lang/objc/blocks/ivars-in-blocks.h
deleted file mode 100644
index 1ceac3361ac0..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/blocks/ivars-in-blocks.h
+++ /dev/null
@@ -1,11 +0,0 @@
-#import <Foundation/Foundation.h>
-
-@interface IAmBlocky : NSObject
-{
- @public
- int blocky_ivar;
-}
-+ (void) classMethod;
-- (IAmBlocky *) init;
-- (int) callABlock: (int) block_value;
-@end
diff --git a/packages/Python/lldbsuite/test/lang/objc/blocks/ivars-in-blocks.m b/packages/Python/lldbsuite/test/lang/objc/blocks/ivars-in-blocks.m
deleted file mode 100644
index 1098a9136ae2..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/blocks/ivars-in-blocks.m
+++ /dev/null
@@ -1,57 +0,0 @@
-#import "ivars-in-blocks.h"
-
-typedef int (^my_block_ptr_type) (int);
-
-@interface IAmBlocky()
-{
- int _hidden_ivar;
- my_block_ptr_type _block_ptr;
-}
-
-@end
-
-@implementation IAmBlocky
-
-+ (int) addend
-{
- return 3;
-}
-
-+ (void) classMethod
-{
- int (^my_block)(int) = ^(int foo)
- {
- int ret = foo + [self addend];
- return ret; // Break here inside the class method block.
- };
- printf("%d\n", my_block(2));
-}
-
-- (void) makeBlockPtr;
-{
- _block_ptr = ^(int inval)
- {
- _hidden_ivar += inval;
- return blocky_ivar * inval; // Break here inside the block.
- };
-}
-
-- (IAmBlocky *) init
-{
- blocky_ivar = 10;
- _hidden_ivar = 20;
- // Interesting... Apparently you can't make a block in your init method. This crashes...
- // [self makeBlockPtr];
- return self;
-}
-
-- (int) callABlock: (int) block_value
-{
- if (_block_ptr == NULL)
- [self makeBlockPtr];
- int ret = _block_ptr (block_value);
- [IAmBlocky classMethod];
- return ret;
-}
-@end
-
diff --git a/packages/Python/lldbsuite/test/lang/objc/blocks/main.m b/packages/Python/lldbsuite/test/lang/objc/blocks/main.m
deleted file mode 100644
index 0c56f45da464..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/blocks/main.m
+++ /dev/null
@@ -1,10 +0,0 @@
-#import "ivars-in-blocks.h"
-
-int
-main (int argc, char **argv)
-{
- IAmBlocky *my_blocky = [[IAmBlocky alloc] init];
- int blocky_value;
- blocky_value = [my_blocky callABlock: 33];
- return 0;
-}
diff --git a/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/Makefile b/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/Makefile
deleted file mode 100644
index 346fc4b1fbc5..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/Makefile
+++ /dev/null
@@ -1,23 +0,0 @@
-LEVEL = ../../../make
-
-LD_EXTRAS = -lobjc -framework Foundation
-
-include $(LEVEL)/Makefile.rules
-
-all: a.out
-
-libTest.dylib: Test/Test.m
- mkdir -p Test
- $(MAKE) MAKE_DSYM=YES VPATH=$(SRCDIR) -I $(SRCDIR) -f $(SRCDIR)/Test/Test.mk all
-
-libTestExt.dylib: TestExt/TestExt.m
- mkdir -p TestExt
- $(MAKE) MAKE_DSYM=YES VPATH=$(SRCDIR) -I $(SRCDIR) -f $(SRCDIR)/TestExt/TestExt.mk all
-
-a.out: main.m libTest.dylib libTestExt.dylib
- $(CC) $(LDFLAGS) -I$(SRCDIR) -L. -lTest -lTestExt -o a.out $<
-
-clean::
- rm -rf libTest.dylib libTestExt.dylib a.out Test.o TestExt.o libTest.dylib.dSYM libTestExt.dylib.dSYM
- $(MAKE) MAKE_DSYM=YES VPATH=$(SRCDIR) -I $(SRCDIR) -f $(SRCDIR)/Test/Test.mk clean
- $(MAKE) MAKE_DSYM=YES VPATH=$(SRCDIR) -I $(SRCDIR) -f $(SRCDIR)/TestExt/TestExt.mk clean
diff --git a/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/Test/Foo.h b/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/Test/Foo.h
deleted file mode 100644
index db07f50d5d60..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/Test/Foo.h
+++ /dev/null
@@ -1,9 +0,0 @@
-#ifndef __Foo_h__
-#define __Foo_h__
-
-typedef struct {
- float start;
- float duration;
-} CMTimeRange;
-
-#endif
diff --git a/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/Test/Test.h b/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/Test/Test.h
deleted file mode 100644
index 73928c5fb0da..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/Test/Test.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#import <Foundation/Foundation.h>
-#import <Test/Foo.h>
-
-@interface Test : NSObject {
-@public
- CMTimeRange _range;
-}
-- (void) doTest;
-@end
-
diff --git a/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/Test/Test.m b/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/Test/Test.m
deleted file mode 100644
index 6b2cb3af8086..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/Test/Test.m
+++ /dev/null
@@ -1,8 +0,0 @@
-#import "Test.h"
-
-@implementation Test
-- (void) doTest {
- NSLog(@"-[Test doTest]");
-}
-@end
-
diff --git a/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/Test/Test.mk b/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/Test/Test.mk
deleted file mode 100644
index be758ac07d85..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/Test/Test.mk
+++ /dev/null
@@ -1,10 +0,0 @@
-LEVEL = ../../../make
-
-DYLIB_NAME := Test
-DYLIB_ONLY := YES
-CFLAGS_EXTRAS = -I$(SRCDIR)/..
-LD_EXTRAS = -lobjc -framework Foundation
-
-DYLIB_OBJC_SOURCES = Test/Test.m
-
-include $(LEVEL)/Makefile.rules
diff --git a/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/TestConflictingDefinition.py b/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/TestConflictingDefinition.py
deleted file mode 100644
index 264a17c37960..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/TestConflictingDefinition.py
+++ /dev/null
@@ -1,53 +0,0 @@
-"""Test that types defined in shared libraries work correctly."""
-
-from __future__ import print_function
-
-
-import os
-import time
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestRealDefinition(TestBase):
-
- mydir = TestBase.compute_mydir(__file__)
-
- @skipUnlessDarwin
- def test_frame_var_after_stop_at_implementation(self):
- """Test that we can find the implementation for an objective C type"""
- if self.getArchitecture() == 'i386':
- self.skipTest("requires modern objc runtime")
- self.build()
- self.shlib_names = ["libTestExt.dylib", "libTest.dylib"]
- self.common_setup()
-
- line = line_number('TestExt/TestExt.m', '// break here')
- lldbutil.run_break_set_by_file_and_line(
- self, 'TestExt.m', line, num_expected_locations=1, loc_exact=True)
-
- self.runCmd("run", RUN_SUCCEEDED)
-
- # The stop reason of the thread should be breakpoint.
- self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
- substrs=['stopped',
- 'stop reason = breakpoint'])
-
- self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
- substrs=[' resolved, hit count = 1'])
-
- # This should display correctly.
- self.expect(
- "expr 42",
- "A simple expression should execute correctly",
- substrs=[
- "42"])
-
- def common_setup(self):
- exe = self.getBuildArtifact("a.out")
- target = self.dbg.CreateTarget(exe)
- self.registerSharedLibrariesWithTarget(target, self.shlib_names)
-
- self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
diff --git a/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/TestExt/Foo.h b/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/TestExt/Foo.h
deleted file mode 100644
index 7c90e6ca8e3e..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/TestExt/Foo.h
+++ /dev/null
@@ -1,9 +0,0 @@
-#ifndef __Foo_h__
-#define __Foo_h__
-
-typedef struct {
- float s;
- float d;
-} CMTimeRange;
-
-#endif
diff --git a/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/TestExt/TestExt.h b/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/TestExt/TestExt.h
deleted file mode 100644
index 243443c647b4..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/TestExt/TestExt.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#import <TestExt/Foo.h>
-#import <Test/Test.h>
-struct CMTimeRange;
-
-@interface Test (Stuff)
-- (void)doSomethingElse: (CMTimeRange *)range_ptr;
-@end
diff --git a/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/TestExt/TestExt.m b/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/TestExt/TestExt.m
deleted file mode 100644
index a14c702787db..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/TestExt/TestExt.m
+++ /dev/null
@@ -1,8 +0,0 @@
-#import "TestExt.h"
-#import "Foo.h"
-
-@implementation Test (Stuff)
-- (void)doSomethingElse: (CMTimeRange *)range_ptr {
- NSLog(@"doSomethingElse: %p", range_ptr); // break here
-}
-@end
diff --git a/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/TestExt/TestExt.mk b/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/TestExt/TestExt.mk
deleted file mode 100644
index 285d7262ce82..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/TestExt/TestExt.mk
+++ /dev/null
@@ -1,10 +0,0 @@
-LEVEL = ../../../make
-
-DYLIB_NAME := TestExt
-DYLIB_ONLY := YES
-CFLAGS_EXTRAS = -I$(SRCDIR)/..
-LD_EXTRAS = -L. -lTest -lobjc -framework Foundation
-
-DYLIB_OBJC_SOURCES = TestExt/TestExt.m
-
-include $(LEVEL)/Makefile.rules
diff --git a/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/main.m b/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/main.m
deleted file mode 100644
index 6a714577a353..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/main.m
+++ /dev/null
@@ -1,10 +0,0 @@
-#import <Test/Test.h>
-#import <TestExt/TestExt.h>
-
-int main() {
- @autoreleasepool {
- Test *test = [[Test alloc] init];
- [test doSomethingElse:&test->_range];
- }
-}
-
diff --git a/packages/Python/lldbsuite/test/lang/objc/exceptions/Makefile b/packages/Python/lldbsuite/test/lang/objc/exceptions/Makefile
deleted file mode 100644
index 261658b10ae8..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/exceptions/Makefile
+++ /dev/null
@@ -1,9 +0,0 @@
-LEVEL = ../../../make
-
-OBJCXX_SOURCES := main.mm
-
-CFLAGS_EXTRAS += -w
-
-include $(LEVEL)/Makefile.rules
-
-LDFLAGS += -framework Foundation
diff --git a/packages/Python/lldbsuite/test/lang/objc/exceptions/TestObjCExceptions.py b/packages/Python/lldbsuite/test/lang/objc/exceptions/TestObjCExceptions.py
deleted file mode 100644
index 92b32504cf20..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/exceptions/TestObjCExceptions.py
+++ /dev/null
@@ -1,205 +0,0 @@
-# encoding: utf-8
-"""
-Test lldb Obj-C exception support.
-"""
-
-from __future__ import print_function
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ObjCExceptionsTestCase(TestBase):
-
- mydir = TestBase.compute_mydir(__file__)
-
- @skipUnlessDarwin
- def test_objc_exceptions_at_throw(self):
- self.build()
-
- target = self.dbg.CreateTarget(self.getBuildArtifact("a.out"))
- self.assertTrue(target, VALID_TARGET)
-
- launch_info = lldb.SBLaunchInfo(["a.out", "0"])
- lldbutil.run_to_name_breakpoint(self, "objc_exception_throw", launch_info=launch_info)
-
- self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
- substrs=['stopped', 'stop reason = breakpoint'])
-
- self.expect('thread exception', substrs=[
- '(NSException *) exception = ',
- 'name: "ThrownException" - reason: "SomeReason"',
- ])
-
- target = self.dbg.GetSelectedTarget()
- thread = target.GetProcess().GetSelectedThread()
- frame = thread.GetSelectedFrame()
-
- opts = lldb.SBVariablesOptions()
- opts.SetIncludeRecognizedArguments(True)
- variables = frame.GetVariables(opts)
-
- self.assertEqual(variables.GetSize(), 1)
- self.assertEqual(variables.GetValueAtIndex(0).name, "exception")
-
- lldbutil.run_to_source_breakpoint(self, "// Set break point at this line.", lldb.SBFileSpec("main.mm"), launch_info=launch_info)
-
- self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
- substrs=['stopped', 'stop reason = breakpoint'])
-
- target = self.dbg.GetSelectedTarget()
- thread = target.GetProcess().GetSelectedThread()
- frame = thread.GetSelectedFrame()
-
- # No exception being currently thrown/caught at this point
- self.assertFalse(thread.GetCurrentException().IsValid())
- self.assertFalse(thread.GetCurrentExceptionBacktrace().IsValid())
-
- self.expect(
- 'frame variable e1',
- substrs=[
- '(NSException *) e1 = ',
- 'name: "ExceptionName" - reason: "SomeReason"'
- ])
-
- self.expect(
- 'frame variable --dynamic-type no-run-target *e1',
- substrs=[
- '(NSException) *e1 = ',
- 'name = ', '"ExceptionName"',
- 'reason = ', '"SomeReason"',
- 'userInfo = ', '1 key/value pair',
- 'reserved = ', 'nil',
- ])
-
- e1 = frame.FindVariable("e1")
- self.assertTrue(e1)
- self.assertEqual(e1.type.name, "NSException *")
- self.assertEqual(e1.GetSummary(), 'name: "ExceptionName" - reason: "SomeReason"')
- self.assertEqual(e1.GetChildMemberWithName("name").description, "ExceptionName")
- self.assertEqual(e1.GetChildMemberWithName("reason").description, "SomeReason")
- userInfo = e1.GetChildMemberWithName("userInfo").dynamic
- self.assertEqual(userInfo.summary, "1 key/value pair")
- self.assertEqual(userInfo.GetChildAtIndex(0).GetChildAtIndex(0).description, "some_key")
- self.assertEqual(userInfo.GetChildAtIndex(0).GetChildAtIndex(1).description, "some_value")
- self.assertEqual(e1.GetChildMemberWithName("reserved").description, "<nil>")
-
- self.expect(
- 'frame variable e2',
- substrs=[
- '(NSException *) e2 = ',
- 'name: "ThrownException" - reason: "SomeReason"'
- ])
-
- self.expect(
- 'frame variable --dynamic-type no-run-target *e2',
- substrs=[
- '(NSException) *e2 = ',
- 'name = ', '"ThrownException"',
- 'reason = ', '"SomeReason"',
- 'userInfo = ', '1 key/value pair',
- 'reserved = ',
- ])
-
- e2 = frame.FindVariable("e2")
- self.assertTrue(e2)
- self.assertEqual(e2.type.name, "NSException *")
- self.assertEqual(e2.GetSummary(), 'name: "ThrownException" - reason: "SomeReason"')
- self.assertEqual(e2.GetChildMemberWithName("name").description, "ThrownException")
- self.assertEqual(e2.GetChildMemberWithName("reason").description, "SomeReason")
- userInfo = e2.GetChildMemberWithName("userInfo").dynamic
- self.assertEqual(userInfo.summary, "1 key/value pair")
- self.assertEqual(userInfo.GetChildAtIndex(0).GetChildAtIndex(0).description, "some_key")
- self.assertEqual(userInfo.GetChildAtIndex(0).GetChildAtIndex(1).description, "some_value")
- reserved = e2.GetChildMemberWithName("reserved").dynamic
- self.assertGreater(reserved.num_children, 0)
- callStackReturnAddresses = [reserved.GetChildAtIndex(i).GetChildAtIndex(1) for i in range(0, reserved.GetNumChildren())
- if reserved.GetChildAtIndex(i).GetChildAtIndex(0).description == "callStackReturnAddresses"][0].dynamic
- children = [callStackReturnAddresses.GetChildAtIndex(i) for i in range(0, callStackReturnAddresses.num_children)]
-
- pcs = [i.unsigned for i in children]
- names = [target.ResolveSymbolContextForAddress(lldb.SBAddress(pc, target), lldb.eSymbolContextSymbol).GetSymbol().name for pc in pcs]
- for n in ["objc_exception_throw", "foo(int)", "main"]:
- self.assertTrue(n in names, "%s is in the exception backtrace (%s)" % (n, names))
-
- @skipUnlessDarwin
- def test_objc_exceptions_at_abort(self):
- self.build()
-
- target = self.dbg.CreateTarget(self.getBuildArtifact("a.out"))
- self.assertTrue(target, VALID_TARGET)
-
- self.runCmd("run 0")
-
- # We should be stopped at pthread_kill because of an unhandled exception
- self.expect("thread list",
- substrs=['stopped', 'stop reason = signal SIGABRT'])
-
- self.expect('thread exception', substrs=[
- '(NSException *) exception = ',
- 'name: "ThrownException" - reason: "SomeReason"',
- 'libobjc.A.dylib`objc_exception_throw',
- 'a.out`foo', 'at main.mm:25',
- 'a.out`rethrow', 'at main.mm:36',
- 'a.out`main',
- ])
-
- process = self.dbg.GetSelectedTarget().process
- thread = process.GetSelectedThread()
-
- # There is an exception being currently processed at this point
- self.assertTrue(thread.GetCurrentException().IsValid())
- self.assertTrue(thread.GetCurrentExceptionBacktrace().IsValid())
-
- history_thread = thread.GetCurrentExceptionBacktrace()
- self.assertGreaterEqual(history_thread.num_frames, 4)
- for n in ["objc_exception_throw", "foo(int)", "rethrow(int)", "main"]:
- self.assertEqual(len([f for f in history_thread.frames if f.GetFunctionName() == n]), 1)
-
- self.runCmd("kill")
-
- self.runCmd("run 1")
- # We should be stopped at pthread_kill because of an unhandled exception
- self.expect("thread list",
- substrs=['stopped', 'stop reason = signal SIGABRT'])
-
- self.expect('thread exception', substrs=[
- '(MyCustomException *) exception = ',
- 'libobjc.A.dylib`objc_exception_throw',
- 'a.out`foo', 'at main.mm:27',
- 'a.out`rethrow', 'at main.mm:36',
- 'a.out`main',
- ])
-
- process = self.dbg.GetSelectedTarget().process
- thread = process.GetSelectedThread()
-
- history_thread = thread.GetCurrentExceptionBacktrace()
- self.assertGreaterEqual(history_thread.num_frames, 4)
- for n in ["objc_exception_throw", "foo(int)", "rethrow(int)", "main"]:
- self.assertEqual(len([f for f in history_thread.frames if f.GetFunctionName() == n]), 1)
-
- @skipUnlessDarwin
- def test_cxx_exceptions_at_abort(self):
- self.build()
-
- target = self.dbg.CreateTarget(self.getBuildArtifact("a.out"))
- self.assertTrue(target, VALID_TARGET)
-
- self.runCmd("run 2")
-
- # We should be stopped at pthread_kill because of an unhandled exception
- self.expect("thread list",
- substrs=['stopped', 'stop reason = signal SIGABRT'])
-
- self.expect('thread exception', substrs=[])
-
- process = self.dbg.GetSelectedTarget().process
- thread = process.GetSelectedThread()
-
- # C++ exceptions are not exposed in the API (yet).
- self.assertFalse(thread.GetCurrentException().IsValid())
- self.assertFalse(thread.GetCurrentExceptionBacktrace().IsValid())
diff --git a/packages/Python/lldbsuite/test/lang/objc/exceptions/main.mm b/packages/Python/lldbsuite/test/lang/objc/exceptions/main.mm
deleted file mode 100644
index 5683882486d8..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/exceptions/main.mm
+++ /dev/null
@@ -1,63 +0,0 @@
-//===-- main.m ------------------------------------------------*- ObjC -*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#import <Foundation/Foundation.h>
-
-#import <exception>
-#import <stdexcept>
-
-@interface MyCustomException: NSException
-@end
-@implementation MyCustomException
-@end
-
-void foo(int n)
-{
- NSDictionary *info = [NSDictionary dictionaryWithObjectsAndKeys:@"some_value", @"some_key", nil];
- switch (n) {
- case 0:
- @throw [[NSException alloc] initWithName:@"ThrownException" reason:@"SomeReason" userInfo:info];
- case 1:
- @throw [[MyCustomException alloc] initWithName:@"ThrownException" reason:@"SomeReason" userInfo:info];
- case 2:
- throw std::runtime_error("C++ exception");
- }
-}
-
-void rethrow(int n)
-{
- @try {
- foo(n);
- } @catch(NSException *e) {
- @throw;
- }
-}
-
-int main(int argc, const char * argv[])
-{
- NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
-
- NSDictionary *info = [NSDictionary dictionaryWithObjectsAndKeys:@"some_value", @"some_key", nil];
- NSException *e1 = [[NSException alloc] initWithName:@"ExceptionName" reason:@"SomeReason" userInfo:info];
- NSException *e2;
-
- @try {
- foo(atoi(argv[1]));
- } @catch(NSException *e) {
- e2 = e;
- }
-
- NSLog(@"1"); // Set break point at this line.
-
- rethrow(atoi(argv[1]));
-
- [pool drain];
- return 0;
-}
-
diff --git a/packages/Python/lldbsuite/test/lang/objc/forward-decl/Container.h b/packages/Python/lldbsuite/test/lang/objc/forward-decl/Container.h
deleted file mode 100644
index 85bbd06b161c..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/forward-decl/Container.h
+++ /dev/null
@@ -1,13 +0,0 @@
-#import <Foundation/Foundation.h>
-
-@class ForwardDeclaredClass;
-
-@interface Container : NSObject {
-@public
- ForwardDeclaredClass *member;
-}
-
--(id)init;
--(ForwardDeclaredClass*)getMember;
-
-@end
diff --git a/packages/Python/lldbsuite/test/lang/objc/forward-decl/Container.m b/packages/Python/lldbsuite/test/lang/objc/forward-decl/Container.m
deleted file mode 100644
index 4d2139ff5fc6..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/forward-decl/Container.m
+++ /dev/null
@@ -1,27 +0,0 @@
-#import "Container.h"
-
-@interface ForwardDeclaredClass : NSObject
-{
- int a;
- int b;
-}
-@end
-
-@implementation ForwardDeclaredClass
-
-@end
-
-@implementation Container
-
--(id)init
-{
- member = [ForwardDeclaredClass alloc];
- return [super init];
-}
-
--(ForwardDeclaredClass *)getMember
-{
- return member;
-}
-
-@end
diff --git a/packages/Python/lldbsuite/test/lang/objc/forward-decl/Makefile b/packages/Python/lldbsuite/test/lang/objc/forward-decl/Makefile
deleted file mode 100644
index b99925b50b38..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/forward-decl/Makefile
+++ /dev/null
@@ -1,9 +0,0 @@
-LEVEL = ../../../make
-
-DYLIB_NAME := Container
-DYLIB_OBJC_SOURCES := Container.m
-OBJC_SOURCES := main.m
-
-include $(LEVEL)/Makefile.rules
-
-LDFLAGS += -framework Foundation
diff --git a/packages/Python/lldbsuite/test/lang/objc/forward-decl/TestForwardDecl.py b/packages/Python/lldbsuite/test/lang/objc/forward-decl/TestForwardDecl.py
deleted file mode 100644
index 218d73c72fdb..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/forward-decl/TestForwardDecl.py
+++ /dev/null
@@ -1,72 +0,0 @@
-"""Test that a forward-declared class works when its complete definition is in a library"""
-
-from __future__ import print_function
-
-
-import os
-import time
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ForwardDeclTestCase(TestBase):
-
- mydir = TestBase.compute_mydir(__file__)
-
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
- # Find the line number to break inside main().
- self.source = 'main.m'
- self.line = line_number(self.source, '// Set breakpoint 0 here.')
- self.shlib_names = ["Container"]
-
- def do_test(self, dictionary=None):
- self.build(dictionary=dictionary)
-
- # Create a target by the debugger.
- target = self.dbg.CreateTarget(self.getBuildArtifact("a.out"))
- self.assertTrue(target, VALID_TARGET)
-
- # Create the breakpoint inside function 'main'.
- breakpoint = target.BreakpointCreateByLocation(self.source, self.line)
- self.assertTrue(breakpoint, VALID_BREAKPOINT)
-
- # Register our shared libraries for remote targets so they get
- # automatically uploaded
- environment = self.registerSharedLibrariesWithTarget(
- target, self.shlib_names)
-
- # Now launch the process, and do not stop at entry point.
- process = target.LaunchSimple(
- None, environment, self.get_process_working_directory())
- self.assertTrue(process, PROCESS_IS_VALID)
-
- # The stop reason of the thread should be breakpoint.
- self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
- substrs=['stopped',
- 'stop reason = breakpoint'])
-
- # The breakpoint should have a hit count of 1.
- self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
- substrs=[' resolved, hit count = 1'])
-
- # This should display correctly.
- self.expect("expression [j getMember]", VARIABLES_DISPLAYED_CORRECTLY,
- substrs=["= 0x"])
-
- @skipUnlessDarwin
- def test_expr(self):
- self.do_test()
-
- @no_debug_info_test
- @skipUnlessDarwin
- @skipIf(compiler=no_match("clang"))
- @skipIf(compiler_version=["<", "7.0"])
- def test_debug_names(self):
- """Test that we are able to find complete types when using DWARF v5
- accelerator tables"""
- self.do_test(
- dict(CFLAGS_EXTRAS="-dwarf-version=5 -mllvm -accel-tables=Dwarf"))
diff --git a/packages/Python/lldbsuite/test/lang/objc/forward-decl/main.m b/packages/Python/lldbsuite/test/lang/objc/forward-decl/main.m
deleted file mode 100644
index 8e5256e95230..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/forward-decl/main.m
+++ /dev/null
@@ -1,14 +0,0 @@
-#import <Foundation/Foundation.h>
-#import "Container.h"
-
-int main(int argc, const char * argv[])
-{
-
- @autoreleasepool {
- Container *j = [[Container alloc] init];
-
- printf("member value = %p", [j getMember]); // Set breakpoint 0 here.
- }
- return 0;
-}
-
diff --git a/packages/Python/lldbsuite/test/lang/objc/foundation/Makefile b/packages/Python/lldbsuite/test/lang/objc/foundation/Makefile
deleted file mode 100644
index ce2ccd28321d..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/foundation/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-LEVEL = ../../../make
-
-OBJC_SOURCES := main.m my-base.m
-#OBJC_SOURCES := const-strings.m
-
-include $(LEVEL)/Makefile.rules
-
-LDFLAGS += -framework Foundation
diff --git a/packages/Python/lldbsuite/test/lang/objc/foundation/TestConstStrings.py b/packages/Python/lldbsuite/test/lang/objc/foundation/TestConstStrings.py
deleted file mode 100644
index 95c5575385c5..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/foundation/TestConstStrings.py
+++ /dev/null
@@ -1,60 +0,0 @@
-"""
-Test that objective-c constant strings are generated correctly by the expression
-parser.
-"""
-
-from __future__ import print_function
-
-
-import os
-import time
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ConstStringTestCase(TestBase):
-
- mydir = TestBase.compute_mydir(__file__)
- d = {'OBJC_SOURCES': 'const-strings.m'}
-
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
- # Find the line number to break inside main().
- self.main_source = "const-strings.m"
- self.line = line_number(self.main_source, '// Set breakpoint here.')
-
- @skipUnlessDarwin
- def test_break(self):
- """Test constant string generation amd comparison by the expression parser."""
- self.build(dictionary=self.d)
- self.setTearDownCleanup(self.d)
-
- exe = self.getBuildArtifact("a.out")
- self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
- lldbutil.run_break_set_by_file_and_line(
- self,
- self.main_source,
- self.line,
- num_expected_locations=1,
- loc_exact=True)
-
- self.runCmd("run", RUN_SUCCEEDED)
- self.expect("process status", STOPPED_DUE_TO_BREAKPOINT,
- substrs=[" at %s:%d" % (self.main_source, self.line),
- "stop reason = breakpoint"])
-
- self.expect('expression (int)[str compare:@"hello"]',
- startstr="(int) $0 = 0")
- self.expect('expression (int)[str compare:@"world"]',
- startstr="(int) $1 = -1")
-
- # Test empty strings, too.
- self.expect('expression (int)[@"" length]',
- startstr="(int) $2 = 0")
-
- self.expect('expression (int)[@"123" length]',
- startstr="(int) $3 = 3")
diff --git a/packages/Python/lldbsuite/test/lang/objc/foundation/TestFoundationDisassembly.py b/packages/Python/lldbsuite/test/lang/objc/foundation/TestFoundationDisassembly.py
deleted file mode 100644
index 345e41b2b04e..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/foundation/TestFoundationDisassembly.py
+++ /dev/null
@@ -1,162 +0,0 @@
-"""
-Test the lldb disassemble command on foundation framework.
-"""
-
-from __future__ import print_function
-
-
-import unittest2
-import os
-import time
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-@skipUnlessDarwin
-class FoundationDisassembleTestCase(TestBase):
-
- mydir = TestBase.compute_mydir(__file__)
-
- # rdar://problem/8504895
- # Crash while doing 'disassemble -n "-[NSNumber descriptionWithLocale:]"
- @unittest2.skipIf(
- TestBase.skipLongRunningTest(),
- "Skip this long running test")
- def test_foundation_disasm(self):
- """Do 'disassemble -n func' on each and every 'Code' symbol entry from the Foundation.framework."""
- self.build()
-
- # Enable synchronous mode
- self.dbg.SetAsync(False)
-
- # Create a target by the debugger.
- target = self.dbg.CreateTarget(self.getBuildArtifact("a.out"))
- self.assertTrue(target, VALID_TARGET)
-
- # Now launch the process, and do not stop at entry point.
- process = target.LaunchSimple(
- None, None, self.get_process_working_directory())
- self.assertTrue(process, PROCESS_IS_VALID)
-
- foundation_framework = None
- for module in target.modules:
- print(module)
- if module.file.basename == "Foundation":
- foundation_framework = module.file.fullpath
- break
-
- self.assertTrue(
- foundation_framework is not None,
- "Foundation.framework path located")
- self.runCmd("image dump symtab '%s'" % foundation_framework)
- raw_output = self.res.GetOutput()
- # Now, grab every 'Code' symbol and feed it into the command:
- # 'disassemble -n func'.
- #
- # The symbol name is on the last column and trails the flag column which
- # looks like '0xhhhhhhhh', i.e., 8 hexadecimal digits.
- codeRE = re.compile(r"""
- \ Code\ {9} # ' Code' followed by 9 SPCs,
- .* # the wildcard chars,
- 0x[0-9a-f]{8} # the flag column, and
- \ (.+)$ # finally the function symbol.
- """, re.VERBOSE)
- for line in raw_output.split(os.linesep):
- match = codeRE.search(line)
- if match:
- func = match.group(1)
- #print("line:", line)
- #print("func:", func)
- self.runCmd('disassemble -n "%s"' % func)
-
- def test_simple_disasm(self):
- """Test the lldb 'disassemble' command"""
- self.build()
-
- # Create a target by the debugger.
- target = self.dbg.CreateTarget(self.getBuildArtifact("a.out"))
- self.assertTrue(target, VALID_TARGET)
-
- print(target)
- for module in target.modules:
- print(module)
-
- # Stop at +[NSString stringWithFormat:].
- symbol_name = "+[NSString stringWithFormat:]"
- break_results = lldbutil.run_break_set_command(
- self, "_regexp-break %s" % (symbol_name))
-
- lldbutil.check_breakpoint_result(
- self,
- break_results,
- symbol_name=symbol_name,
- num_locations=1)
-
- # Stop at -[MyString initWithNSString:].
- lldbutil.run_break_set_by_symbol(
- self,
- '-[MyString initWithNSString:]',
- num_expected_locations=1,
- sym_exact=True)
-
- # Stop at the "description" selector.
- lldbutil.run_break_set_by_selector(
- self,
- 'description',
- num_expected_locations=1,
- module_name='a.out')
-
- # Stop at -[NSAutoreleasePool release].
- break_results = lldbutil.run_break_set_command(
- self, "_regexp-break -[NSAutoreleasePool release]")
- lldbutil.check_breakpoint_result(
- self,
- break_results,
- symbol_name='-[NSAutoreleasePool release]',
- num_locations=1)
-
- self.runCmd("run", RUN_SUCCEEDED)
-
- # First stop is +[NSString stringWithFormat:].
- self.expect(
- "thread backtrace",
- "Stop at +[NSString stringWithFormat:]",
- substrs=["Foundation`+[NSString stringWithFormat:]"])
-
- # Do the disassemble for the currently stopped function.
- self.runCmd("disassemble -f")
-
- self.runCmd("process continue")
- # Skip another breakpoint for +[NSString stringWithFormat:].
- self.runCmd("process continue")
-
- # Followed by a.out`-[MyString initWithNSString:].
- self.expect(
- "thread backtrace",
- "Stop at a.out`-[MyString initWithNSString:]",
- substrs=["a.out`-[MyString initWithNSString:]"])
-
- # Do the disassemble for the currently stopped function.
- self.runCmd("disassemble -f")
-
- self.runCmd("process continue")
-
- # Followed by -[MyString description].
- self.expect("thread backtrace", "Stop at -[MyString description]",
- substrs=["a.out`-[MyString description]"])
-
- # Do the disassemble for the currently stopped function.
- self.runCmd("disassemble -f")
-
- self.runCmd("process continue")
- # Skip another breakpoint for -[MyString description].
- self.runCmd("process continue")
-
- # Followed by -[NSAutoreleasePool release].
- self.expect("thread backtrace", "Stop at -[NSAutoreleasePool release]",
- substrs=["Foundation`-[NSAutoreleasePool release]"])
-
- # Do the disassemble for the currently stopped function.
- self.runCmd("disassemble -f")
diff --git a/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjCMethods.py b/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjCMethods.py
deleted file mode 100644
index 42535ca44af0..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjCMethods.py
+++ /dev/null
@@ -1,327 +0,0 @@
-"""
-Set breakpoints on objective-c class and instance methods in foundation.
-Also lookup objective-c data types and evaluate expressions.
-"""
-
-from __future__ import print_function
-
-
-import os
-import os.path
-import time
-import lldb
-import string
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-file_index = 0
-
-
-@skipUnlessDarwin
-class FoundationTestCase(TestBase):
-
- mydir = TestBase.compute_mydir(__file__)
-
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
- # Find the line number to break inside main().
- self.main_source = "main.m"
- self.line = line_number(
- self.main_source,
- '// Set break point at this line.')
-
- def test_break(self):
- """Test setting objc breakpoints using '_regexp-break' and 'breakpoint set'."""
- self.build()
- exe = self.getBuildArtifact("a.out")
- self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
- # Stop at +[NSString stringWithFormat:].
- break_results = lldbutil.run_break_set_command(
- self, "_regexp-break +[NSString stringWithFormat:]")
- lldbutil.check_breakpoint_result(
- self,
- break_results,
- symbol_name='+[NSString stringWithFormat:]',
- num_locations=1)
-
- # Stop at -[MyString initWithNSString:].
- lldbutil.run_break_set_by_symbol(
- self,
- '-[MyString initWithNSString:]',
- num_expected_locations=1,
- sym_exact=True)
-
- # Stop at the "description" selector.
- lldbutil.run_break_set_by_selector(
- self,
- 'description',
- num_expected_locations=1,
- module_name='a.out')
-
- # Stop at -[NSAutoreleasePool release].
- break_results = lldbutil.run_break_set_command(
- self, "_regexp-break -[NSAutoreleasePool release]")
- lldbutil.check_breakpoint_result(
- self,
- break_results,
- symbol_name='-[NSAutoreleasePool release]',
- num_locations=1)
-
- self.runCmd("run", RUN_SUCCEEDED)
-
- # First stop is +[NSString stringWithFormat:].
- self.expect(
- "thread backtrace",
- "Stop at +[NSString stringWithFormat:]",
- substrs=["Foundation`+[NSString stringWithFormat:]"])
-
- self.runCmd("process continue")
-
- # Second stop is still +[NSString stringWithFormat:].
- self.expect(
- "thread backtrace",
- "Stop at +[NSString stringWithFormat:]",
- substrs=["Foundation`+[NSString stringWithFormat:]"])
-
- self.runCmd("process continue")
-
- # Followed by a.out`-[MyString initWithNSString:].
- self.expect(
- "thread backtrace",
- "Stop at a.out`-[MyString initWithNSString:]",
- substrs=["a.out`-[MyString initWithNSString:]"])
-
- self.runCmd("process continue")
-
- # Followed by -[MyString description].
- self.expect("thread backtrace", "Stop at -[MyString description]",
- substrs=["a.out`-[MyString description]"])
-
- self.runCmd("process continue")
-
- # Followed by the same -[MyString description].
- self.expect("thread backtrace", "Stop at -[MyString description]",
- substrs=["a.out`-[MyString description]"])
-
- self.runCmd("process continue")
-
- # Followed by -[NSAutoreleasePool release].
- self.expect("thread backtrace", "Stop at -[NSAutoreleasePool release]",
- substrs=["Foundation`-[NSAutoreleasePool release]"])
-
- # rdar://problem/8542091
- # rdar://problem/8492646
- def test_data_type_and_expr(self):
- """Lookup objective-c data types and evaluate expressions."""
- self.build()
- exe = self.getBuildArtifact("a.out")
- self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
- # Stop at -[MyString description].
- lldbutil.run_break_set_by_symbol(
- self,
- '-[MyString description]',
- num_expected_locations=1,
- sym_exact=True)
-# self.expect("breakpoint set -n '-[MyString description]", BREAKPOINT_CREATED,
-# startstr = "Breakpoint created: 1: name = '-[MyString description]',
-# locations = 1")
-
- self.runCmd("run", RUN_SUCCEEDED)
-
- # The backtrace should show we stop at -[MyString description].
- self.expect("thread backtrace", "Stop at -[MyString description]",
- substrs=["a.out`-[MyString description]"])
-
- # Lookup objc data type MyString and evaluate some expressions.
-
- self.expect("image lookup -t NSString", DATA_TYPES_DISPLAYED_CORRECTLY,
- substrs=['name = "NSString"',
- 'compiler_type = "@interface NSString'])
-
- self.expect("image lookup -t MyString", DATA_TYPES_DISPLAYED_CORRECTLY,
- substrs=['name = "MyString"',
- 'compiler_type = "@interface MyString',
- 'NSString * str;',
- 'NSDate * date;'])
-
- self.expect(
- "frame variable --show-types --scope",
- VARIABLES_DISPLAYED_CORRECTLY,
- substrs=["ARG: (MyString *) self"],
- patterns=[
- "ARG: \(.*\) _cmd",
- "(objc_selector *)|(SEL)"])
-
- # rdar://problem/8651752
- # don't crash trying to ask clang how many children an empty record has
- self.runCmd("frame variable *_cmd")
-
- # rdar://problem/8492646
- # test/foundation fails after updating to tot r115023
- # self->str displays nothing as output
- self.expect(
- "frame variable --show-types self->str",
- VARIABLES_DISPLAYED_CORRECTLY,
- startstr="(NSString *) self->str")
-
- # rdar://problem/8447030
- # 'frame variable self->date' displays the wrong data member
- self.expect(
- "frame variable --show-types self->date",
- VARIABLES_DISPLAYED_CORRECTLY,
- startstr="(NSDate *) self->date")
-
- # This should display the str and date member fields as well.
- self.expect(
- "frame variable --show-types *self",
- VARIABLES_DISPLAYED_CORRECTLY,
- substrs=[
- "(MyString) *self",
- "(NSString *) str",
- "(NSDate *) date"])
-
- # isa should be accessible.
- self.expect("expression self->isa", VARIABLES_DISPLAYED_CORRECTLY,
- substrs=["(Class)"])
-
- # This should fail expectedly.
- self.expect(
- "expression self->non_existent_member",
- COMMAND_FAILED_AS_EXPECTED,
- error=True,
- startstr="error: 'MyString' does not have a member named 'non_existent_member'")
-
- # Use expression parser.
- self.runCmd("expression self->str")
- self.runCmd("expression self->date")
-
- # (lldb) expression self->str
- # error: instance variable 'str' is protected
- # error: 1 errors parsing expression
- #
- # (lldb) expression self->date
- # error: instance variable 'date' is protected
- # error: 1 errors parsing expression
- #
-
- self.runCmd("breakpoint delete 1")
- lldbutil.run_break_set_by_file_and_line(
- self, "main.m", self.line, num_expected_locations=1, loc_exact=True)
-
- self.runCmd("process continue")
-
- # rdar://problem/8542091
- # test/foundation: expr -o -- my not working?
- #
- # Test new feature with r115115:
- # Add "-o" option to "expression" which prints the object description
- # if available.
- self.expect(
- "expression --object-description -- my",
- "Object description displayed correctly",
- patterns=["Hello from.*a.out.*with timestamp: "])
-
- @add_test_categories(['pyapi'])
- def test_print_ivars_correctly(self):
- self.build()
- # See: <rdar://problem/8717050> lldb needs to use the ObjC runtime symbols for ivar offsets
- # Only fails for the ObjC 2.0 runtime.
- exe = self.getBuildArtifact("a.out")
-
- target = self.dbg.CreateTarget(exe)
- self.assertTrue(target, VALID_TARGET)
-
- break1 = target.BreakpointCreateByLocation(self.main_source, self.line)
- self.assertTrue(break1, VALID_BREAKPOINT)
-
- # Now launch the process, and do not stop at entry point.
- process = target.LaunchSimple(
- None, None, self.get_process_working_directory())
-
- self.assertTrue(process, PROCESS_IS_VALID)
-
- # The stop reason of the thread should be breakpoint.
- thread = process.GetThreadAtIndex(0)
- if thread.GetStopReason() != lldb.eStopReasonBreakpoint:
- from lldbsuite.test.lldbutil import stop_reason_to_str
- self.fail(STOPPED_DUE_TO_BREAKPOINT_WITH_STOP_REASON_AS %
- stop_reason_to_str(thread.GetStopReason()))
-
- # Make sure we stopped at the first breakpoint.
-
- cur_frame = thread.GetFrameAtIndex(0)
-
- line_number = cur_frame.GetLineEntry().GetLine()
- self.assertTrue(line_number == self.line, "Hit the first breakpoint.")
-
- my_var = cur_frame.FindVariable("my")
- self.assertTrue(my_var, "Made a variable object for my")
-
- str_var = cur_frame.FindVariable("str")
- self.assertTrue(str_var, "Made a variable object for str")
-
- # Now make sure that the my->str == str:
-
- my_str_var = my_var.GetChildMemberWithName("str")
- self.assertTrue(my_str_var, "Found a str ivar in my")
-
- str_value = int(str_var.GetValue(), 0)
-
- my_str_value = int(my_str_var.GetValue(), 0)
-
- self.assertTrue(
- str_value == my_str_value,
- "Got the correct value for my->str")
-
- def test_expression_lookups_objc(self):
- """Test running an expression detect spurious debug info lookups (DWARF)."""
- self.build()
- exe = self.getBuildArtifact("a.out")
- self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
- # Stop at -[MyString initWithNSString:].
- lldbutil.run_break_set_by_symbol(
- self,
- '-[MyString initWithNSString:]',
- num_expected_locations=1,
- sym_exact=True)
-
- self.runCmd("run", RUN_SUCCEEDED)
-
- global file_index
- # Log any DWARF lookups
- ++file_index
- logfile = os.path.join(
- self.getBuildDir(),
- "dwarf-lookups-" +
- self.getArchitecture() +
- "-" +
- str(file_index) +
- ".txt")
- self.runCmd("log enable -f %s dwarf lookups" % (logfile))
- self.runCmd("expr self")
- self.runCmd("log disable dwarf lookups")
-
- def cleanup():
- if os.path.exists(logfile):
- os.unlink(logfile)
-
- self.addTearDownHook(cleanup)
-
- if os.path.exists(logfile):
- f = open(logfile)
- lines = f.readlines()
- num_errors = 0
- for line in lines:
- if string.find(line, "$__lldb") != -1:
- if num_errors == 0:
- print(
- "error: found spurious name lookups when evaluating an expression:")
- num_errors += 1
- print(line, end='')
- self.assertTrue(num_errors == 0, "Spurious lookups detected")
- f.close()
diff --git a/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjCMethods2.py b/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjCMethods2.py
deleted file mode 100644
index 2b967e988856..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjCMethods2.py
+++ /dev/null
@@ -1,205 +0,0 @@
-"""
-Test more expression command sequences with objective-c.
-"""
-
-from __future__ import print_function
-
-
-import os
-import time
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-@skipUnlessDarwin
-class FoundationTestCase2(TestBase):
-
- mydir = TestBase.compute_mydir(__file__)
-
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
- # Find the line numbers to break at.
- self.lines = []
- self.lines.append(
- line_number(
- 'main.m',
- '// Break here for selector: tests'))
- self.lines.append(
- line_number(
- 'main.m',
- '// Break here for NSArray tests'))
- self.lines.append(
- line_number(
- 'main.m',
- '// Break here for NSString tests'))
- self.lines.append(
- line_number(
- 'main.m',
- '// Break here for description test'))
- self.lines.append(
- line_number(
- 'main.m',
- '// Set break point at this line'))
-
- def test_more_expr_commands(self):
- """More expression commands for objective-c."""
- self.build()
- exe = self.getBuildArtifact("a.out")
- self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
- # Create a bunch of breakpoints.
- for line in self.lines:
- lldbutil.run_break_set_by_file_and_line(
- self, "main.m", line, num_expected_locations=1, loc_exact=True)
-
- self.runCmd("run", RUN_SUCCEEDED)
-
- # Test_Selector:
- self.runCmd("thread backtrace")
- self.expect("expression (char *)sel_getName(sel)",
- substrs=["(char *)",
- "length"])
-
- self.runCmd("process continue")
-
- # Test_NSArray:
- self.runCmd("thread backtrace")
- self.runCmd("process continue")
-
- # Test_NSString:
- self.runCmd("thread backtrace")
- self.runCmd("process continue")
-
- # Test_MyString:
- self.runCmd("thread backtrace")
- self.expect("expression (char *)sel_getName(_cmd)",
- substrs=["(char *)",
- "description"])
-
- self.runCmd("process continue")
-
- def test_NSArray_expr_commands(self):
- """Test expression commands for NSArray."""
- self.build()
- exe = self.getBuildArtifact("a.out")
- self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
- # Break inside Test_NSArray:
- line = self.lines[1]
- lldbutil.run_break_set_by_file_and_line(
- self, "main.m", line, num_expected_locations=1, loc_exact=True)
-
- self.runCmd("run", RUN_SUCCEEDED)
-
- # Test_NSArray:
- self.runCmd("thread backtrace")
- self.expect("expression (int)[nil_mutable_array count]",
- patterns=["\(int\) \$.* = 0"])
- self.expect("expression (int)[array1 count]",
- patterns=["\(int\) \$.* = 3"])
- self.expect("expression (int)[array2 count]",
- patterns=["\(int\) \$.* = 3"])
- self.expect("expression (int)array1.count",
- patterns=["\(int\) \$.* = 3"])
- self.expect("expression (int)array2.count",
- patterns=["\(int\) \$.* = 3"])
- self.runCmd("process continue")
-
- def test_NSString_expr_commands(self):
- """Test expression commands for NSString."""
- self.build()
- exe = self.getBuildArtifact("a.out")
- self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
- # Break inside Test_NSString:
- line = self.lines[2]
- lldbutil.run_break_set_by_file_and_line(
- self, "main.m", line, num_expected_locations=1, loc_exact=True)
-
- self.runCmd("run", RUN_SUCCEEDED)
-
- # Test_NSString:
- self.runCmd("thread backtrace")
- self.expect("expression (int)[str length]",
- patterns=["\(int\) \$.* ="])
- self.expect("expression (int)[str_id length]",
- patterns=["\(int\) \$.* ="])
- self.expect("expression (id)[str description]",
- patterns=["\(id\) \$.* = 0x"])
- self.expect("expression (id)[str_id description]",
- patterns=["\(id\) \$.* = 0x"])
- self.expect("expression str.length")
- self.expect('expression str = @"new"')
- self.runCmd("image lookup -t NSString")
- self.expect('expression str = (id)[NSString stringWithCString: "new"]')
- self.runCmd("process continue")
-
- @expectedFailureAll(archs=["i[3-6]86"], bugnumber="<rdar://problem/28814052>")
- def test_MyString_dump_with_runtime(self):
- """Test dump of a known Objective-C object by dereferencing it."""
- self.build()
- exe = self.getBuildArtifact("a.out")
- self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
- line = self.lines[4]
-
- lldbutil.run_break_set_by_file_and_line(
- self, "main.m", line, num_expected_locations=1, loc_exact=True)
-
- self.runCmd("run", RUN_SUCCEEDED)
-
- self.expect(
- "expression --show-types -- *my",
- patterns=[
- "\(MyString\) \$.* = ",
- "\(MyBase\)"])
- self.runCmd("process continue")
-
- @expectedFailureAll(archs=["i[3-6]86"], bugnumber="<rdar://problem/28814052>")
- def test_runtime_types(self):
- """Test commands that require runtime types"""
- self.build()
- exe = self.getBuildArtifact("a.out")
- self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
- # Break inside Test_NSString:
- line = self.lines[2]
- lldbutil.run_break_set_by_source_regexp(
- self, "NSString tests")
-
- self.runCmd("run", RUN_SUCCEEDED)
-
- # Test_NSString:
- self.runCmd("thread backtrace")
- self.expect("expression [str length]",
- patterns=["\(NSUInteger\) \$.* ="])
- self.expect("expression str.length")
- self.expect('expression str = [NSString stringWithCString: "new"]')
- self.expect(
- 'po [NSError errorWithDomain:@"Hello" code:35 userInfo:@{@"NSDescription" : @"be completed."}]',
- substrs=[
- "Error Domain=Hello",
- "Code=35",
- "be completed."])
- self.runCmd("process continue")
-
- @expectedFailureAll(archs=["i[3-6]86"], bugnumber="<rdar://problem/28814052>")
- def test_NSError_p(self):
- """Test that p of the result of an unknown method does require a cast."""
- self.build()
- exe = self.getBuildArtifact("a.out")
- self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
- line = self.lines[4]
-
- lldbutil.run_break_set_by_file_and_line(
- self, "main.m", line, num_expected_locations=1, loc_exact=True)
-
- self.runCmd("run", RUN_SUCCEEDED)
-
- self.expect("p [NSError thisMethodIsntImplemented:0]", error=True, patterns=[
- "no known method", "cast the message send to the method's return type"])
- self.runCmd("process continue")
diff --git a/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjectDescriptionAPI.py b/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjectDescriptionAPI.py
deleted file mode 100644
index 82e08584702f..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjectDescriptionAPI.py
+++ /dev/null
@@ -1,78 +0,0 @@
-"""
-Test SBValue.GetObjectDescription() with the value from SBTarget.FindGlobalVariables().
-"""
-
-from __future__ import print_function
-
-
-import os
-import time
-import re
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ObjectDescriptionAPITestCase(TestBase):
-
- mydir = TestBase.compute_mydir(__file__)
-
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
- # Find the line number to break at.
- self.source = 'main.m'
- self.line = line_number(
- self.source, '// Set break point at this line.')
-
- # rdar://problem/10857337
- @skipUnlessDarwin
- @add_test_categories(['pyapi'])
- def test_find_global_variables_then_object_description(self):
- """Exercise SBTarget.FindGlobalVariables() API."""
- d = {'EXE': 'b.out'}
- self.build(dictionary=d)
- self.setTearDownCleanup(dictionary=d)
- exe = self.getBuildArtifact('b.out')
-
- # Create a target by the debugger.
- target = self.dbg.CreateTarget(exe)
- self.assertTrue(target, VALID_TARGET)
-
- breakpoint = target.BreakpointCreateByLocation(self.source, self.line)
- self.assertTrue(breakpoint, VALID_BREAKPOINT)
-
- # Now launch the process, and do not stop at entry point.
- process = target.LaunchSimple(
- None, None, self.get_process_working_directory())
- self.assertTrue(process, PROCESS_IS_VALID)
- # Make sure we hit our breakpoint:
- thread_list = lldbutil.get_threads_stopped_at_breakpoint(
- process, breakpoint)
- self.assertTrue(len(thread_list) == 1)
-
- thread = thread_list[0]
- frame0 = thread.GetFrameAtIndex(0)
-
- # Note my_global_str's object description prints fine here.
- value_list1 = frame0.GetVariables(True, True, True, True)
- for v in value_list1:
- self.DebugSBValue(v)
- if self.TraceOn():
- print("val:", v)
- print("object description:", v.GetObjectDescription())
- if v.GetName() == 'my_global_str':
- self.assertTrue(v.GetObjectDescription() ==
- 'This is a global string')
-
- # But not here!
- value_list2 = target.FindGlobalVariables('my_global_str', 3)
- for v in value_list2:
- self.DebugSBValue(v)
- if self.TraceOn():
- print("val:", v)
- print("object description:", v.GetObjectDescription())
- if v.GetName() == 'my_global_str':
- self.assertTrue(v.GetObjectDescription() ==
- 'This is a global string')
diff --git a/packages/Python/lldbsuite/test/lang/objc/foundation/TestRuntimeTypes.py b/packages/Python/lldbsuite/test/lang/objc/foundation/TestRuntimeTypes.py
deleted file mode 100644
index c52ac8c2e6d0..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/foundation/TestRuntimeTypes.py
+++ /dev/null
@@ -1,62 +0,0 @@
-"""
-Test that Objective-C methods from the runtime work correctly.
-"""
-
-from __future__ import print_function
-
-
-import os
-import time
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-@skipUnlessDarwin
-class RuntimeTypesTestCase(TestBase):
-
- mydir = TestBase.compute_mydir(__file__)
-
- @expectedFailureAll(
- oslist=["macosx"],
- debug_info="gmodules",
- bugnumber="llvm.org/pr27862")
- def test_break(self):
- """Test setting objc breakpoints using '_regexp-break' and 'breakpoint set'."""
- if self.getArchitecture() != 'x86_64':
- self.skipTest("This only applies to the v2 runtime")
-
- self.build()
- exe = self.getBuildArtifact("a.out")
- self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
- # Stop at -[MyString description].
- lldbutil.run_break_set_by_symbol(
- self,
- '-[MyString description]',
- num_expected_locations=1,
- sym_exact=True)
-
- self.runCmd("run", RUN_SUCCEEDED)
-
- # The backtrace should show we stop at -[MyString description].
- self.expect("thread backtrace", "Stop at -[MyString description]",
- substrs=["a.out`-[MyString description]"])
-
- # Use runtime information about NSString.
-
- # The length property should be usable.
- self.expect("expression str.length", VARIABLES_DISPLAYED_CORRECTLY,
- patterns=[r"(\(unsigned long long\))|\(NSUInteger\)"])
-
- # Static methods on NSString should work.
- self.expect(
- "expr [NSString stringWithCString:\"foo\" encoding:1]",
- VALID_TYPE,
- substrs=[
- "(id)",
- "$1"])
-
- self.expect("po $1", VARIABLES_DISPLAYED_CORRECTLY,
- substrs=["foo"])
diff --git a/packages/Python/lldbsuite/test/lang/objc/foundation/TestSymbolTable.py b/packages/Python/lldbsuite/test/lang/objc/foundation/TestSymbolTable.py
deleted file mode 100644
index bfb9e0b4479d..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/foundation/TestSymbolTable.py
+++ /dev/null
@@ -1,74 +0,0 @@
-"""
-Test symbol table access for main.m.
-"""
-
-from __future__ import print_function
-
-
-import os
-import time
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-@skipUnlessDarwin
-class FoundationSymtabTestCase(TestBase):
-
- mydir = TestBase.compute_mydir(__file__)
-
- symbols_list = ['-[MyString initWithNSString:]',
- '-[MyString dealloc]',
- '-[MyString description]',
- '-[MyString descriptionPauses]', # synthesized property
- # synthesized property
- '-[MyString setDescriptionPauses:]',
- 'Test_Selector',
- 'Test_NSString',
- 'Test_MyString',
- 'Test_NSArray',
- 'main'
- ]
-
- @add_test_categories(['pyapi'])
- def test_with_python_api(self):
- """Test symbol table access with Python APIs."""
- self.build()
- exe = self.getBuildArtifact("a.out")
- self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
- target = self.dbg.CreateTarget(exe)
- self.assertTrue(target, VALID_TARGET)
-
- # Launch the process, and do not stop at the entry point.
- process = target.LaunchSimple(
- None, None, self.get_process_working_directory())
-
- #
- # Exercise Python APIs to access the symbol table entries.
- #
-
- # Create the filespec by which to locate our a.out module.
- filespec = lldb.SBFileSpec(exe, False)
-
- module = target.FindModule(filespec)
- self.assertTrue(module, VALID_MODULE)
-
- # Create the set of known symbols. As we iterate through the symbol
- # table, remove the symbol from the set if it is a known symbol.
- expected_symbols = set(self.symbols_list)
- for symbol in module:
- self.assertTrue(symbol, VALID_SYMBOL)
- #print("symbol:", symbol)
- name = symbol.GetName()
- if name in expected_symbols:
- #print("Removing %s from known_symbols %s" % (name, expected_symbols))
- expected_symbols.remove(name)
-
- # At this point, the known_symbols set should have become an empty set.
- # If not, raise an error.
- #print("symbols unaccounted for:", expected_symbols)
- self.assertTrue(len(expected_symbols) == 0,
- "All the known symbols are accounted for")
diff --git a/packages/Python/lldbsuite/test/lang/objc/foundation/const-strings.m b/packages/Python/lldbsuite/test/lang/objc/foundation/const-strings.m
deleted file mode 100644
index 8a43abee7b84..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/foundation/const-strings.m
+++ /dev/null
@@ -1,24 +0,0 @@
-#import <Foundation/Foundation.h>
-
-// Tests to run:
-
-// Breakpoint 1
-// --
-// (lldb) expr (int)[str compare:@"hello"]
-// (int) $0 = 0
-// (lldb) expr (int)[str compare:@"world"]
-// (int) $1 = -1
-// (lldb) expr (int)[@"" length]
-// (int) $2 = 0
-
-int main ()
-{
- NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
-
- NSString *str = [NSString stringWithCString:"hello" encoding:NSASCIIStringEncoding];
-
- NSLog(@"String \"%@\" has length %lu", str, [str length]); // Set breakpoint here.
-
- [pool drain];
- return 0;
-}
diff --git a/packages/Python/lldbsuite/test/lang/objc/foundation/main.m b/packages/Python/lldbsuite/test/lang/objc/foundation/main.m
deleted file mode 100644
index 519bec5a3e6a..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/foundation/main.m
+++ /dev/null
@@ -1,141 +0,0 @@
-#import <Foundation/Foundation.h>
-#include <unistd.h>
-#import "my-base.h"
-
-@interface MyString : MyBase {
- NSString *str;
- NSDate *date;
- BOOL _desc_pauses;
-}
-
-@property(retain) NSString * str_property;
-@property BOOL descriptionPauses;
-
-- (id)initWithNSString:(NSString *)string;
-@end
-
-@implementation MyString
-@synthesize descriptionPauses = _desc_pauses;
-@synthesize str_property = str;
-
-- (id)initWithNSString:(NSString *)string
-{
- if (self = [super init])
- {
- str = [NSString stringWithString:string];
- date = [NSDate date];
- }
- self.descriptionPauses = NO;
- return self;
-}
-
-- (void)dealloc
-{
- [date release];
- [str release];
- [super dealloc];
-}
-
-- (NSString *)description
-{
- // Set a breakpoint on '-[MyString description]' and test expressions:
- // expression (char *)sel_getName(_cmd)
- if (self.descriptionPauses) // Break here for description test
- {
- printf ("\nAbout to sleep.\n");
- usleep(100000);
- }
-
- return [str stringByAppendingFormat:@" with timestamp: %@", date];
-}
-@end
-
-int
-Test_Selector ()
-{
- SEL sel = @selector(length);
- printf("sel = %p\n", sel);
- // Expressions to test here for selector:
- // expression (char *)sel_getName(sel)
- // The expression above should return "sel" as it should be just
- // a uniqued C string pointer. We were seeing the result pointer being
- // truncated with recent LLDBs.
- return 0; // Break here for selector: tests
-}
-
-int
-Test_NSString (const char *program)
-{
- NSString *str = [NSString stringWithFormat:@"Hello from '%s'", program];
- NSLog(@"NSString instance: %@", str);
- printf("str = '%s'\n", [str cStringUsingEncoding: [NSString defaultCStringEncoding]]);
- printf("[str length] = %zu\n", (size_t)[str length]);
- printf("[str description] = %s\n", [[str description] UTF8String]);
- id str_id = str;
- // Expressions to test here for NSString:
- // expression (char *)sel_getName(sel)
- // expression [str length]
- // expression [str_id length]
- // expression [str description]
- // expression [str_id description]
- // expression str.length
- // expression str.description
- // expression str = @"new"
- // expression str = [NSString stringWithFormat: @"%cew", 'N']
- return 0; // Break here for NSString tests
-}
-
-NSString *my_global_str = NULL;
-
-void
-Test_MyString (const char *program)
-{
- my_global_str = @"This is a global string";
- NSString *str = [NSString stringWithFormat:@"Hello from '%s'", program];
- MyString *my = [[MyString alloc] initWithNSString:str];
- NSLog(@"MyString instance: %@", [my description]);
- my.descriptionPauses = YES; // Set break point at this line. Test 'expression -o -- my'.
- NSLog(@"MyString instance: %@", [my description]);
-}
-
-int
-Test_NSArray ()
-{
- NSMutableArray *nil_mutable_array = nil;
- NSArray *array1 = [NSArray arrayWithObjects: @"array1 object1", @"array1 object2", @"array1 object3", nil];
- NSArray *array2 = [NSArray arrayWithObjects: array1, @"array2 object2", @"array2 object3", nil];
- // Expressions to test here for NSArray:
- // expression [nil_mutable_array count]
- // expression [array1 count]
- // expression array1.count
- // expression [array2 count]
- // expression array2.count
- id obj;
- // After each object at index call, use expression and validate object
- obj = [array1 objectAtIndex: 0]; // Break here for NSArray tests
- obj = [array1 objectAtIndex: 1];
- obj = [array1 objectAtIndex: 2];
-
- obj = [array2 objectAtIndex: 0];
- obj = [array2 objectAtIndex: 1];
- obj = [array2 objectAtIndex: 2];
- NSUInteger count = [nil_mutable_array count];
- return 0;
-}
-
-
-int main (int argc, char const *argv[])
-{
- NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
- Test_Selector();
- Test_NSArray ();
- Test_NSString (argv[0]);
- Test_MyString (argv[0]);
-
- printf("sizeof(id) = %zu\n", sizeof(id));
- printf("sizeof(Class) = %zu\n", sizeof(Class));
- printf("sizeof(SEL) = %zu\n", sizeof(SEL));
-
- [pool release];
- return 0;
-}
diff --git a/packages/Python/lldbsuite/test/lang/objc/foundation/my-base.h b/packages/Python/lldbsuite/test/lang/objc/foundation/my-base.h
deleted file mode 100644
index 53202aa0de37..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/foundation/my-base.h
+++ /dev/null
@@ -1,8 +0,0 @@
-@interface MyBase : NSObject
-{
-#if !__OBJC2__
- int maybe_used; // The 1.0 runtime needs to have backed properties...
-#endif
-}
-@property int propertyMovesThings;
-@end
diff --git a/packages/Python/lldbsuite/test/lang/objc/foundation/my-base.m b/packages/Python/lldbsuite/test/lang/objc/foundation/my-base.m
deleted file mode 100644
index 0c316b244f26..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/foundation/my-base.m
+++ /dev/null
@@ -1,10 +0,0 @@
-#import <Foundation/Foundation.h>
-#import "my-base.h"
-@implementation MyBase
-#if __OBJC2__
-@synthesize propertyMovesThings;
-#else
-@synthesize propertyMovesThings = maybe_used;
-#endif
-@end
-
diff --git a/packages/Python/lldbsuite/test/lang/objc/global_ptrs/Makefile b/packages/Python/lldbsuite/test/lang/objc/global_ptrs/Makefile
deleted file mode 100644
index a1608fe5a664..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/global_ptrs/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-LEVEL = ../../../make
-
-OBJC_SOURCES := main.m
-LDFLAGS = $(CFLAGS) -lobjc -framework Foundation
-
-include $(LEVEL)/Makefile.rules
diff --git a/packages/Python/lldbsuite/test/lang/objc/global_ptrs/TestGlobalObjects.py b/packages/Python/lldbsuite/test/lang/objc/global_ptrs/TestGlobalObjects.py
deleted file mode 100644
index dcabd72dd0c0..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/global_ptrs/TestGlobalObjects.py
+++ /dev/null
@@ -1,60 +0,0 @@
-"""Test that a global ObjC object found before the process is started updates correctly."""
-
-from __future__ import print_function
-
-
-import os
-import time
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestObjCGlobalVar(TestBase):
-
- mydir = TestBase.compute_mydir(__file__)
-
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
- self.main_source = lldb.SBFileSpec("main.m")
-
- @skipUnlessDarwin
- @add_test_categories(['pyapi'])
- def test_with_python_api(self):
- """Test that a global ObjC object found before the process is started updates correctly."""
- self.build()
- exe = self.getBuildArtifact("a.out")
-
- target = self.dbg.CreateTarget(exe)
- self.assertTrue(target, VALID_TARGET)
-
- bkpt = target.BreakpointCreateBySourceRegex('NSLog', self.main_source)
- self.assertTrue(bkpt, VALID_BREAKPOINT)
-
- # Before we launch, make an SBValue for our global object pointer:
- g_obj_ptr = target.FindFirstGlobalVariable("g_obj_ptr")
- self.assertTrue(g_obj_ptr.GetError().Success(), "Made the g_obj_ptr")
- self.assertTrue(
- g_obj_ptr.GetValueAsUnsigned(10) == 0,
- "g_obj_ptr is initially null")
-
- # Now launch the process, and do not stop at entry point.
- process = target.LaunchSimple(
- None, None, self.get_process_working_directory())
-
- self.assertTrue(process, PROCESS_IS_VALID)
-
- # The stop reason of the thread should be breakpoint.
- threads = lldbutil.get_threads_stopped_at_breakpoint(process, bkpt)
- if len(threads) != 1:
- self.fail("Failed to stop at breakpoint 1.")
-
- thread = threads[0]
-
- dyn_value = g_obj_ptr.GetDynamicValue(lldb.eDynamicCanRunTarget)
- self.assertTrue(
- dyn_value.GetError().Success(),
- "Dynamic value is valid")
- self.assertTrue(dyn_value.GetObjectDescription() == "Some NSString")
diff --git a/packages/Python/lldbsuite/test/lang/objc/global_ptrs/main.m b/packages/Python/lldbsuite/test/lang/objc/global_ptrs/main.m
deleted file mode 100644
index 977a984e06e0..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/global_ptrs/main.m
+++ /dev/null
@@ -1,11 +0,0 @@
-#import <Foundation/Foundation.h>
-
-id g_obj_ptr = nil;
-
-int
-main()
-{
- g_obj_ptr = @"Some NSString";
- NSLog(@"My string was %@.", g_obj_ptr);
- return 0;
-}
diff --git a/packages/Python/lldbsuite/test/lang/objc/hidden-ivars/InternalDefiner.h b/packages/Python/lldbsuite/test/lang/objc/hidden-ivars/InternalDefiner.h
deleted file mode 100644
index 59652d4b09c0..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/hidden-ivars/InternalDefiner.h
+++ /dev/null
@@ -1,11 +0,0 @@
-#import <Foundation/Foundation.h>
-#import <stdint.h>
-
-@interface InternalDefiner : NSObject {
-@public
- uintptr_t foo;
-}
-
--(id)initWithFoo:(uintptr_t)f andBar:(uintptr_t)b;
-
-@end
diff --git a/packages/Python/lldbsuite/test/lang/objc/hidden-ivars/InternalDefiner.m b/packages/Python/lldbsuite/test/lang/objc/hidden-ivars/InternalDefiner.m
deleted file mode 100644
index 1a10ce021ce3..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/hidden-ivars/InternalDefiner.m
+++ /dev/null
@@ -1,31 +0,0 @@
-#import "InternalDefiner.h"
-
-@interface InternalDefiner () {
- uintptr_t bar;
-}
-
-@end
-
-@implementation InternalDefiner
-
--(id)init
-{
- if (self = [super init])
- {
- foo = 2;
- bar = 3;
- }
- return self;
-}
-
--(id)initWithFoo:(uintptr_t)f andBar:(uintptr_t)b
-{
- if (self = [super init])
- {
- foo = f;
- bar = b;
- }
- return self;
-}
-
-@end
diff --git a/packages/Python/lldbsuite/test/lang/objc/hidden-ivars/Makefile b/packages/Python/lldbsuite/test/lang/objc/hidden-ivars/Makefile
deleted file mode 100644
index 1768d11ca279..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/hidden-ivars/Makefile
+++ /dev/null
@@ -1,9 +0,0 @@
-LEVEL = ../../../make
-
-DYLIB_NAME := InternalDefiner
-DYLIB_OBJC_SOURCES := InternalDefiner.m
-OBJC_SOURCES := main.m
-
-LD_EXTRAS = -framework Foundation
-
-include $(LEVEL)/Makefile.rules
diff --git a/packages/Python/lldbsuite/test/lang/objc/hidden-ivars/TestHiddenIvars.py b/packages/Python/lldbsuite/test/lang/objc/hidden-ivars/TestHiddenIvars.py
deleted file mode 100644
index 2fad51eefd57..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/hidden-ivars/TestHiddenIvars.py
+++ /dev/null
@@ -1,241 +0,0 @@
-"""Test that hidden ivars in a shared library are visible from the main executable."""
-
-from __future__ import print_function
-
-
-import unittest2
-import os
-import subprocess
-import time
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class HiddenIvarsTestCase(TestBase):
-
- mydir = TestBase.compute_mydir(__file__)
-
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
- # Find the line number to break inside main().
- self.source = 'main.m'
- self.line = line_number(self.source, '// breakpoint1')
- # The makefile names of the shared libraries as they appear in DYLIB_NAME.
- # The names should have no loading "lib" or extension as they will be
- # localized
- self.shlib_names = ["InternalDefiner"]
-
- @skipUnlessDarwin
- @skipIf(
- debug_info=no_match("dsym"),
- bugnumber="This test requires a stripped binary and a dSYM")
- def test_expr_stripped(self):
- if self.getArchitecture() == 'i386':
- self.skipTest("requires modern objc runtime")
- else:
- self.build()
- self.expr(True)
-
- @skipUnlessDarwin
- def test_expr(self):
- if self.getArchitecture() == 'i386':
- self.skipTest("requires modern objc runtime")
- else:
- self.build()
- self.expr(False)
-
- @skipUnlessDarwin
- @skipIf(
- debug_info=no_match("dsym"),
- bugnumber="This test requires a stripped binary and a dSYM")
- def test_frame_variable_stripped(self):
- if self.getArchitecture() == 'i386':
- self.skipTest("requires modern objc runtime")
- else:
- self.build()
- self.frame_var(True)
-
- @skipUnlessDarwin
- def test_frame_variable(self):
- if self.getArchitecture() == 'i386':
- self.skipTest("requires modern objc runtime")
- else:
- self.build()
- self.frame_var(False)
-
- @unittest2.expectedFailure("rdar://18683637")
- @skipUnlessDarwin
- def test_frame_variable_across_modules(self):
- if self.getArchitecture() == 'i386':
- self.skipTest("requires modern objc runtime")
- else:
- self.build()
- self.common_setup(False)
- self.expect(
- "frame variable k->bar",
- VARIABLES_DISPLAYED_CORRECTLY,
- substrs=["= 3"])
-
- def common_setup(self, strip):
-
- if strip:
- self.assertTrue(subprocess.call(
- ['/usr/bin/strip', '-Sx',
- self.getBuildArtifact('libInternalDefiner.dylib')]) == 0,
- 'stripping dylib succeeded')
- self.assertTrue(subprocess.call(
- ['/bin/rm', '-rf',
- self.getBuildArtifact('libInternalDefiner.dylib.dSYM')]) == 0,
- 'remove dylib dSYM file succeeded')
- self.assertTrue(subprocess.call(['/usr/bin/strip', '-Sx',
- self.getBuildArtifact("a.out")
- ]) == 0,
- 'stripping a.out succeeded')
- # Create a target by the debugger.
- target = self.dbg.CreateTarget(self.getBuildArtifact("a.out"))
- self.assertTrue(target, VALID_TARGET)
-
- # Create the breakpoint inside function 'main'.
- breakpoint = target.BreakpointCreateByLocation(self.source, self.line)
- self.assertTrue(breakpoint, VALID_BREAKPOINT)
-
- # Register our shared libraries for remote targets so they get
- # automatically uploaded
- environment = self.registerSharedLibrariesWithTarget(
- target, self.shlib_names)
-
- # Now launch the process, and do not stop at entry point.
- process = target.LaunchSimple(
- None, environment, self.get_process_working_directory())
- self.assertTrue(process, PROCESS_IS_VALID)
-
- exe = self.getBuildArtifact("a.out")
- self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
- # Break inside the foo function which takes a bar_ptr argument.
- lldbutil.run_break_set_by_file_and_line(
- self, "main.m", self.line, num_expected_locations=1, loc_exact=True)
-
- self.runCmd("run", RUN_SUCCEEDED)
-
- # The stop reason of the thread should be breakpoint.
- self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
- substrs=['stopped',
- 'stop reason = breakpoint'])
-
- # The breakpoint should have a hit count of 1.
- self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
- substrs=[' resolved, hit count = 1'])
-
- def expr(self, strip):
- self.common_setup(strip)
-
- # This should display correctly.
- self.expect(
- "expression (j->_definer->foo)",
- VARIABLES_DISPLAYED_CORRECTLY,
- substrs=["= 4"])
-
- self.expect(
- "expression (j->_definer->bar)",
- VARIABLES_DISPLAYED_CORRECTLY,
- substrs=["= 5"])
-
- if strip:
- self.expect(
- "expression *(j->_definer)",
- VARIABLES_DISPLAYED_CORRECTLY,
- substrs=["foo = 4"])
- else:
- self.expect(
- "expression *(j->_definer)",
- VARIABLES_DISPLAYED_CORRECTLY,
- substrs=[
- "foo = 4",
- "bar = 5"])
-
- self.expect("expression (k->foo)", VARIABLES_DISPLAYED_CORRECTLY,
- substrs=["= 2"])
-
- self.expect("expression (k->bar)", VARIABLES_DISPLAYED_CORRECTLY,
- substrs=["= 3"])
-
- self.expect(
- "expression k.filteredDataSource",
- VARIABLES_DISPLAYED_CORRECTLY,
- substrs=[
- ' = 0x',
- '"2 elements"'])
-
- if strip:
- self.expect("expression *(k)", VARIABLES_DISPLAYED_CORRECTLY,
- substrs=["foo = 2", ' = 0x', '"2 elements"'])
- else:
- self.expect(
- "expression *(k)",
- VARIABLES_DISPLAYED_CORRECTLY,
- substrs=[
- "foo = 2",
- "bar = 3",
- '_filteredDataSource = 0x',
- '"2 elements"'])
-
- def frame_var(self, strip):
- self.common_setup(strip)
-
- # This should display correctly.
- self.expect(
- "frame variable j->_definer->foo",
- VARIABLES_DISPLAYED_CORRECTLY,
- substrs=["= 4"])
-
- if not strip:
- self.expect(
- "frame variable j->_definer->bar",
- VARIABLES_DISPLAYED_CORRECTLY,
- substrs=["= 5"])
-
- if strip:
- self.expect(
- "frame variable *j->_definer",
- VARIABLES_DISPLAYED_CORRECTLY,
- substrs=["foo = 4"])
- else:
- self.expect(
- "frame variable *j->_definer",
- VARIABLES_DISPLAYED_CORRECTLY,
- substrs=[
- "foo = 4",
- "bar = 5"])
-
- self.expect("frame variable k->foo", VARIABLES_DISPLAYED_CORRECTLY,
- substrs=["= 2"])
-
- self.expect(
- "frame variable k->_filteredDataSource",
- VARIABLES_DISPLAYED_CORRECTLY,
- substrs=[
- ' = 0x',
- '"2 elements"'])
-
- if strip:
- self.expect(
- "frame variable *k",
- VARIABLES_DISPLAYED_CORRECTLY,
- substrs=[
- "foo = 2",
- '_filteredDataSource = 0x',
- '"2 elements"'])
- else:
- self.expect(
- "frame variable *k",
- VARIABLES_DISPLAYED_CORRECTLY,
- substrs=[
- "foo = 2",
- "bar = 3",
- '_filteredDataSource = 0x',
- '"2 elements"'])
diff --git a/packages/Python/lldbsuite/test/lang/objc/hidden-ivars/main.m b/packages/Python/lldbsuite/test/lang/objc/hidden-ivars/main.m
deleted file mode 100644
index 1795d56e7d8a..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/hidden-ivars/main.m
+++ /dev/null
@@ -1,54 +0,0 @@
-#import <Foundation/Foundation.h>
-#import "InternalDefiner.h"
-
-@interface Container : NSObject {
-@public
- InternalDefiner *_definer;
-}
-
--(id)init;
-@end
-
-@implementation Container
-
--(id)init
-{
- if (self = [super init])
- {
- _definer = [[InternalDefiner alloc] initWithFoo:4 andBar:5];
- }
- return self;
-}
-
-@end
-
-@interface InheritContainer : InternalDefiner
-@property (nonatomic, strong) NSMutableArray *filteredDataSource;
--(id)init;
-@end
-
-@implementation InheritContainer
-
--(id)init
-{
- if (self = [super initWithFoo:2 andBar:3])
- {
- self.filteredDataSource = [NSMutableArray arrayWithObjects:@"hello", @"world", nil];
- }
- return self;
-}
-
-@end
-
-int main(int argc, const char * argv[])
-{
- @autoreleasepool {
- Container *j = [[Container alloc] init];
- InheritContainer *k = [[InheritContainer alloc] init];
-
- printf("ivar value = %u\n", (unsigned)j->_definer->foo); // breakpoint1
- printf("ivar value = %u\n", (unsigned)k->foo);
- }
- return 0;
-}
-
diff --git a/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/Makefile b/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/Makefile
deleted file mode 100644
index f69da9a64be0..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/Makefile
+++ /dev/null
@@ -1,28 +0,0 @@
-LEVEL = ../../../make
-
-CC ?= clang
-ifeq "$(ARCH)" ""
- ARCH = x86_64
-endif
-
-ifeq "$(OS)" ""
- OS = $(shell uname -s)
-endif
-
-CFLAGS ?= -g -O0
-CFLAGS_NO_DEBUG =
-ifeq "$(OS)" "Darwin"
- CFLAGS += -arch $(ARCH)
- CFLAGS_NO_DEBUG += -arch $(ARCH)
-endif
-
-all: aout
-
-aout:
- $(CC) $(CFLAGS_NO_DEBUG) $(SRCDIR)/myclass.m -c -o myclass.o
- $(CC) $(CFLAGS) myclass.o $(SRCDIR)/repro.m -framework Foundation
-
-clean::
- rm -f myclass.o
-
-include $(LEVEL)/Makefile.rules
diff --git a/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/TestObjCiVarIMP.py b/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/TestObjCiVarIMP.py
deleted file mode 100644
index ad7f96c0ac8b..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/TestObjCiVarIMP.py
+++ /dev/null
@@ -1,62 +0,0 @@
-"""
-Test that dynamically discovered ivars of type IMP do not crash LLDB
-"""
-
-from __future__ import print_function
-
-
-import os
-import time
-import re
-
-import lldb
-from lldbsuite.support import seven
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-def execute_command(command):
- # print('%% %s' % (command))
- (exit_status, output) = seven.get_command_status_output(command)
- # if output:
- # print(output)
- # print('status = %u' % (exit_status))
- return exit_status
-
-
-class ObjCiVarIMPTestCase(TestBase):
-
- mydir = TestBase.compute_mydir(__file__)
-
- @skipUnlessDarwin
- @skipIf(archs=['i386']) # objc file does not build for i386
- @no_debug_info_test
- def test_imp_ivar_type(self):
- """Test that dynamically discovered ivars of type IMP do not crash LLDB"""
- self.build()
- exe = self.getBuildArtifact("a.out")
-
- # Create a target from the debugger.
- target = self.dbg.CreateTarget(exe)
- self.assertTrue(target, VALID_TARGET)
-
- # Set up our breakpoint
-
- bkpt = lldbutil.run_break_set_by_source_regexp(self, "break here")
-
- # Now launch the process, and do not stop at the entry point.
- process = target.LaunchSimple(
- None, None, self.get_process_working_directory())
-
- self.assertTrue(process.GetState() == lldb.eStateStopped,
- PROCESS_STOPPED)
-
- self.expect(
- 'frame variable --ptr-depth=1 --show-types -d run -- object',
- substrs=[
- '(MyClass *) object = 0x',
- '(void *) myImp = 0x'])
- self.expect(
- 'disassemble --start-address `((MyClass*)object)->myImp`',
- substrs=['-[MyClass init]'])
diff --git a/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/myclass.h b/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/myclass.h
deleted file mode 100644
index da28d1e05181..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/myclass.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#import <Foundation/Foundation.h>
-
-@interface MyClass : NSObject
-{}
-- (id)init;
-@end
diff --git a/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/myclass.m b/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/myclass.m
deleted file mode 100644
index 85b2fcfe9b3c..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/myclass.m
+++ /dev/null
@@ -1,16 +0,0 @@
-#import <Foundation/Foundation.h>
-#import "myclass.h"
-
-@implementation MyClass
-{
- IMP myImp;
-}
-- (id)init {
- if (self = [super init])
- {
- SEL theSelector = @selector(init);
- self->myImp = [self methodForSelector:theSelector];
- }
- return self;
-}
-@end
diff --git a/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/repro.m b/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/repro.m
deleted file mode 100644
index 14f911f07dd8..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/repro.m
+++ /dev/null
@@ -1,7 +0,0 @@
-#import <Foundation/Foundation.h>
-#import "myclass.h"
-
-int main() {
- id object = [MyClass new];
- return 0; // break here
-}
diff --git a/packages/Python/lldbsuite/test/lang/objc/modules-auto-import/Makefile b/packages/Python/lldbsuite/test/lang/objc/modules-auto-import/Makefile
deleted file mode 100644
index ca099e1e9611..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/modules-auto-import/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-LEVEL = ../../../make
-OBJC_SOURCES := main.m
-
-CFLAGS += $(MANDATORY_MODULE_BUILD_CFLAGS)
-
-include $(LEVEL)/Makefile.rules
diff --git a/packages/Python/lldbsuite/test/lang/objc/modules-auto-import/TestModulesAutoImport.py b/packages/Python/lldbsuite/test/lang/objc/modules-auto-import/TestModulesAutoImport.py
deleted file mode 100644
index 264631805ed2..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/modules-auto-import/TestModulesAutoImport.py
+++ /dev/null
@@ -1,53 +0,0 @@
-"""Test that importing modules in Objective-C works as expected."""
-
-from __future__ import print_function
-
-
-from distutils.version import StrictVersion
-import unittest2
-import os
-import time
-import lldb
-import platform
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ObjCModulesAutoImportTestCase(TestBase):
-
- mydir = TestBase.compute_mydir(__file__)
-
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
- # Find the line number to break inside main().
- self.line = line_number('main.m', '// Set breakpoint 0 here.')
-
- @skipUnlessDarwin
- @skipIf(macos_version=["<", "10.12"])
- def test_expr(self):
- self.build()
- exe = self.getBuildArtifact("a.out")
- self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
- # Break inside the foo function which takes a bar_ptr argument.
- lldbutil.run_break_set_by_file_and_line(
- self, "main.m", self.line, num_expected_locations=1, loc_exact=True)
-
- self.runCmd("run", RUN_SUCCEEDED)
-
- # The stop reason of the thread should be breakpoint.
- self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
- substrs=['stopped',
- 'stop reason = breakpoint'])
-
- # The breakpoint should have a hit count of 1.
- self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
- substrs=[' resolved, hit count = 1'])
-
- self.runCmd("settings set target.auto-import-clang-modules true")
-
- self.expect("p getpid()", VARIABLES_DISPLAYED_CORRECTLY,
- substrs=["pid_t"])
diff --git a/packages/Python/lldbsuite/test/lang/objc/modules-auto-import/main.m b/packages/Python/lldbsuite/test/lang/objc/modules-auto-import/main.m
deleted file mode 100644
index 5452ffd9bd15..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/modules-auto-import/main.m
+++ /dev/null
@@ -1,7 +0,0 @@
-@import Darwin;
-
-int main()
-{
- size_t ret = printf("Stop here\n"); // Set breakpoint 0 here.
- return ret;
-}
diff --git a/packages/Python/lldbsuite/test/lang/objc/modules-cache/Makefile b/packages/Python/lldbsuite/test/lang/objc/modules-cache/Makefile
deleted file mode 100644
index 00cb9b6be34a..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/modules-cache/Makefile
+++ /dev/null
@@ -1,3 +0,0 @@
-LEVEL = ../../../make
-OBJC_SOURCES := main.m
-include $(LEVEL)/Makefile.rules
diff --git a/packages/Python/lldbsuite/test/lang/objc/modules-cache/TestClangModulesCache.py b/packages/Python/lldbsuite/test/lang/objc/modules-cache/TestClangModulesCache.py
deleted file mode 100644
index 0cff6916e7f1..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/modules-cache/TestClangModulesCache.py
+++ /dev/null
@@ -1,41 +0,0 @@
-"""Test that the clang modules cache directory can be controlled."""
-
-from __future__ import print_function
-
-
-import unittest2
-import os
-import time
-import platform
-import shutil
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ObjCModulesTestCase(TestBase):
- NO_DEBUG_INFO_TESTCASE = True
- mydir = TestBase.compute_mydir(__file__)
-
- def setUp(self):
- TestBase.setUp(self)
-
- @skipUnlessDarwin
- def test_expr(self):
- self.build()
- self.main_source_file = lldb.SBFileSpec("main.m")
- self.runCmd("settings set target.auto-import-clang-modules true")
- mod_cache = self.getBuildArtifact("my-clang-modules-cache")
- if os.path.isdir(mod_cache):
- shutil.rmtree(mod_cache)
- self.assertFalse(os.path.isdir(mod_cache),
- "module cache should not exist")
- self.runCmd('settings set symbols.clang-modules-cache-path "%s"' % mod_cache)
- self.runCmd('settings set target.clang-module-search-paths "%s"'
- % self.getSourceDir())
- (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(
- self, "Set breakpoint here", self.main_source_file)
- self.runCmd("expr @import Foo")
- self.assertTrue(os.path.isdir(mod_cache), "module cache exists")
diff --git a/packages/Python/lldbsuite/test/lang/objc/modules-cache/f.h b/packages/Python/lldbsuite/test/lang/objc/modules-cache/f.h
deleted file mode 100644
index 56757a701bf5..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/modules-cache/f.h
+++ /dev/null
@@ -1 +0,0 @@
-void f() {}
diff --git a/packages/Python/lldbsuite/test/lang/objc/modules-cache/main.m b/packages/Python/lldbsuite/test/lang/objc/modules-cache/main.m
deleted file mode 100644
index 6009d28d81b9..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/modules-cache/main.m
+++ /dev/null
@@ -1,5 +0,0 @@
-#include "f.h"
-int main() {
- f(); // Set breakpoint here.
- return 0;
-}
diff --git a/packages/Python/lldbsuite/test/lang/objc/modules-cache/module.modulemap b/packages/Python/lldbsuite/test/lang/objc/modules-cache/module.modulemap
deleted file mode 100644
index f54534a1c070..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/modules-cache/module.modulemap
+++ /dev/null
@@ -1,3 +0,0 @@
-module Foo {
- header "f.h"
-}
diff --git a/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/Makefile b/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/Makefile
deleted file mode 100644
index b8462bc818ca..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-LEVEL = ../../../make
-
-OBJC_SOURCES := main.m myModule.m
-
-include $(LEVEL)/Makefile.rules
-
-CFLAGS += $(MANDATORY_MODULE_BUILD_CFLAGS)
-LDFLAGS += -framework Foundation
diff --git a/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/TestIncompleteModules.py b/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/TestIncompleteModules.py
deleted file mode 100644
index 7bde8fc96896..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/TestIncompleteModules.py
+++ /dev/null
@@ -1,64 +0,0 @@
-"""Test that DWARF types are trusted over module types"""
-
-from __future__ import print_function
-
-
-import unittest2
-import platform
-from distutils.version import StrictVersion
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class IncompleteModulesTestCase(TestBase):
-
- mydir = TestBase.compute_mydir(__file__)
-
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
- # Find the line number to break inside main().
- self.line = line_number('main.m', '// Set breakpoint 0 here.')
-
- @skipUnlessDarwin
- @skipIf(debug_info=no_match(["gmodules"]))
- def test_expr(self):
- self.build()
- exe = self.getBuildArtifact("a.out")
- self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
- lldbutil.run_break_set_by_file_and_line(
- self, "main.m", self.line, num_expected_locations=1, loc_exact=True)
-
- self.runCmd("run", RUN_SUCCEEDED)
-
- # The stop reason of the thread should be breakpoint.
- self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
- substrs=['stopped',
- 'stop reason = breakpoint'])
-
- # The breakpoint should have a hit count of 1.
- self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
- substrs=[' resolved, hit count = 1'])
-
- self.runCmd(
- "settings set target.clang-module-search-paths \"" +
- self.getSourceDir() +
- "\"")
-
- self.expect("expr @import myModule; 3", VARIABLES_DISPLAYED_CORRECTLY,
- substrs=["int", "3"])
-
- self.expect(
- "expr private_func()",
- VARIABLES_DISPLAYED_CORRECTLY,
- substrs=[
- "int",
- "5"])
-
- self.expect("expr MY_MIN(2,3)", "#defined macro was found",
- substrs=["int", "2"])
-
- self.expect("expr MY_MAX(2,3)", "#undefd macro was correctly not found",
- error=True)
diff --git a/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/main.m b/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/main.m
deleted file mode 100644
index bfa0b06f1a14..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/main.m
+++ /dev/null
@@ -1,7 +0,0 @@
-@import myModule;
-@import minmax;
-
-int main(int argc, char **argv) {
- public_func(); // Set breakpoint 0 here.
- return 0;
-}
diff --git a/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/minmax.h b/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/minmax.h
deleted file mode 100644
index efad1201695f..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/minmax.h
+++ /dev/null
@@ -1,2 +0,0 @@
-#define MY_MIN(A, B) (((A) < (B)) ? (A) : (B))
-#define MY_MAX(A, B) (((A) < (B)) ? (B) : (A))
diff --git a/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/module.map b/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/module.map
deleted file mode 100644
index 0dd9fadb2621..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/module.map
+++ /dev/null
@@ -1,9 +0,0 @@
-module myModule {
- header "myModule.h"
- export *
-}
-
-module minmax {
- header "minmax.h"
- export *
-}
diff --git a/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/myModule.h b/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/myModule.h
deleted file mode 100644
index 04ec3885c838..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/myModule.h
+++ /dev/null
@@ -1,5 +0,0 @@
-@import minmax;
-
-#undef MY_MAX
-
-extern void public_func();
diff --git a/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/myModule.m b/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/myModule.m
deleted file mode 100644
index 372a32889322..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/myModule.m
+++ /dev/null
@@ -1,8 +0,0 @@
-#include "myModule.h"
-
-void public_func() {}
-
-int private_func() {
- return 5;
-}
-
diff --git a/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/Makefile b/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/Makefile
deleted file mode 100644
index 320e13ed5c5f..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/Makefile
+++ /dev/null
@@ -1,9 +0,0 @@
-LEVEL = ../../../make
-
-C_SOURCES := myModule.c
-
-OBJC_SOURCES := main.m
-
-include $(LEVEL)/Makefile.rules
-
-CFLAGS += $(MANDATORY_MODULE_BUILD_CFLAGS) -I$(PWD)
diff --git a/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/TestModulesInlineFunctions.py b/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/TestModulesInlineFunctions.py
deleted file mode 100644
index e9dbe6af864f..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/TestModulesInlineFunctions.py
+++ /dev/null
@@ -1,47 +0,0 @@
-"""Test that inline functions from modules are imported correctly"""
-
-from __future__ import print_function
-
-
-from distutils.version import StrictVersion
-
-import unittest2
-import os
-import time
-import platform
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ModulesInlineFunctionsTestCase(TestBase):
-
- mydir = TestBase.compute_mydir(__file__)
-
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
-
- @skipUnlessDarwin
- @skipIf(macos_version=["<", "10.12"], debug_info=no_match(["gmodules"]))
- def test_expr(self):
- self.build()
- exe = self.getBuildArtifact("a.out")
- self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
- # Break inside the foo function which takes a bar_ptr argument.
- lldbutil.run_to_source_breakpoint(
- self, '// Set breakpoint here.', lldb.SBFileSpec('main.m'))
-
- self.runCmd(
- "settings set target.clang-module-search-paths \"" +
- self.getSourceDir() +
- "\"")
-
- self.expect("expr @import myModule; 3", VARIABLES_DISPLAYED_CORRECTLY,
- substrs=["int", "3"])
-
- self.expect("expr isInline(2)", VARIABLES_DISPLAYED_CORRECTLY,
- substrs=["4"])
diff --git a/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/main.m b/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/main.m
deleted file mode 100644
index 13a5bf316ee9..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/main.m
+++ /dev/null
@@ -1,9 +0,0 @@
-@import Darwin;
-@import myModule;
-
-int main()
-{
- int a = isInline(2);
- int b = notInline();
- printf("%d %d\n", a, b); // Set breakpoint here.
-}
diff --git a/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/module.map b/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/module.map
deleted file mode 100644
index 2ef8064d15b4..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/module.map
+++ /dev/null
@@ -1,4 +0,0 @@
-module myModule {
- header "myModule.h"
- export *
-}
diff --git a/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/myModule.c b/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/myModule.c
deleted file mode 100644
index ad3c85d155e4..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/myModule.c
+++ /dev/null
@@ -1,7 +0,0 @@
-#include "myModule.h"
-
-int notInline()
-{
- return 3;
-}
-
diff --git a/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/myModule.h b/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/myModule.h
deleted file mode 100644
index d50d0101f645..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/myModule.h
+++ /dev/null
@@ -1,7 +0,0 @@
-int notInline();
-
-static __inline__ __attribute__ ((always_inline)) int isInline(int a)
-{
- int b = a + a;
- return b;
-}
diff --git a/packages/Python/lldbsuite/test/lang/objc/modules/Makefile b/packages/Python/lldbsuite/test/lang/objc/modules/Makefile
deleted file mode 100644
index ad3cb3fadcde..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/modules/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-LEVEL = ../../../make
-
-OBJC_SOURCES := main.m
-
-include $(LEVEL)/Makefile.rules
-
-LDFLAGS += -framework Foundation
diff --git a/packages/Python/lldbsuite/test/lang/objc/modules/TestObjCModules.py b/packages/Python/lldbsuite/test/lang/objc/modules/TestObjCModules.py
deleted file mode 100644
index 8f5c407000c8..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/modules/TestObjCModules.py
+++ /dev/null
@@ -1,80 +0,0 @@
-"""Test that importing modules in Objective-C works as expected."""
-
-from __future__ import print_function
-
-
-import unittest2
-import os
-import time
-import platform
-from distutils.version import StrictVersion
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ObjCModulesTestCase(TestBase):
-
- mydir = TestBase.compute_mydir(__file__)
-
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
- # Find the line number to break inside main().
- self.line = line_number('main.m', '// Set breakpoint 0 here.')
-
- @skipUnlessDarwin
- @skipIf(macos_version=["<", "10.12"])
- def test_expr(self):
- self.build()
- exe = self.getBuildArtifact("a.out")
- self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
- # Break inside the foo function which takes a bar_ptr argument.
- lldbutil.run_break_set_by_file_and_line(
- self, "main.m", self.line, num_expected_locations=1, loc_exact=True)
-
- self.runCmd("run", RUN_SUCCEEDED)
-
- # The stop reason of the thread should be breakpoint.
- self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
- substrs=['stopped',
- 'stop reason = breakpoint'])
-
- # The breakpoint should have a hit count of 1.
- self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
- substrs=[' resolved, hit count = 1'])
-
- self.expect("expr @import Darwin; 3", VARIABLES_DISPLAYED_CORRECTLY,
- substrs=["int", "3"])
-
- self.expect("expr getpid()", VARIABLES_DISPLAYED_CORRECTLY,
- substrs=["pid_t"])
-
- self.expect(
- "expr @import Foundation; 4",
- VARIABLES_DISPLAYED_CORRECTLY,
- substrs=[
- "int",
- "4"])
-
- self.expect("expr string.length", VARIABLES_DISPLAYED_CORRECTLY,
- substrs=["NSUInteger", "5"])
-
- self.expect("expr array.count", VARIABLES_DISPLAYED_CORRECTLY,
- substrs=["NSUInteger", "3"])
-
- self.expect(
- "p *[NSURL URLWithString:@\"http://lldb.llvm.org\"]",
- VARIABLES_DISPLAYED_CORRECTLY,
- substrs=[
- "NSURL",
- "isa",
- "_urlString"])
-
- self.expect(
- "p [NSURL URLWithString:@\"http://lldb.llvm.org\"].scheme",
- VARIABLES_DISPLAYED_CORRECTLY,
- substrs=["http"])
diff --git a/packages/Python/lldbsuite/test/lang/objc/modules/main.m b/packages/Python/lldbsuite/test/lang/objc/modules/main.m
deleted file mode 100644
index 99b50f9620d6..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/modules/main.m
+++ /dev/null
@@ -1,12 +0,0 @@
-#import <Foundation/Foundation.h>
-
-int main()
-{
- @autoreleasepool
- {
- NSString *string = @"Hello";
- NSArray *array = @[ @1, @2, @3 ];
-
- NSLog(@"Stop here"); // Set breakpoint 0 here.
- }
-}
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc++/Makefile b/packages/Python/lldbsuite/test/lang/objc/objc++/Makefile
deleted file mode 100644
index 910d4943ef05..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/objc++/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-LEVEL = ../../../make
-
-OBJCXX_SOURCES := main.mm
-LD_EXTRAS = -framework Foundation
-
-include $(LEVEL)/Makefile.rules
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc++/TestObjCXX.py b/packages/Python/lldbsuite/test/lang/objc/objc++/TestObjCXX.py
deleted file mode 100644
index 996ec6ccdac8..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/objc++/TestObjCXX.py
+++ /dev/null
@@ -1,36 +0,0 @@
-"""
-Make sure that ivars of Objective-C++ classes are visible in LLDB.
-"""
-
-from __future__ import print_function
-
-
-import os
-import time
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ObjCXXTestCase(TestBase):
-
- mydir = TestBase.compute_mydir(__file__)
-
- @skipUnlessDarwin
- def test_break(self):
- """Test ivars of Objective-C++ classes"""
- if self.getArchitecture() == 'i386':
- self.skipTest("requires Objective-C 2.0 runtime")
-
- self.build()
- exe = self.getBuildArtifact("a.out")
- self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
- lldbutil.run_break_set_by_source_regexp(
- self, 'breakpoint 1', num_expected_locations=1)
-
- self.runCmd("run", RUN_SUCCEEDED)
-
- self.expect("expr f->f", "Found ivar in class",
- substrs=["= 3"])
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc++/main.mm b/packages/Python/lldbsuite/test/lang/objc/objc++/main.mm
deleted file mode 100644
index 50d2f0a8df37..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/objc++/main.mm
+++ /dev/null
@@ -1,19 +0,0 @@
-#include <Foundation/NSObject.h>
-
-@interface F : NSObject
-@end
-
-@implementation F
-{
-@public
- int f;
-}
-
-@end
-
-int main(int argc, char* argv[])
-{
- F* f = [F new];
- f->f = 3;
- return 0; // breakpoint 1
-}
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-baseclass-sbtype/Makefile b/packages/Python/lldbsuite/test/lang/objc/objc-baseclass-sbtype/Makefile
deleted file mode 100644
index 7f7baeb3cf1c..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/objc-baseclass-sbtype/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-LEVEL = ../../../make
-
-OBJC_SOURCES := main.m
-LD_EXTRAS = -lobjc -framework Foundation
-
-include $(LEVEL)/Makefile.rules
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-baseclass-sbtype/TestObjCBaseClassSBType.py b/packages/Python/lldbsuite/test/lang/objc/objc-baseclass-sbtype/TestObjCBaseClassSBType.py
deleted file mode 100644
index 7bba071922ce..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/objc-baseclass-sbtype/TestObjCBaseClassSBType.py
+++ /dev/null
@@ -1,68 +0,0 @@
-"""
-Use lldb Python API to test base class resolution for ObjC classes
-"""
-
-from __future__ import print_function
-
-
-import os
-import time
-import re
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ObjCDynamicValueTestCase(TestBase):
-
- mydir = TestBase.compute_mydir(__file__)
-
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
-
- self.line = line_number('main.m', '// Set breakpoint here.')
-
- @skipUnlessDarwin
- @add_test_categories(['pyapi'])
- def test_get_baseclass(self):
- """Test fetching ObjC dynamic values."""
- if self.getArchitecture() == 'i386':
- # rdar://problem/9946499
- self.skipTest("Dynamic types for ObjC V1 runtime not implemented")
-
- self.build()
- exe = self.getBuildArtifact("a.out")
-
- # Create a target from the debugger.
-
- target = self.dbg.CreateTarget(exe)
- self.assertTrue(target, VALID_TARGET)
-
- # Set up our breakpoints:
-
- target.BreakpointCreateByLocation('main.m', self.line)
- process = target.LaunchSimple(
- None, None, self.get_process_working_directory())
-
- self.assertTrue(process.GetState() == lldb.eStateStopped,
- PROCESS_STOPPED)
-
- var = self.frame().FindVariable("foo")
- var_ptr_type = var.GetType()
- var_pte_type = var_ptr_type.GetPointeeType()
- self.assertTrue(
- var_ptr_type.GetNumberOfDirectBaseClasses() == 1,
- "Foo * has one base class")
- self.assertTrue(
- var_pte_type.GetNumberOfDirectBaseClasses() == 1,
- "Foo has one base class")
-
- self.assertTrue(var_ptr_type.GetDirectBaseClassAtIndex(
- 0).IsValid(), "Foo * has a valid base class")
- self.assertTrue(var_pte_type.GetDirectBaseClassAtIndex(
- 0).IsValid(), "Foo * has a valid base class")
-
- self.assertTrue(var_ptr_type.GetDirectBaseClassAtIndex(0).GetName() == var_pte_type.GetDirectBaseClassAtIndex(
- 0).GetName(), "Foo and its pointer type don't agree on their base class")
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-baseclass-sbtype/main.m b/packages/Python/lldbsuite/test/lang/objc/objc-baseclass-sbtype/main.m
deleted file mode 100644
index 3ec78fd0bd6b..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/objc-baseclass-sbtype/main.m
+++ /dev/null
@@ -1,22 +0,0 @@
-#import <Foundation/Foundation.h>
-
-@interface Foo : NSObject {}
-
--(id) init;
-
-@end
-
-@implementation Foo
-
--(id) init
-{
- return self = [super init];
-}
-@end
-int main ()
-{
- Foo *foo = [Foo new];
- NSLog(@"a"); // Set breakpoint here.
- return 0;
-}
-
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-builtin-types/Makefile b/packages/Python/lldbsuite/test/lang/objc/objc-builtin-types/Makefile
deleted file mode 100644
index 314f1cb2f077..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/objc-builtin-types/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../../make
-
-CXX_SOURCES := main.cpp
-
-include $(LEVEL)/Makefile.rules
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-builtin-types/TestObjCBuiltinTypes.py b/packages/Python/lldbsuite/test/lang/objc/objc-builtin-types/TestObjCBuiltinTypes.py
deleted file mode 100644
index 0aa831850198..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/objc-builtin-types/TestObjCBuiltinTypes.py
+++ /dev/null
@@ -1,64 +0,0 @@
-"""Test that the expression parser doesn't get confused by 'id' and 'Class'"""
-
-from __future__ import print_function
-
-
-import os
-import time
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestObjCBuiltinTypes(TestBase):
-
- mydir = TestBase.compute_mydir(__file__)
-
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
- # Find the line numbers to break inside main().
- self.main_source = "main.cpp"
- self.break_line = line_number(
- self.main_source, '// Set breakpoint here.')
-
- @skipUnlessDarwin
- @add_test_categories(['pyapi'])
- #<rdar://problem/10591460> [regression] Can't print ivar value: error: reference to 'id' is ambiguous
- def test_with_python_api(self):
- """Test expression parser respect for ObjC built-in types."""
- self.build()
- exe = self.getBuildArtifact("a.out")
-
- target = self.dbg.CreateTarget(exe)
- self.assertTrue(target, VALID_TARGET)
-
- bpt = target.BreakpointCreateByLocation(
- self.main_source, self.break_line)
- self.assertTrue(bpt, VALID_BREAKPOINT)
-
- # Now launch the process, and do not stop at entry point.
- process = target.LaunchSimple(
- None, None, self.get_process_working_directory())
-
- self.assertTrue(process, PROCESS_IS_VALID)
-
- # The stop reason of the thread should be breakpoint.
- thread_list = lldbutil.get_threads_stopped_at_breakpoint(process, bpt)
-
- # Make sure we stopped at the first breakpoint.
- self.assertTrue(
- len(thread_list) != 0,
- "No thread stopped at our breakpoint.")
- self.assertTrue(len(thread_list) == 1,
- "More than one thread stopped at our breakpoint.")
-
- # Now make sure we can call a function in the class method we've
- # stopped in.
- frame = thread_list[0].GetFrameAtIndex(0)
- self.assertTrue(frame, "Got a valid frame 0 frame.")
-
- self.expect("expr (foo)", patterns=["\(ns::id\) \$.* = 0"])
-
- self.expect("expr id my_id = 0; my_id", patterns=["\(id\) \$.* = nil"])
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-builtin-types/main.cpp b/packages/Python/lldbsuite/test/lang/objc/objc-builtin-types/main.cpp
deleted file mode 100644
index 6dd8cbc6e9fe..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/objc-builtin-types/main.cpp
+++ /dev/null
@@ -1,9 +0,0 @@
-namespace ns {
- typedef int id;
-};
-
-int main()
-{
- ns::id foo = 0;
- return foo; // Set breakpoint here.
-}
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-checker/Makefile b/packages/Python/lldbsuite/test/lang/objc/objc-checker/Makefile
deleted file mode 100644
index a1608fe5a664..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/objc-checker/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-LEVEL = ../../../make
-
-OBJC_SOURCES := main.m
-LDFLAGS = $(CFLAGS) -lobjc -framework Foundation
-
-include $(LEVEL)/Makefile.rules
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-checker/TestObjCCheckers.py b/packages/Python/lldbsuite/test/lang/objc/objc-checker/TestObjCCheckers.py
deleted file mode 100644
index 644cd87305e9..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/objc-checker/TestObjCCheckers.py
+++ /dev/null
@@ -1,79 +0,0 @@
-"""
-Use lldb Python API to make sure the dynamic checkers are doing their jobs.
-"""
-
-from __future__ import print_function
-
-
-import os
-import time
-import re
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ObjCCheckerTestCase(TestBase):
-
- mydir = TestBase.compute_mydir(__file__)
-
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
-
- # Find the line number to break for main.c.
- self.source_name = 'main.m'
-
- @skipUnlessDarwin
- @add_test_categories(['pyapi'])
- def test_objc_checker(self):
- """Test that checkers catch unrecognized selectors"""
- if self.getArchitecture() == 'i386':
- self.skipTest("requires Objective-C 2.0 runtime")
-
- self.build()
- exe = self.getBuildArtifact("a.out")
-
- # Create a target from the debugger.
-
- target = self.dbg.CreateTarget(exe)
- self.assertTrue(target, VALID_TARGET)
-
- # Set up our breakpoints:
-
- main_bkpt = target.BreakpointCreateBySourceRegex(
- "Set a breakpoint here.", lldb.SBFileSpec(self.source_name))
- self.assertTrue(main_bkpt and
- main_bkpt.GetNumLocations() == 1,
- VALID_BREAKPOINT)
-
- # Now launch the process, and do not stop at the entry point.
- process = target.LaunchSimple(
- None, None, self.get_process_working_directory())
-
- self.assertTrue(process.GetState() == lldb.eStateStopped,
- PROCESS_STOPPED)
-
- threads = lldbutil.get_threads_stopped_at_breakpoint(
- process, main_bkpt)
- self.assertTrue(len(threads) == 1)
- thread = threads[0]
-
- #
- # The class Simple doesn't have a count method. Make sure that we don't
- # actually try to send count but catch it as an unrecognized selector.
-
- frame = thread.GetFrameAtIndex(0)
- expr_value = frame.EvaluateExpression("(int) [my_simple count]", False)
- expr_error = expr_value.GetError()
-
- self.assertTrue(expr_error.Fail())
-
- # Make sure the call produced no NSLog stdout.
- stdout = process.GetSTDOUT(100)
- self.assertTrue(stdout is None or (len(stdout) == 0))
-
- # Make sure the error is helpful:
- err_string = expr_error.GetCString()
- self.assertTrue("selector" in err_string)
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-checker/main.m b/packages/Python/lldbsuite/test/lang/objc/objc-checker/main.m
deleted file mode 100644
index 4a09a2826f70..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/objc-checker/main.m
+++ /dev/null
@@ -1,32 +0,0 @@
-#import <Foundation/Foundation.h>
-
-@interface Simple : NSObject
-{
- int _value;
-}
-- (int) value;
-- (void) setValue: (int) newValue;
-@end
-
-@implementation Simple
-- (int) value
-{
- return _value;
-}
-
-- (void) setValue: (int) newValue
-{
- _value = newValue;
-}
-@end
-
-int main ()
-{
- NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
- Simple *my_simple = [[Simple alloc] init];
- my_simple.value = 20;
- // Set a breakpoint here.
- NSLog (@"Object has value: %d.", my_simple.value);
- [pool drain];
- return 0;
-}
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-class-method/Makefile b/packages/Python/lldbsuite/test/lang/objc/objc-class-method/Makefile
deleted file mode 100644
index c2d07910a6e8..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/objc-class-method/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-LEVEL = ../../../make
-
-OBJC_SOURCES := class.m
-LDFLAGS = $(CFLAGS) -lobjc -framework Foundation
-
-include $(LEVEL)/Makefile.rules
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-class-method/TestObjCClassMethod.py b/packages/Python/lldbsuite/test/lang/objc/objc-class-method/TestObjCClassMethod.py
deleted file mode 100644
index 8470d77db9b2..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/objc-class-method/TestObjCClassMethod.py
+++ /dev/null
@@ -1,68 +0,0 @@
-"""Test calling functions in class methods."""
-
-from __future__ import print_function
-
-
-import os
-import time
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestObjCClassMethod(TestBase):
-
- mydir = TestBase.compute_mydir(__file__)
-
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
- # Find the line numbers to break inside main().
- self.main_source = "class.m"
- self.break_line = line_number(
- self.main_source, '// Set breakpoint here.')
-
- @skipUnlessDarwin
- @add_test_categories(['pyapi'])
- def test_with_python_api(self):
- """Test calling functions in class methods."""
- self.build()
- exe = self.getBuildArtifact("a.out")
-
- target = self.dbg.CreateTarget(exe)
- self.assertTrue(target, VALID_TARGET)
-
- bpt = target.BreakpointCreateByLocation(
- self.main_source, self.break_line)
- self.assertTrue(bpt, VALID_BREAKPOINT)
-
- # Now launch the process, and do not stop at entry point.
- process = target.LaunchSimple(
- None, None, self.get_process_working_directory())
-
- self.assertTrue(process, PROCESS_IS_VALID)
-
- # The stop reason of the thread should be breakpoint.
- thread_list = lldbutil.get_threads_stopped_at_breakpoint(process, bpt)
-
- # Make sure we stopped at the first breakpoint.
- self.assertTrue(
- len(thread_list) != 0,
- "No thread stopped at our breakpoint.")
- self.assertTrue(len(thread_list) == 1,
- "More than one thread stopped at our breakpoint.")
-
- # Now make sure we can call a function in the class method we've
- # stopped in.
- frame = thread_list[0].GetFrameAtIndex(0)
- self.assertTrue(frame, "Got a valid frame 0 frame.")
-
- cmd_value = frame.EvaluateExpression(
- "(int)[Foo doSomethingWithString:@\"Hello\"]")
- if self.TraceOn():
- if cmd_value.IsValid():
- print("cmd_value is valid")
- print("cmd_value has the value %d" % cmd_value.GetValueAsUnsigned())
- self.assertTrue(cmd_value.IsValid())
- self.assertTrue(cmd_value.GetValueAsUnsigned() == 5)
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-class-method/class.m b/packages/Python/lldbsuite/test/lang/objc/objc-class-method/class.m
deleted file mode 100644
index 18a2c2729bea..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/objc-class-method/class.m
+++ /dev/null
@@ -1,24 +0,0 @@
-#import <Foundation/Foundation.h>
-
-@interface Foo : NSObject
-+(int) doSomethingWithString: (NSString *) string;
--(int) doSomethingInstance: (NSString *) string;
-@end
-
-@implementation Foo
-+(int) doSomethingWithString: (NSString *) string
-{
- NSLog (@"String is: %@.", string);
- return [string length];
-}
-
--(int) doSomethingInstance: (NSString *)string
-{
- return [Foo doSomethingWithString:string];
-}
-@end
-
-int main()
-{
- return 0; // Set breakpoint here.
-}
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-dyn-sbtype/.categories b/packages/Python/lldbsuite/test/lang/objc/objc-dyn-sbtype/.categories
deleted file mode 100644
index 9526bab96fbb..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/objc-dyn-sbtype/.categories
+++ /dev/null
@@ -1 +0,0 @@
-dyntype
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-dyn-sbtype/Makefile b/packages/Python/lldbsuite/test/lang/objc/objc-dyn-sbtype/Makefile
deleted file mode 100644
index dd909afba21b..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/objc-dyn-sbtype/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-LEVEL = ../../../make
-
-OBJC_SOURCES := main.m
-
-include $(LEVEL)/Makefile.rules
-
-LD_EXTRAS = -framework Foundation
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-dyn-sbtype/TestObjCDynamicSBType.py b/packages/Python/lldbsuite/test/lang/objc/objc-dyn-sbtype/TestObjCDynamicSBType.py
deleted file mode 100644
index 6e95b4fa4b96..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/objc-dyn-sbtype/TestObjCDynamicSBType.py
+++ /dev/null
@@ -1,93 +0,0 @@
-"""
-Test that we are able to properly report a usable dynamic type
-"""
-
-from __future__ import print_function
-
-
-import os
-import time
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-@skipUnlessDarwin
-class ObjCDynamicSBTypeTestCase(TestBase):
-
- mydir = TestBase.compute_mydir(__file__)
-
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
- # We'll use the test method name as the exe_name.
- self.exe_name = self.testMethodName
- # Find the line number to break inside main().
- self.main_source = "main.m"
- self.line = line_number(self.main_source, '// Set breakpoint here.')
-
- @skipIf(archs="i[3-6]86")
- def test_dyn(self):
- """Test that we are able to properly report a usable dynamic type."""
- d = {'EXE': self.exe_name}
- self.build(dictionary=d)
- self.setTearDownCleanup(dictionary=d)
-
- exe = self.getBuildArtifact(self.exe_name)
- self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
- lldbutil.run_break_set_by_file_and_line(
- self,
- self.main_source,
- self.line,
- num_expected_locations=1,
- loc_exact=True)
-
- self.runCmd("run", RUN_SUCCEEDED)
-
- v_object = self.frame().FindVariable(
- "object").GetDynamicValue(lldb.eDynamicCanRunTarget)
- v_base = self.frame().FindVariable(
- "base").GetDynamicValue(lldb.eDynamicCanRunTarget)
- self.assertTrue(
- v_object.GetTypeName() == "MyDerivedClass *",
- "The NSObject is properly type-named")
- self.assertTrue(
- v_base.GetTypeName() == "MyDerivedClass *",
- "The Base is properly type-named")
- object_type = v_object.GetType()
- base_type = v_base.GetType()
- self.assertTrue(
- object_type.GetName() == "MyDerivedClass *",
- "The dynamic SBType for NSObject is for the correct type")
- self.assertTrue(
- base_type.GetName() == "MyDerivedClass *",
- "The dynamic SBType for Base is for the correct type")
- object_pointee_type = object_type.GetPointeeType()
- base_pointee_type = base_type.GetPointeeType()
- self.assertTrue(
- object_pointee_type.GetName() == "MyDerivedClass",
- "The dynamic type for NSObject figures out its pointee type just fine")
- self.assertTrue(
- base_pointee_type.GetName() == "MyDerivedClass",
- "The dynamic type for Base figures out its pointee type just fine")
-
- self.assertTrue(
- object_pointee_type.GetDirectBaseClassAtIndex(0).GetName() == "MyBaseClass",
- "The dynamic type for NSObject can go back to its base class")
- self.assertTrue(
- base_pointee_type.GetDirectBaseClassAtIndex(0).GetName() == "MyBaseClass",
- "The dynamic type for Base can go back to its base class")
-
- self.assertTrue(object_pointee_type.GetDirectBaseClassAtIndex(0).GetType().GetDirectBaseClassAtIndex(
- 0).GetName() == "NSObject", "The dynamic type for NSObject can go up the hierarchy")
- self.assertTrue(base_pointee_type.GetDirectBaseClassAtIndex(0).GetType().GetDirectBaseClassAtIndex(
- 0).GetName() == "NSObject", "The dynamic type for Base can go up the hierarchy")
-
- self.assertTrue(
- object_pointee_type.GetNumberOfFields() == 2,
- "The dynamic type for NSObject has 2 fields")
- self.assertTrue(
- base_pointee_type.GetNumberOfFields() == 2,
- "The dynamic type for Base has 2 fields")
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-dyn-sbtype/main.m b/packages/Python/lldbsuite/test/lang/objc/objc-dyn-sbtype/main.m
deleted file mode 100644
index f3587b52cd5f..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/objc-dyn-sbtype/main.m
+++ /dev/null
@@ -1,53 +0,0 @@
-#import <Foundation/Foundation.h>
-
-@interface MyBaseClass : NSObject
-{}
--(id) init;
--(int) getInt;
-@end
-
-@implementation MyBaseClass
-- (id) init {
- return (self = [super init]);
-}
-
-- (int) getInt {
- return 1;
-}
-@end
-
-@interface MyDerivedClass : MyBaseClass
-{
- int x;
- int y;
-}
--(id) init;
--(int) getInt;
-@end
-
-@implementation MyDerivedClass
-- (id) init {
- self = [super init];
- if (self) {
- self-> x = 0;
- self->y = 1;
- }
- return self;
-}
-
-- (int) getInt {
- y = x++;
- return x;
-}
-@end
-
-
-int main (int argc, char const *argv[])
-{
- NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
- NSObject* object = [[MyDerivedClass alloc] init];
- MyBaseClass* base = [[MyDerivedClass alloc] init];
- [pool release]; // Set breakpoint here.
- return 0;
-}
-
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-dynamic-value/Makefile b/packages/Python/lldbsuite/test/lang/objc/objc-dynamic-value/Makefile
deleted file mode 100644
index a981f4b9035e..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/objc-dynamic-value/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-LEVEL = ../../../make
-
-OBJC_SOURCES := dynamic-value.m
-LDFLAGS = $(CFLAGS) -lobjc -framework Foundation
-
-include $(LEVEL)/Makefile.rules
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-dynamic-value/TestObjCDynamicValue.py b/packages/Python/lldbsuite/test/lang/objc/objc-dynamic-value/TestObjCDynamicValue.py
deleted file mode 100644
index e9df6be81cdb..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/objc-dynamic-value/TestObjCDynamicValue.py
+++ /dev/null
@@ -1,211 +0,0 @@
-"""
-Use lldb Python API to test dynamic values in ObjC
-"""
-
-from __future__ import print_function
-
-
-import os
-import time
-import re
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ObjCDynamicValueTestCase(TestBase):
-
- mydir = TestBase.compute_mydir(__file__)
-
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
-
- # Find the line number to break for main.c.
-
- self.source_name = 'dynamic-value.m'
- self.set_property_line = line_number(
- self.source_name,
- '// This is the line in setProperty, make sure we step to here.')
- self.handle_SourceBase = line_number(
- self.source_name, '// Break here to check dynamic values.')
- self.main_before_setProperty_line = line_number(
- self.source_name, '// Break here to see if we can step into real method.')
-
- @skipUnlessDarwin
- @add_test_categories(['pyapi'])
- @expectedFailureDarwin("llvm.org/pr20271 rdar://18684107")
- def test_get_objc_dynamic_vals(self):
- """Test fetching ObjC dynamic values."""
- if self.getArchitecture() == 'i386':
- # rdar://problem/9946499
- self.skipTest("Dynamic types for ObjC V1 runtime not implemented")
-
- self.build()
- exe = self.getBuildArtifact("a.out")
-
- # Create a target from the debugger.
-
- target = self.dbg.CreateTarget(exe)
- self.assertTrue(target, VALID_TARGET)
-
- # Set up our breakpoints:
-
- handle_SourceBase_bkpt = target.BreakpointCreateByLocation(
- self.source_name, self.handle_SourceBase)
- self.assertTrue(handle_SourceBase_bkpt and
- handle_SourceBase_bkpt.GetNumLocations() == 1,
- VALID_BREAKPOINT)
-
- main_before_setProperty_bkpt = target.BreakpointCreateByLocation(
- self.source_name, self.main_before_setProperty_line)
- self.assertTrue(main_before_setProperty_bkpt and
- main_before_setProperty_bkpt.GetNumLocations() == 1,
- VALID_BREAKPOINT)
-
- # Now launch the process, and do not stop at the entry point.
- process = target.LaunchSimple(
- None, None, self.get_process_working_directory())
-
- self.assertTrue(process.GetState() == lldb.eStateStopped,
- PROCESS_STOPPED)
-
- threads = lldbutil.get_threads_stopped_at_breakpoint(
- process, main_before_setProperty_bkpt)
- self.assertTrue(len(threads) == 1)
- thread = threads[0]
-
- #
- # At this point, myObserver has a Source pointer that is actually a KVO swizzled SourceDerived
- # make sure we can get that properly:
-
- frame = thread.GetFrameAtIndex(0)
- myObserver = frame.FindVariable(
- 'myObserver', lldb.eDynamicCanRunTarget)
- self.assertTrue(myObserver)
- myObserver_source = myObserver.GetChildMemberWithName(
- '_source', lldb.eDynamicCanRunTarget)
- self.examine_SourceDerived_ptr(myObserver_source)
-
- #
- # Make sure a static value can be correctly turned into a dynamic
- # value.
-
- frame = thread.GetFrameAtIndex(0)
- myObserver_static = frame.FindVariable(
- 'myObserver', lldb.eNoDynamicValues)
- self.assertTrue(myObserver_static)
- myObserver = myObserver_static.GetDynamicValue(
- lldb.eDynamicCanRunTarget)
- myObserver_source = myObserver.GetChildMemberWithName(
- '_source', lldb.eDynamicCanRunTarget)
- self.examine_SourceDerived_ptr(myObserver_source)
-
- # The "frame var" code uses another path to get into children, so let's
- # make sure that works as well:
-
- result = lldb.SBCommandReturnObject()
-
- self.expect(
- 'frame var -d run-target myObserver->_source',
- 'frame var finds its way into a child member',
- patterns=['\(SourceDerived \*\)'])
-
- # check that our ObjC GetISA() does a good job at hiding KVO swizzled
- # classes
-
- self.expect(
- 'frame var -d run-target myObserver->_source -T',
- 'the KVO-ed class is hidden',
- substrs=['SourceDerived'])
-
- self.expect(
- 'frame var -d run-target myObserver->_source -T',
- 'the KVO-ed class is hidden',
- matching=False,
- substrs=['NSKVONotify'])
-
- # This test is not entirely related to the main thrust of this test case, but since we're here,
- # try stepping into setProperty, and make sure we get into the version
- # in Source:
-
- thread.StepInto()
-
- threads = lldbutil.get_stopped_threads(
- process, lldb.eStopReasonPlanComplete)
- self.assertTrue(len(threads) == 1)
- line_entry = threads[0].GetFrameAtIndex(0).GetLineEntry()
-
- self.assertEqual(line_entry.GetLine(), self.set_property_line)
- self.assertEqual(
- line_entry.GetFileSpec().GetFilename(),
- self.source_name)
-
- # Okay, back to the main business. Continue to the handle_SourceBase
- # and make sure we get the correct dynamic value.
-
- threads = lldbutil.continue_to_breakpoint(
- process, handle_SourceBase_bkpt)
- self.assertTrue(len(threads) == 1)
- thread = threads[0]
-
- frame = thread.GetFrameAtIndex(0)
-
- # Get "object" using FindVariable:
-
- noDynamic = lldb.eNoDynamicValues
- useDynamic = lldb.eDynamicCanRunTarget
-
- object_static = frame.FindVariable('object', noDynamic)
- object_dynamic = frame.FindVariable('object', useDynamic)
-
- # Delete this object to make sure that this doesn't cause havoc with
- # the dynamic object that depends on it.
- del (object_static)
-
- self.examine_SourceDerived_ptr(object_dynamic)
-
- # Get "this" using FindValue, make sure that works too:
- object_static = frame.FindValue(
- 'object', lldb.eValueTypeVariableArgument, noDynamic)
- object_dynamic = frame.FindValue(
- 'object', lldb.eValueTypeVariableArgument, useDynamic)
- del (object_static)
- self.examine_SourceDerived_ptr(object_dynamic)
-
- # Get "this" using the EvaluateExpression:
- object_static = frame.EvaluateExpression('object', noDynamic)
- object_dynamic = frame.EvaluateExpression('object', useDynamic)
- del (object_static)
- self.examine_SourceDerived_ptr(object_dynamic)
-
- # Continue again to the handle_SourceBase and make sure we get the correct dynamic value.
- # This one looks exactly the same, but in fact this is an "un-KVO'ed" version of SourceBase, so
- # its isa pointer points to SourceBase not NSKVOSourceBase or
- # whatever...
-
- threads = lldbutil.continue_to_breakpoint(
- process, handle_SourceBase_bkpt)
- self.assertTrue(len(threads) == 1)
- thread = threads[0]
-
- frame = thread.GetFrameAtIndex(0)
-
- # Get "object" using FindVariable:
-
- object_static = frame.FindVariable('object', noDynamic)
- object_dynamic = frame.FindVariable('object', useDynamic)
-
- # Delete this object to make sure that this doesn't cause havoc with
- # the dynamic object that depends on it.
- del (object_static)
-
- self.examine_SourceDerived_ptr(object_dynamic)
-
- def examine_SourceDerived_ptr(self, object):
- self.assertTrue(object)
- self.assertTrue(object.GetTypeName().find('SourceDerived') != -1)
- derivedValue = object.GetChildMemberWithName('_derivedValue')
- self.assertTrue(derivedValue)
- self.assertTrue(int(derivedValue.GetValue(), 0) == 30)
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-dynamic-value/dynamic-value.m b/packages/Python/lldbsuite/test/lang/objc/objc-dynamic-value/dynamic-value.m
deleted file mode 100644
index 2bcb76b1d9dc..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/objc-dynamic-value/dynamic-value.m
+++ /dev/null
@@ -1,147 +0,0 @@
-#import <Foundation/Foundation.h>
-
-// SourceBase will be the base class of Source. We'll pass a Source object into a
-// function as a SourceBase, and then see if the dynamic typing can get us through the KVO
-// goo and all the way back to Source.
-
-@interface SourceBase: NSObject
-{
- uint32_t _value;
-}
-- (SourceBase *) init;
-- (uint32_t) getValue;
-@end
-
-@implementation SourceBase
-- (SourceBase *) init
-{
- [super init];
- _value = 10;
- return self;
-}
-- (uint32_t) getValue
-{
- return _value;
-}
-@end
-
-// Source is a class that will be observed by the Observer class below.
-// When Observer sets itself up to observe this property (in initWithASource)
-// the KVO system will overwrite the "isa" pointer of the object with the "kvo'ed"
-// one.
-
-@interface Source : SourceBase
-{
- int _property;
-}
-- (Source *) init;
-- (void) setProperty: (int) newValue;
-@end
-
-@implementation Source
-- (Source *) init
-{
- [super init];
- _property = 20;
- return self;
-}
-- (void) setProperty: (int) newValue
-{
- _property = newValue; // This is the line in setProperty, make sure we step to here.
-}
-@end
-
-@interface SourceDerived : Source
-{
- int _derivedValue;
-}
-- (SourceDerived *) init;
-- (uint32_t) getValue;
-@end
-
-@implementation SourceDerived
-- (SourceDerived *) init
-{
- [super init];
- _derivedValue = 30;
- return self;
-}
-- (uint32_t) getValue
-{
- return _derivedValue;
-}
-@end
-
-// Observer is the object that will watch Source and cause KVO to swizzle it...
-
-@interface Observer : NSObject
-{
- Source *_source;
-}
-+ (Observer *) observerWithSource: (Source *) source;
-- (Observer *) initWithASource: (Source *) source;
-- (void) observeValueForKeyPath: (NSString *) path
- ofObject: (id) object
- change: (NSDictionary *) change
- context: (void *) context;
-@end
-
-@implementation Observer
-
-+ (Observer *) observerWithSource: (Source *) inSource;
-{
- Observer *retval;
-
- retval = [[Observer alloc] initWithASource: inSource];
- return retval;
-}
-
-- (Observer *) initWithASource: (Source *) source
-{
- [super init];
- _source = source;
- [_source addObserver: self
- forKeyPath: @"property"
- options: (NSKeyValueObservingOptionNew | NSKeyValueObservingOptionOld)
- context: NULL];
- return self;
-}
-
-- (void) observeValueForKeyPath: (NSString *) path
- ofObject: (id) object
- change: (NSDictionary *) change
- context: (void *) context
-{
- printf ("Observer function called.\n");
- return;
-}
-@end
-
-uint32_t
-handle_SourceBase (SourceBase *object)
-{
- return [object getValue]; // Break here to check dynamic values.
-}
-
-int main ()
-{
- Source *mySource;
- Observer *myObserver;
-
- NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
-
- mySource = [[SourceDerived alloc] init];
- myObserver = [Observer observerWithSource: mySource];
-
- [mySource setProperty: 5]; // Break here to see if we can step into real method.
-
- uint32_t return_value = handle_SourceBase (mySource);
-
- SourceDerived *unwatchedSource = [[SourceDerived alloc] init];
-
- return_value = handle_SourceBase (unwatchedSource);
-
- [pool release];
- return 0;
-
-}
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-foundation-dictionary-empty/TestNSDictionary0.py b/packages/Python/lldbsuite/test/lang/objc/objc-foundation-dictionary-empty/TestNSDictionary0.py
deleted file mode 100644
index 804905106dfc..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/objc-foundation-dictionary-empty/TestNSDictionary0.py
+++ /dev/null
@@ -1,6 +0,0 @@
-from lldbsuite.test import lldbinline
-from lldbsuite.test import decorators
-
-lldbinline.MakeInlineTest(
- __file__, globals(), [
- decorators.skipIfFreeBSD, decorators.skipIfLinux, decorators.skipIfWindows])
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-foundation-dictionary-empty/main.m b/packages/Python/lldbsuite/test/lang/objc/objc-foundation-dictionary-empty/main.m
deleted file mode 100644
index 14a792b3776d..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/objc-foundation-dictionary-empty/main.m
+++ /dev/null
@@ -1,7 +0,0 @@
-#import <Foundation/Foundation.h>
-
-int main(void)
-{
- NSDictionary *emptyDictionary = [[NSDictionary alloc] init];
- return 0; //% self.expect("frame var emptyDictionary", substrs = ["0 key/value pairs"]);
-}
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-ivar-offsets/Makefile b/packages/Python/lldbsuite/test/lang/objc/objc-ivar-offsets/Makefile
deleted file mode 100644
index fdd3b5ebfa9e..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/objc-ivar-offsets/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-LEVEL = ../../../make
-
-OBJC_SOURCES := objc-ivar-offsets.m main.m
-LDFLAGS = $(CFLAGS) -lobjc -framework Foundation
-
-include $(LEVEL)/Makefile.rules
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-ivar-offsets/TestObjCIvarOffsets.py b/packages/Python/lldbsuite/test/lang/objc/objc-ivar-offsets/TestObjCIvarOffsets.py
deleted file mode 100644
index 6b928450ceae..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/objc-ivar-offsets/TestObjCIvarOffsets.py
+++ /dev/null
@@ -1,86 +0,0 @@
-"""Test printing ObjC objects that use unbacked properties - so that the static ivar offsets are incorrect."""
-
-from __future__ import print_function
-
-
-import os
-import time
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestObjCIvarOffsets(TestBase):
-
- mydir = TestBase.compute_mydir(__file__)
-
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
- # Find the line numbers to break inside main().
- self.main_source = "main.m"
- self.stop_line = line_number(
- self.main_source, '// Set breakpoint here.')
-
- @skipUnlessDarwin
- @add_test_categories(['pyapi'])
- def test_with_python_api(self):
- """Test printing ObjC objects that use unbacked properties"""
- self.build()
- exe = self.getBuildArtifact("a.out")
-
- target = self.dbg.CreateTarget(exe)
- self.assertTrue(target, VALID_TARGET)
-
- breakpoint = target.BreakpointCreateByLocation(
- self.main_source, self.stop_line)
- self.assertTrue(breakpoint, VALID_BREAKPOINT)
-
- process = target.LaunchSimple(
- None, None, self.get_process_working_directory())
- self.assertTrue(process, "Created a process.")
- self.assertTrue(
- process.GetState() == lldb.eStateStopped,
- "Stopped it too.")
-
- thread_list = lldbutil.get_threads_stopped_at_breakpoint(
- process, breakpoint)
- self.assertTrue(len(thread_list) == 1)
- thread = thread_list[0]
-
- frame = thread.GetFrameAtIndex(0)
- self.assertTrue(frame, "frame 0 is valid")
-
- mine = thread.GetFrameAtIndex(0).FindVariable("mine")
- self.assertTrue(mine, "Found local variable mine.")
-
- # Test the value object value for BaseClass->_backed_int
-
- error = lldb.SBError()
-
- mine_backed_int = mine.GetChildMemberWithName("_backed_int")
- self.assertTrue(
- mine_backed_int,
- "Found mine->backed_int local variable.")
- backed_value = mine_backed_int.GetValueAsSigned(error)
- self.assertTrue(error.Success())
- self.assertTrue(backed_value == 1111)
-
- # Test the value object value for DerivedClass->_derived_backed_int
-
- mine_derived_backed_int = mine.GetChildMemberWithName(
- "_derived_backed_int")
- self.assertTrue(mine_derived_backed_int,
- "Found mine->derived_backed_int local variable.")
- derived_backed_value = mine_derived_backed_int.GetValueAsSigned(error)
- self.assertTrue(error.Success())
- self.assertTrue(derived_backed_value == 3333)
-
- # Make sure we also get bit-field offsets correct:
-
- mine_flag2 = mine.GetChildMemberWithName("flag2")
- self.assertTrue(mine_flag2, "Found mine->flag2 local variable.")
- flag2_value = mine_flag2.GetValueAsUnsigned(error)
- self.assertTrue(error.Success())
- self.assertTrue(flag2_value == 7)
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-ivar-offsets/main.m b/packages/Python/lldbsuite/test/lang/objc/objc-ivar-offsets/main.m
deleted file mode 100644
index 41943f48aef5..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/objc-ivar-offsets/main.m
+++ /dev/null
@@ -1,15 +0,0 @@
-#include "objc-ivar-offsets.h"
-
-int
-main ()
-{
- DerivedClass *mine = [[DerivedClass alloc] init];
- mine.backed_int = 1111;
- mine.unbacked_int = 2222;
- mine.derived_backed_int = 3333;
- mine.derived_unbacked_int = 4444;
- mine->flag1 = 1;
- mine->flag2 = 7;
-
- return 0; // Set breakpoint here.
-}
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-ivar-offsets/objc-ivar-offsets.h b/packages/Python/lldbsuite/test/lang/objc/objc-ivar-offsets/objc-ivar-offsets.h
deleted file mode 100644
index 99bbd427b064..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/objc-ivar-offsets/objc-ivar-offsets.h
+++ /dev/null
@@ -1,27 +0,0 @@
-#import <Foundation/Foundation.h>
-
-@interface BaseClass : NSObject
-{
- int _backed_int;
-#if !__OBJC2__
- int _unbacked_int;
-#endif
-}
-@property int backed_int;
-@property int unbacked_int;
-@end
-
-@interface DerivedClass : BaseClass
-{
- int _derived_backed_int;
-#if !__OBJC2__
- int _derived_unbacked_int;
-#endif
- @public
- uint32_t flag1 : 1;
- uint32_t flag2 : 3;
-}
-
-@property int derived_backed_int;
-@property int derived_unbacked_int;
-@end
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-ivar-offsets/objc-ivar-offsets.m b/packages/Python/lldbsuite/test/lang/objc/objc-ivar-offsets/objc-ivar-offsets.m
deleted file mode 100644
index db87adea3d13..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/objc-ivar-offsets/objc-ivar-offsets.m
+++ /dev/null
@@ -1,19 +0,0 @@
-#import "objc-ivar-offsets.h"
-
-@implementation BaseClass
-@synthesize backed_int = _backed_int;
-#if __OBJC2__
-@synthesize unbacked_int;
-#else
-@synthesize unbacked_int = _unbacked_int;
-#endif
-@end
-
-@implementation DerivedClass
-@synthesize derived_backed_int = _derived_backed_int;
-#if __OBJC2__
-@synthesize derived_unbacked_int;
-#else
-@synthesize derived_unbacked_int = _derived_unbacked_int;
-#endif
-@end
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-ivar-protocols/TestIvarProtocols.py b/packages/Python/lldbsuite/test/lang/objc/objc-ivar-protocols/TestIvarProtocols.py
deleted file mode 100644
index 804905106dfc..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/objc-ivar-protocols/TestIvarProtocols.py
+++ /dev/null
@@ -1,6 +0,0 @@
-from lldbsuite.test import lldbinline
-from lldbsuite.test import decorators
-
-lldbinline.MakeInlineTest(
- __file__, globals(), [
- decorators.skipIfFreeBSD, decorators.skipIfLinux, decorators.skipIfWindows])
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-ivar-protocols/main.m b/packages/Python/lldbsuite/test/lang/objc/objc-ivar-protocols/main.m
deleted file mode 100644
index aa6c4715c33b..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/objc-ivar-protocols/main.m
+++ /dev/null
@@ -1,33 +0,0 @@
-#import <Foundation/Foundation.h>
-
-@protocol MyProtocol
--(void)aMethod;
-@end
-
-@interface MyClass : NSObject {
- id <MyProtocol> myId;
- NSObject <MyProtocol> *myObject;
-};
-
--(void)doSomething;
-
-@end
-
-@implementation MyClass
-
--(void)doSomething
-{
- NSLog(@"Hello"); //% self.expect("expression -- myId", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["id"]);
- //% self.expect("expression -- myObject", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["NSObject"]);
-}
-
-@end
-
-int main ()
-{
- @autoreleasepool
- {
- MyClass *c = [MyClass alloc];
- [c doSomething];
- }
-}
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-ivar-stripped/Makefile b/packages/Python/lldbsuite/test/lang/objc/objc-ivar-stripped/Makefile
deleted file mode 100644
index b93a8a13379d..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/objc-ivar-stripped/Makefile
+++ /dev/null
@@ -1,15 +0,0 @@
-LEVEL = ../../../make
-
-OBJC_SOURCES := main.m
-LDFLAGS = $(CFLAGS) -lobjc -framework Foundation
-
-all: a.out.stripped
-
-a.out.stripped: a.out.dSYM
- strip -o a.out.stripped a.out
-
-clean::
- rm -f a.out.stripped
- rm -rf a.out.stripped.dSYM
-
-include $(LEVEL)/Makefile.rules
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-ivar-stripped/TestObjCIvarStripped.py b/packages/Python/lldbsuite/test/lang/objc/objc-ivar-stripped/TestObjCIvarStripped.py
deleted file mode 100644
index f5997eb389fd..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/objc-ivar-stripped/TestObjCIvarStripped.py
+++ /dev/null
@@ -1,70 +0,0 @@
-"""Test printing ObjC objects that use unbacked properties - so that the static ivar offsets are incorrect."""
-
-from __future__ import print_function
-
-
-import os
-import time
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestObjCIvarStripped(TestBase):
-
- mydir = TestBase.compute_mydir(__file__)
-
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
- # Find the line numbers to break inside main().
- self.main_source = "main.m"
- self.stop_line = line_number(
- self.main_source, '// Set breakpoint here.')
-
- @skipUnlessDarwin
- @skipIf(
- debug_info=no_match("dsym"),
- bugnumber="This test requires a stripped binary and a dSYM")
- @add_test_categories(['pyapi'])
- def test_with_python_api(self):
- """Test that we can find stripped Objective-C ivars in the runtime"""
- self.build()
- exe = self.getBuildArtifact("a.out.stripped")
-
- target = self.dbg.CreateTarget(exe)
- self.assertTrue(target, VALID_TARGET)
-
- self.dbg.HandleCommand("add-dsym "+self.getBuildArtifact("a.out.dSYM"))
-
- breakpoint = target.BreakpointCreateByLocation(
- self.main_source, self.stop_line)
- self.assertTrue(
- breakpoint.IsValid() and breakpoint.GetNumLocations() > 0,
- VALID_BREAKPOINT)
-
- process = target.LaunchSimple(
- None, None, self.get_process_working_directory())
- self.assertTrue(process, "Created a process.")
- self.assertTrue(
- process.GetState() == lldb.eStateStopped,
- "Stopped it too.")
-
- thread_list = lldbutil.get_threads_stopped_at_breakpoint(
- process, breakpoint)
- self.assertTrue(len(thread_list) == 1)
- thread = thread_list[0]
-
- frame = thread.GetFrameAtIndex(0)
- self.assertTrue(frame, "frame 0 is valid")
-
- # Test the expression for mc->_foo
-
- error = lldb.SBError()
-
- ivar = frame.EvaluateExpression("(mc->_foo)")
- self.assertTrue(ivar, "Got result for mc->_foo")
- ivar_value = ivar.GetValueAsSigned(error)
- self.assertTrue(error.Success())
- self.assertTrue(ivar_value == 3)
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-ivar-stripped/main.m b/packages/Python/lldbsuite/test/lang/objc/objc-ivar-stripped/main.m
deleted file mode 100644
index ed9c1d9ec426..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/objc-ivar-stripped/main.m
+++ /dev/null
@@ -1,33 +0,0 @@
-#import <Foundation/Foundation.h>
-
-@interface MyClass : NSObject {
-@public
- int _foo;
-};
-
--(id)init;
-@end
-
-@implementation MyClass
-
--(id)init
-{
- if ([super init])
- {
- _foo = 3;
- }
-
- return self;
-}
-
-@end
-
-int main ()
-{
- @autoreleasepool
- {
- MyClass *mc = [[MyClass alloc] init];
-
- NSLog(@"%d", mc->_foo); // Set breakpoint here.
- }
-}
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/Makefile b/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/Makefile
deleted file mode 100644
index ad3cb3fadcde..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-LEVEL = ../../../make
-
-OBJC_SOURCES := main.m
-
-include $(LEVEL)/Makefile.rules
-
-LDFLAGS += -framework Foundation
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/TestObjCNewSyntax.py b/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/TestObjCNewSyntax.py
deleted file mode 100644
index 74256345a0d5..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/TestObjCNewSyntax.py
+++ /dev/null
@@ -1,204 +0,0 @@
-"""Test that the Objective-C syntax for dictionary/array literals and indexing works"""
-
-from __future__ import print_function
-
-
-import unittest2
-import os
-import time
-import platform
-
-from distutils.version import StrictVersion
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ObjCNewSyntaxTestCase(TestBase):
-
- mydir = TestBase.compute_mydir(__file__)
-
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
- # Find the line number to break inside main().
- self.line = line_number('main.m', '// Set breakpoint 0 here.')
-
- def runToBreakpoint(self):
- self.build()
- exe = self.getBuildArtifact("a.out")
- self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
- # Break inside the foo function which takes a bar_ptr argument.
- lldbutil.run_break_set_by_file_and_line(
- self, "main.m", self.line, num_expected_locations=1, loc_exact=True)
-
- self.runCmd("run", RUN_SUCCEEDED)
-
- # The stop reason of the thread should be breakpoint.
- self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
- substrs=['stopped',
- 'stop reason = breakpoint'])
-
- # The breakpoint should have a hit count of 1.
- self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
- substrs=[' resolved, hit count = 1'])
-
- @skipUnlessDarwin
- @skipIf(macos_version=["<", "10.12"])
- @expectedFailureAll(archs=["i[3-6]86"])
- def test_read_array(self):
- self.runToBreakpoint()
-
- self.expect(
- "expr --object-description -- immutable_array[0]",
- VARIABLES_DISPLAYED_CORRECTLY,
- substrs=["foo"])
-
- self.expect(
- "expr --object-description -- mutable_array[0]",
- VARIABLES_DISPLAYED_CORRECTLY,
- substrs=["foo"])
-
- @skipUnlessDarwin
- @skipIf(macos_version=["<", "10.12"])
- @expectedFailureAll(archs=["i[3-6]86"])
- def test_update_array(self):
- self.runToBreakpoint()
-
- self.expect(
- "expr --object-description -- mutable_array[0] = @\"bar\"",
- VARIABLES_DISPLAYED_CORRECTLY,
- substrs=["bar"])
-
- self.expect(
- "expr --object-description -- mutable_array[0]",
- VARIABLES_DISPLAYED_CORRECTLY,
- substrs=["bar"])
-
- @skipUnlessDarwin
- @skipIf(macos_version=["<", "10.12"])
- @expectedFailureAll(archs=["i[3-6]86"])
- def test_read_dictionary(self):
- self.runToBreakpoint()
-
- self.expect(
- "expr --object-description -- immutable_dictionary[@\"key\"]",
- VARIABLES_DISPLAYED_CORRECTLY,
- substrs=["value"])
-
- self.expect(
- "expr --object-description -- mutable_dictionary[@\"key\"]",
- VARIABLES_DISPLAYED_CORRECTLY,
- substrs=["value"])
-
- @skipUnlessDarwin
- @skipIf(macos_version=["<", "10.12"])
- @expectedFailureAll(archs=["i[3-6]86"])
- def test_update_dictionary(self):
- self.runToBreakpoint()
-
- self.expect(
- "expr --object-description -- mutable_dictionary[@\"key\"] = @\"object\"",
- VARIABLES_DISPLAYED_CORRECTLY,
- substrs=["object"])
-
- self.expect(
- "expr --object-description -- mutable_dictionary[@\"key\"]",
- VARIABLES_DISPLAYED_CORRECTLY,
- substrs=["object"])
-
- @skipUnlessDarwin
- @skipIf(macos_version=["<", "10.12"])
- @expectedFailureAll(archs=["i[3-6]86"])
- def test_array_literal(self):
- self.runToBreakpoint()
-
- self.expect(
- "expr --object-description -- @[ @\"foo\", @\"bar\" ]",
- VARIABLES_DISPLAYED_CORRECTLY,
- substrs=[
- "NSArray",
- "foo",
- "bar"])
-
- @skipUnlessDarwin
- @skipIf(macos_version=["<", "10.12"])
- @expectedFailureAll(archs=["i[3-6]86"])
- def test_dictionary_literal(self):
- self.runToBreakpoint()
-
- self.expect(
- "expr --object-description -- @{ @\"key\" : @\"object\" }",
- VARIABLES_DISPLAYED_CORRECTLY,
- substrs=[
- "key",
- "object"])
-
- @skipUnlessDarwin
- @skipIf(macos_version=["<", "10.12"])
- @expectedFailureAll(archs=["i[3-6]86"])
- def test_char_literal(self):
- self.runToBreakpoint()
-
- self.expect("expr --object-description -- @'a'",
- VARIABLES_DISPLAYED_CORRECTLY, substrs=[str(ord('a'))])
-
- @skipUnlessDarwin
- @skipIf(macos_version=["<", "10.12"])
- @expectedFailureAll(archs=["i[3-6]86"])
- def test_integer_literals(self):
- self.runToBreakpoint()
-
- self.expect(
- "expr --object-description -- @1",
- VARIABLES_DISPLAYED_CORRECTLY,
- substrs=["1"])
-
- self.expect(
- "expr --object-description -- @1l",
- VARIABLES_DISPLAYED_CORRECTLY,
- substrs=["1"])
-
- self.expect(
- "expr --object-description -- @1ul",
- VARIABLES_DISPLAYED_CORRECTLY,
- substrs=["1"])
-
- self.expect(
- "expr --object-description -- @1ll",
- VARIABLES_DISPLAYED_CORRECTLY,
- substrs=["1"])
-
- self.expect(
- "expr --object-description -- @1ull",
- VARIABLES_DISPLAYED_CORRECTLY,
- substrs=["1"])
-
- @skipUnlessDarwin
- @skipIf(macos_version=["<", "10.12"])
- @expectedFailureAll(archs=["i[3-6]86"])
- def test_float_literal(self):
- self.runToBreakpoint()
-
- self.expect("expr -- @123.45", VARIABLES_DISPLAYED_CORRECTLY,
- substrs=["NSNumber", "123.45"])
-
- @skipUnlessDarwin
- @skipIf(macos_version=["<", "10.12"])
- @expectedFailureAll(archs=["i[3-6]86"])
- def test_expressions_in_literals(self):
- self.runToBreakpoint()
-
- self.expect(
- "expr --object-description -- @( 1 + 3 )",
- VARIABLES_DISPLAYED_CORRECTLY,
- substrs=["4"])
- self.expect(
- "expr -- @((char*)\"Hello world\" + 6)",
- VARIABLES_DISPLAYED_CORRECTLY,
- substrs=[
- "NSString",
- "world"])
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/main.m b/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/main.m
deleted file mode 100644
index d77ba5b10de9..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/main.m
+++ /dev/null
@@ -1,21 +0,0 @@
-#import <Foundation/Foundation.h>
-
-int main()
-{
- @autoreleasepool
- {
- // NSArrays
- NSArray *immutable_array = @[ @"foo", @"bar" ];
- NSMutableArray *mutable_array = [NSMutableArray arrayWithCapacity:2];
- [mutable_array addObjectsFromArray:immutable_array];
-
- // NSDictionaries
- NSDictionary *immutable_dictionary = @{ @"key" : @"value" };
- NSMutableDictionary *mutable_dictionary = [NSMutableDictionary dictionaryWithCapacity:1];
- [mutable_dictionary addEntriesFromDictionary:immutable_dictionary];
-
- NSNumber *one = @1;
-
- NSLog(@"Stop here"); // Set breakpoint 0 here.
- }
-}
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-optimized/Makefile b/packages/Python/lldbsuite/test/lang/objc/objc-optimized/Makefile
deleted file mode 100644
index aa6a7520525e..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/objc-optimized/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-LEVEL = ../../../make
-
-OBJC_SOURCES := main.m
-
-CFLAGS ?= -arch $(ARCH) -g -O2
-LDFLAGS = $(CFLAGS) -lobjc -framework Foundation
-
-include $(LEVEL)/Makefile.rules
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-optimized/TestObjcOptimized.py b/packages/Python/lldbsuite/test/lang/objc/objc-optimized/TestObjcOptimized.py
deleted file mode 100644
index 340d8849efa9..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/objc-optimized/TestObjcOptimized.py
+++ /dev/null
@@ -1,76 +0,0 @@
-"""
-Test that objective-c expression parser continues to work for optimized build.
-
-http://llvm.org/viewvc/llvm-project?rev=126973&view=rev
-Fixed a bug in the expression parser where the 'this'
-or 'self' variable was not properly read if the compiler
-optimized it into a register.
-"""
-
-from __future__ import print_function
-
-
-import os
-import time
-import lldb
-import re
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-# rdar://problem/9087739
-# test failure: objc_optimized does not work for "-C clang -A i386"
-
-
-@skipUnlessDarwin
-class ObjcOptimizedTestCase(TestBase):
-
- mydir = TestBase.compute_mydir(__file__)
- myclass = "MyClass"
- mymethod = "description"
- method_spec = "-[%s %s]" % (myclass, mymethod)
-
- def test_break(self):
- """Test 'expr member' continues to work for optimized build."""
- self.build()
- exe = self.getBuildArtifact("a.out")
- self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
- lldbutil.run_break_set_by_symbol(
- self,
- self.method_spec,
- num_expected_locations=1,
- sym_exact=True)
-
- self.runCmd("run", RUN_SUCCEEDED)
- self.expect(
- "thread backtrace",
- STOPPED_DUE_TO_BREAKPOINT,
- substrs=["stop reason = breakpoint"],
- patterns=[
- "frame.*0:.*%s %s" %
- (self.myclass,
- self.mymethod)])
-
- self.expect('expression member',
- startstr="(int) $0 = 5")
-
- # <rdar://problem/12693963>
- interp = self.dbg.GetCommandInterpreter()
- result = lldb.SBCommandReturnObject()
- interp.HandleCommand('frame variable self', result)
- output = result.GetOutput()
-
- desired_pointer = "0x0"
-
- mo = re.search("0x[0-9a-f]+", output)
-
- if mo:
- desired_pointer = mo.group(0)
-
- self.expect('expression (self)',
- substrs=[("(%s *) $1 = " % self.myclass), desired_pointer])
-
- self.expect('expression self->non_member', error=True,
- substrs=["does not have a member named 'non_member'"])
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-optimized/main.m b/packages/Python/lldbsuite/test/lang/objc/objc-optimized/main.m
deleted file mode 100644
index df88eea0f86a..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/objc-optimized/main.m
+++ /dev/null
@@ -1,44 +0,0 @@
-#import <Foundation/Foundation.h>
-
-@interface MyClass : NSObject {
- int member;
-}
-
-- (id)initWithMember:(int)_member;
-- (NSString*)description;
-@end
-
-@implementation MyClass
-
-- (id)initWithMember:(int)_member
-{
- if (self = [super init])
- {
- member = _member;
- }
- return self;
-}
-
-- (void)dealloc
-{
- [super dealloc];
-}
-
-// Set a breakpoint on '-[MyClass description]' and test expressions: expr member
-- (NSString *)description
-{
- return [NSString stringWithFormat:@"%d", member];
-}
-@end
-
-int main (int argc, char const *argv[])
-{
- NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
-
- MyClass *my_object = [[MyClass alloc] initWithMember:5];
-
- NSLog(@"MyObject %@", [my_object description]);
-
- [pool release];
- return 0;
-}
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-property/Makefile b/packages/Python/lldbsuite/test/lang/objc/objc-property/Makefile
deleted file mode 100644
index a1608fe5a664..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/objc-property/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-LEVEL = ../../../make
-
-OBJC_SOURCES := main.m
-LDFLAGS = $(CFLAGS) -lobjc -framework Foundation
-
-include $(LEVEL)/Makefile.rules
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-property/TestObjCProperty.py b/packages/Python/lldbsuite/test/lang/objc/objc-property/TestObjCProperty.py
deleted file mode 100644
index 2a9a5afc3503..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/objc-property/TestObjCProperty.py
+++ /dev/null
@@ -1,139 +0,0 @@
-"""
-Use lldb Python API to verify that expression evaluation for property references uses the correct getters and setters
-"""
-
-from __future__ import print_function
-
-
-import os
-import time
-import re
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ObjCPropertyTestCase(TestBase):
-
- mydir = TestBase.compute_mydir(__file__)
-
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
-
- # Find the line number to break for main.c.
- self.source_name = 'main.m'
-
- @skipUnlessDarwin
- @add_test_categories(['pyapi'])
- def test_objc_properties(self):
- """Test that expr uses the correct property getters and setters"""
- if self.getArchitecture() == 'i386':
- self.skipTest("requires modern objc runtime")
-
- self.build()
- exe = self.getBuildArtifact("a.out")
-
- # Create a target from the debugger.
-
- target = self.dbg.CreateTarget(exe)
- self.assertTrue(target, VALID_TARGET)
-
- # Set up our breakpoints:
-
- main_bkpt = target.BreakpointCreateBySourceRegex(
- "Set a breakpoint here.", lldb.SBFileSpec(self.source_name))
- self.assertTrue(main_bkpt and
- main_bkpt.GetNumLocations() == 1,
- VALID_BREAKPOINT)
-
- # Now launch the process, and do not stop at the entry point.
- process = target.LaunchSimple(
- None, None, self.get_process_working_directory())
-
- self.assertTrue(process.GetState() == lldb.eStateStopped,
- PROCESS_STOPPED)
-
- threads = lldbutil.get_threads_stopped_at_breakpoint(
- process, main_bkpt)
- self.assertTrue(len(threads) == 1)
- thread = threads[0]
- frame = thread.GetFrameAtIndex(0)
-
- mine = frame.FindVariable("mine")
- self.assertTrue(mine.IsValid())
- access_count = mine.GetChildMemberWithName("_access_count")
- self.assertTrue(access_count.IsValid())
- start_access_count = access_count.GetValueAsUnsigned(123456)
- self.assertTrue(start_access_count != 123456)
-
- #
- # The first set of tests test calling the getter & setter of
- # a property that actually only has a getter & setter and no
- # @property.
- #
- nonexistant_value = frame.EvaluateExpression(
- "mine.nonexistantInt", False)
- nonexistant_error = nonexistant_value.GetError()
- self.assertTrue(nonexistant_error.Success())
- nonexistant_int = nonexistant_value.GetValueAsUnsigned(123456)
- self.assertTrue(nonexistant_int == 6)
-
- # Calling the getter function would up the access count, so make sure
- # that happened.
-
- new_access_count = access_count.GetValueAsUnsigned(123456)
- self.assertTrue(new_access_count - start_access_count == 1)
- start_access_count = new_access_count
-
- #
- # Now call the setter, then make sure that
- nonexistant_change = frame.EvaluateExpression(
- "mine.nonexistantInt = 10", False)
- nonexistant_error = nonexistant_change.GetError()
- self.assertTrue(nonexistant_error.Success())
-
- # Calling the setter function would up the access count, so make sure
- # that happened.
-
- new_access_count = access_count.GetValueAsUnsigned(123456)
- self.assertTrue(new_access_count - start_access_count == 1)
- start_access_count = new_access_count
-
- #
- # Now we call the getter of a property that is backed by an ivar,
- # make sure it works and that we actually update the backing ivar.
- #
-
- backed_value = frame.EvaluateExpression("mine.backedInt", False)
- backed_error = backed_value.GetError()
- self.assertTrue(backed_error.Success())
- backing_value = mine.GetChildMemberWithName("_backedInt")
- self.assertTrue(backing_value.IsValid())
- self.assertTrue(backed_value.GetValueAsUnsigned(12345)
- == backing_value.GetValueAsUnsigned(23456))
-
- unbacked_value = frame.EvaluateExpression("mine.unbackedInt", False)
- unbacked_error = unbacked_value.GetError()
- self.assertTrue(unbacked_error.Success())
-
- idWithProtocol_value = frame.EvaluateExpression(
- "mine.idWithProtocol", False)
- idWithProtocol_error = idWithProtocol_value.GetError()
- self.assertTrue(idWithProtocol_error.Success())
- self.assertTrue(idWithProtocol_value.GetTypeName() == "id")
-
- # Make sure that class property getter works as expected
- value = frame.EvaluateExpression("BaseClass.classInt", False)
- self.assertTrue(value.GetError().Success())
- self.assertTrue(value.GetValueAsUnsigned(11111) == 123)
-
- # Make sure that class property setter works as expected
- value = frame.EvaluateExpression("BaseClass.classInt = 234", False)
- self.assertTrue(value.GetError().Success())
-
- # Verify that setter above actually worked
- value = frame.EvaluateExpression("BaseClass.classInt", False)
- self.assertTrue(value.GetError().Success())
- self.assertTrue(value.GetValueAsUnsigned(11111) == 234)
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-property/main.m b/packages/Python/lldbsuite/test/lang/objc/objc-property/main.m
deleted file mode 100644
index 8d14759fb384..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/objc-property/main.m
+++ /dev/null
@@ -1,113 +0,0 @@
-#import <Foundation/Foundation.h>
-
-@protocol MyProtocol
-
--(const char *)hello;
-
-@end
-
-static int _class_int = 123;
-
-@interface BaseClass : NSObject
-{
- int _backedInt;
- int _access_count;
-}
-
-- (int) nonexistantInt;
-- (void) setNonexistantInt: (int) in_int;
-
-- (int) myGetUnbackedInt;
-- (void) mySetUnbackedInt: (int) in_int;
-
-- (int) getAccessCount;
-
-+(BaseClass *) baseClassWithBackedInt: (int) inInt andUnbackedInt: (int) inOtherInt;
-
-@property(getter=myGetUnbackedInt,setter=mySetUnbackedInt:) int unbackedInt;
-@property int backedInt;
-@property (nonatomic, assign) id <MyProtocol> idWithProtocol;
-@property(class) int classInt;
-@end
-
-@implementation BaseClass
-@synthesize unbackedInt;
-@synthesize backedInt = _backedInt;
-
-+ (BaseClass *) baseClassWithBackedInt: (int) inInt andUnbackedInt: (int) inOtherInt
-{
- BaseClass *new = [[BaseClass alloc] init];
-
- new->_backedInt = inInt;
- new->unbackedInt = inOtherInt;
-
- return new;
-}
-
-- (int) myGetUnbackedInt
-{
- // NSLog (@"Getting BaseClass::unbackedInt - %d.\n", unbackedInt);
- _access_count++;
- return unbackedInt;
-}
-
-- (void) mySetUnbackedInt: (int) in_int
-{
- // NSLog (@"Setting BaseClass::unbackedInt from %d to %d.", unbackedInt, in_int);
- _access_count++;
- unbackedInt = in_int;
-}
-
-- (int) nonexistantInt
-{
- // NSLog (@"Getting BaseClass::nonexistantInt - %d.\n", 5);
- _access_count++;
- return 6;
-}
-
-- (void) setNonexistantInt: (int) in_int
-{
- // NSLog (@"Setting BaseClass::nonexistantInt from 7 to %d.", in_int);
- _access_count++;
-}
-
-+ (int) classInt
-{
- return _class_int;
-}
-
-+ (void) setClassInt:(int) n
-{
- _class_int = n;
-}
-
-- (int) getAccessCount
-{
- return _access_count;
-}
-@end
-
-int
-main ()
-{
- BaseClass *mine = [BaseClass baseClassWithBackedInt: 10 andUnbackedInt: 20];
-
- // Set a breakpoint here.
- int nonexistant = mine.nonexistantInt;
-
- int backedInt = mine.backedInt;
-
- int unbackedInt = mine.unbackedInt;
-
- id idWithProtocol = mine.idWithProtocol;
-
- NSLog (@"Results for %p: nonexistant: %d backed: %d unbacked: %d accessCount: %d.",
- mine,
- nonexistant,
- backedInt,
- unbackedInt,
- [mine getAccessCount]);
- return 0;
-
-}
-
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-runtime-ivars/Makefile b/packages/Python/lldbsuite/test/lang/objc/objc-runtime-ivars/Makefile
deleted file mode 100644
index a1608fe5a664..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/objc-runtime-ivars/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-LEVEL = ../../../make
-
-OBJC_SOURCES := main.m
-LDFLAGS = $(CFLAGS) -lobjc -framework Foundation
-
-include $(LEVEL)/Makefile.rules
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-runtime-ivars/TestRuntimeIvars.py b/packages/Python/lldbsuite/test/lang/objc/objc-runtime-ivars/TestRuntimeIvars.py
deleted file mode 100644
index f2c3ec0031b4..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/objc-runtime-ivars/TestRuntimeIvars.py
+++ /dev/null
@@ -1,6 +0,0 @@
-from lldbsuite.test import lldbinline
-from lldbsuite.test import decorators
-
-lldbinline.MakeInlineTest(
- __file__, globals(), [
- decorators.skipIfFreeBSD, decorators.skipIfLinux, decorators.skipIfWindows, decorators.skipIf(archs=["i386", "i686"])])
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-runtime-ivars/main.m b/packages/Python/lldbsuite/test/lang/objc/objc-runtime-ivars/main.m
deleted file mode 100644
index 1f5a9b077e27..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/objc-runtime-ivars/main.m
+++ /dev/null
@@ -1,10 +0,0 @@
-#import <Foundation/Foundation.h>
-
-int main ()
-{
- @autoreleasepool
- {
- NSLog(@"Hello"); //% self.expect("expression -- *((NSConcretePointerArray*)[NSPointerArray strongObjectsPointerArray])", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["count", "capacity", "options", "mutations"]);
- //% self.expect("expression -- ((NSConcretePointerArray*)[NSPointerArray strongObjectsPointerArray])->count", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["unsigned"]);
- }
-}
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-static-method-stripped/Makefile b/packages/Python/lldbsuite/test/lang/objc/objc-static-method-stripped/Makefile
deleted file mode 100644
index 6c5492dade11..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/objc-static-method-stripped/Makefile
+++ /dev/null
@@ -1,16 +0,0 @@
-LEVEL = ../../../make
-
-OBJC_SOURCES := static.m
-LDFLAGS = $(CFLAGS) -lobjc -framework Foundation
-
-default: a.out.stripped
-
-a.out.stripped: a.out.dSYM
- strip -o a.out.stripped a.out
- ln -sf a.out.dSYM a.out.stripped.dSYM
-
-clean::
- rm -f a.out.stripped
- rm -rf $(wildcard *.dSYM)
-
-include $(LEVEL)/Makefile.rules
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-static-method-stripped/TestObjCStaticMethodStripped.py b/packages/Python/lldbsuite/test/lang/objc/objc-static-method-stripped/TestObjCStaticMethodStripped.py
deleted file mode 100644
index ed969414c122..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/objc-static-method-stripped/TestObjCStaticMethodStripped.py
+++ /dev/null
@@ -1,80 +0,0 @@
-"""Test calling functions in static methods with a stripped binary."""
-
-from __future__ import print_function
-
-
-import os
-import time
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestObjCStaticMethodStripped(TestBase):
-
- mydir = TestBase.compute_mydir(__file__)
-
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
- # Find the line numbers to break inside main().
- self.main_source = "static.m"
- self.break_line = line_number(
- self.main_source, '// Set breakpoint here.')
-
- @skipUnlessDarwin
- @add_test_categories(['pyapi'])
- @skipIf(
- debug_info=no_match("dsym"),
- bugnumber="This test requires a stripped binary and a dSYM")
- #<rdar://problem/12042992>
- def test_with_python_api(self):
- """Test calling functions in static methods with a stripped binary."""
- if self.getArchitecture() == 'i386':
- self.skipTest("requires modern objc runtime")
- self.build()
- exe = self.getBuildArtifact("a.out")
-
- target = self.dbg.CreateTarget(exe)
- self.assertTrue(target, VALID_TARGET)
-
- bpt = target.BreakpointCreateByLocation(
- self.main_source, self.break_line)
- self.assertTrue(bpt, VALID_BREAKPOINT)
-
- # Now launch the process, and do not stop at entry point.
- process = target.LaunchSimple(
- None, None, self.get_process_working_directory())
-
- self.assertTrue(process, PROCESS_IS_VALID)
-
- # The stop reason of the thread should be breakpoint.
- thread_list = lldbutil.get_threads_stopped_at_breakpoint(process, bpt)
-
- # Make sure we stopped at the first breakpoint.
- self.assertTrue(
- len(thread_list) != 0,
- "No thread stopped at our breakpoint.")
- self.assertTrue(len(thread_list) == 1,
- "More than one thread stopped at our breakpoint.")
-
- # Now make sure we can call a function in the static method we've
- # stopped in.
- frame = thread_list[0].GetFrameAtIndex(0)
- self.assertTrue(frame, "Got a valid frame 0 frame.")
-
- cmd_value = frame.EvaluateExpression("(char *) sel_getName (_cmd)")
- self.assertTrue(cmd_value.IsValid())
- sel_name = cmd_value.GetSummary()
- self.assertTrue(
- sel_name == "\"doSomethingWithString:\"",
- "Got the right value for the selector as string.")
-
- cmd_value = frame.EvaluateExpression(
- "[Foo doSomethingElseWithString:string]")
- self.assertTrue(cmd_value.IsValid())
- string_length = cmd_value.GetValueAsUnsigned()
- self.assertTrue(
- string_length == 27,
- "Got the right value from another class method on the same class.")
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-static-method-stripped/static.m b/packages/Python/lldbsuite/test/lang/objc/objc-static-method-stripped/static.m
deleted file mode 100644
index ec7b2ef67195..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/objc-static-method-stripped/static.m
+++ /dev/null
@@ -1,29 +0,0 @@
-#import <Foundation/Foundation.h>
-
-@interface Foo : NSObject
-+(void) doSomethingWithString: (NSString *) string;
--(void) doSomethingWithNothing;
-@end
-
-@implementation Foo
-+(void) doSomethingWithString: (NSString *) string
-{
- NSLog (@"String is: %@.", string); // Set breakpoint here.
-}
-
-+(int) doSomethingElseWithString: (NSString *) string
-{
- NSLog (@"String is still: %@.", string);
- return [string length];
-}
-
--(void) doSomethingWithNothing
-{
-}
-@end
-
-int main()
-{
- [Foo doSomethingWithString: @"Some string I have in mind."];
- return 0;
-}
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-static-method/Makefile b/packages/Python/lldbsuite/test/lang/objc/objc-static-method/Makefile
deleted file mode 100644
index a8e973f6d3b1..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/objc-static-method/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-LEVEL = ../../../make
-
-OBJC_SOURCES := static.m
-LDFLAGS = $(CFLAGS) -lobjc -framework Foundation
-
-include $(LEVEL)/Makefile.rules
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-static-method/TestObjCStaticMethod.py b/packages/Python/lldbsuite/test/lang/objc/objc-static-method/TestObjCStaticMethod.py
deleted file mode 100644
index 37b41cd13fda..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/objc-static-method/TestObjCStaticMethod.py
+++ /dev/null
@@ -1,75 +0,0 @@
-"""Test calling functions in static methods."""
-
-from __future__ import print_function
-
-
-import os
-import time
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestObjCStaticMethod(TestBase):
-
- mydir = TestBase.compute_mydir(__file__)
-
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
- # Find the line numbers to break inside main().
- self.main_source = "static.m"
- self.break_line = line_number(
- self.main_source, '// Set breakpoint here.')
-
- @skipUnlessDarwin
- @add_test_categories(['pyapi'])
- #<rdar://problem/9745789> "expression" can't call functions in class methods
- def test_with_python_api(self):
- """Test calling functions in static methods."""
- self.build()
- exe = self.getBuildArtifact("a.out")
-
- target = self.dbg.CreateTarget(exe)
- self.assertTrue(target, VALID_TARGET)
-
- bpt = target.BreakpointCreateByLocation(
- self.main_source, self.break_line)
- self.assertTrue(bpt, VALID_BREAKPOINT)
-
- # Now launch the process, and do not stop at entry point.
- process = target.LaunchSimple(
- None, None, self.get_process_working_directory())
-
- self.assertTrue(process, PROCESS_IS_VALID)
-
- # The stop reason of the thread should be breakpoint.
- thread_list = lldbutil.get_threads_stopped_at_breakpoint(process, bpt)
-
- # Make sure we stopped at the first breakpoint.
- self.assertTrue(
- len(thread_list) != 0,
- "No thread stopped at our breakpoint.")
- self.assertTrue(len(thread_list) == 1,
- "More than one thread stopped at our breakpoint.")
-
- # Now make sure we can call a function in the static method we've
- # stopped in.
- frame = thread_list[0].GetFrameAtIndex(0)
- self.assertTrue(frame, "Got a valid frame 0 frame.")
-
- cmd_value = frame.EvaluateExpression("(char *) sel_getName (_cmd)")
- self.assertTrue(cmd_value.IsValid())
- sel_name = cmd_value.GetSummary()
- self.assertTrue(
- sel_name == "\"doSomethingWithString:\"",
- "Got the right value for the selector as string.")
-
- cmd_value = frame.EvaluateExpression(
- "[self doSomethingElseWithString:string]")
- self.assertTrue(cmd_value.IsValid())
- string_length = cmd_value.GetValueAsUnsigned()
- self.assertTrue(
- string_length == 27,
- "Got the right value from another class method on the same class.")
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-static-method/static.m b/packages/Python/lldbsuite/test/lang/objc/objc-static-method/static.m
deleted file mode 100644
index ec7b2ef67195..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/objc-static-method/static.m
+++ /dev/null
@@ -1,29 +0,0 @@
-#import <Foundation/Foundation.h>
-
-@interface Foo : NSObject
-+(void) doSomethingWithString: (NSString *) string;
--(void) doSomethingWithNothing;
-@end
-
-@implementation Foo
-+(void) doSomethingWithString: (NSString *) string
-{
- NSLog (@"String is: %@.", string); // Set breakpoint here.
-}
-
-+(int) doSomethingElseWithString: (NSString *) string
-{
- NSLog (@"String is still: %@.", string);
- return [string length];
-}
-
--(void) doSomethingWithNothing
-{
-}
-@end
-
-int main()
-{
- [Foo doSomethingWithString: @"Some string I have in mind."];
- return 0;
-}
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-stepping/Makefile b/packages/Python/lldbsuite/test/lang/objc/objc-stepping/Makefile
deleted file mode 100644
index b097fe65fce7..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/objc-stepping/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-LEVEL = ../../../make
-
-OBJC_SOURCES := stepping-tests.m
-LDFLAGS = $(CFLAGS) -lobjc -framework Foundation
-
-include $(LEVEL)/Makefile.rules
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-stepping/TestObjCStepping.py b/packages/Python/lldbsuite/test/lang/objc/objc-stepping/TestObjCStepping.py
deleted file mode 100644
index 9e949dc627b2..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/objc-stepping/TestObjCStepping.py
+++ /dev/null
@@ -1,222 +0,0 @@
-"""Test stepping through ObjC method dispatch in various forms."""
-
-from __future__ import print_function
-
-
-import os
-import time
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestObjCStepping(TestBase):
-
- mydir = TestBase.compute_mydir(__file__)
-
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
- # Find the line numbers that we will step to in main:
- self.main_source = "stepping-tests.m"
- self.source_randomMethod_line = line_number(
- self.main_source, '// Source randomMethod start line.')
- self.sourceBase_randomMethod_line = line_number(
- self.main_source, '// SourceBase randomMethod start line.')
- self.source_returnsStruct_start_line = line_number(
- self.main_source, '// Source returnsStruct start line.')
- self.sourceBase_returnsStruct_start_line = line_number(
- self.main_source, '// SourceBase returnsStruct start line.')
- self.stepped_past_nil_line = line_number(
- self.main_source, '// Step over nil should stop here.')
-
- @skipUnlessDarwin
- @add_test_categories(['pyapi', 'basic_process'])
- def test_with_python_api(self):
- """Test stepping through ObjC method dispatch in various forms."""
- self.build()
- exe = self.getBuildArtifact("a.out")
-
- target = self.dbg.CreateTarget(exe)
- self.assertTrue(target, VALID_TARGET)
-
- self.main_source_spec = lldb.SBFileSpec(self.main_source)
-
- breakpoints_to_disable = []
-
- break1 = target.BreakpointCreateBySourceRegex(
- "// Set first breakpoint here.", self.main_source_spec)
- self.assertTrue(break1, VALID_BREAKPOINT)
- breakpoints_to_disable.append(break1)
-
- break2 = target.BreakpointCreateBySourceRegex(
- "// Set second breakpoint here.", self.main_source_spec)
- self.assertTrue(break2, VALID_BREAKPOINT)
- breakpoints_to_disable.append(break2)
-
- break3 = target.BreakpointCreateBySourceRegex(
- '// Set third breakpoint here.', self.main_source_spec)
- self.assertTrue(break3, VALID_BREAKPOINT)
- breakpoints_to_disable.append(break3)
-
- break4 = target.BreakpointCreateBySourceRegex(
- '// Set fourth breakpoint here.', self.main_source_spec)
- self.assertTrue(break4, VALID_BREAKPOINT)
- breakpoints_to_disable.append(break4)
-
- break5 = target.BreakpointCreateBySourceRegex(
- '// Set fifth breakpoint here.', self.main_source_spec)
- self.assertTrue(break5, VALID_BREAKPOINT)
- breakpoints_to_disable.append(break5)
-
- break_returnStruct_call_super = target.BreakpointCreateBySourceRegex(
- '// Source returnsStruct call line.', self.main_source_spec)
- self.assertTrue(break_returnStruct_call_super, VALID_BREAKPOINT)
- breakpoints_to_disable.append(break_returnStruct_call_super)
-
- break_step_nil = target.BreakpointCreateBySourceRegex(
- '// Set nil step breakpoint here.', self.main_source_spec)
- self.assertTrue(break_step_nil, VALID_BREAKPOINT)
-
- # Now launch the process, and do not stop at entry point.
- process = target.LaunchSimple(
- None, None, self.get_process_working_directory())
-
- self.assertTrue(process, PROCESS_IS_VALID)
-
- # The stop reason of the thread should be breakpoint.
- threads = lldbutil.get_threads_stopped_at_breakpoint(process, break1)
- if len(threads) != 1:
- self.fail("Failed to stop at breakpoint 1.")
-
- thread = threads[0]
-
- mySource = thread.GetFrameAtIndex(0).FindVariable("mySource")
- self.assertTrue(mySource, "Found mySource local variable.")
- mySource_isa = mySource.GetChildMemberWithName("isa")
- self.assertTrue(mySource_isa, "Found mySource->isa local variable.")
- className = mySource_isa.GetSummary()
-
- if self.TraceOn():
- print(mySource_isa)
-
- # Lets delete mySource so we can check that after stepping a child variable
- # with no parent persists and is useful.
- del (mySource)
-
- # Now step in, that should leave us in the Source randomMethod:
- thread.StepInto()
- line_number = thread.GetFrameAtIndex(0).GetLineEntry().GetLine()
- self.assertTrue(
- line_number == self.source_randomMethod_line,
- "Stepped into Source randomMethod.")
-
- # Now step in again, through the super call, and that should leave us
- # in the SourceBase randomMethod:
- thread.StepInto()
- line_number = thread.GetFrameAtIndex(0).GetLineEntry().GetLine()
- self.assertTrue(
- line_number == self.sourceBase_randomMethod_line,
- "Stepped through super into SourceBase randomMethod.")
-
- threads = lldbutil.continue_to_breakpoint(process, break2)
- self.assertTrue(
- len(threads) == 1,
- "Continued to second breakpoint in main.")
-
- # Again, step in twice gets us to a stret method and a stret super
- # call:
- thread = threads[0]
- thread.StepInto()
- line_number = thread.GetFrameAtIndex(0).GetLineEntry().GetLine()
- self.assertTrue(
- line_number == self.source_returnsStruct_start_line,
- "Stepped into Source returnsStruct.")
-
- threads = lldbutil.continue_to_breakpoint(
- process, break_returnStruct_call_super)
- self.assertTrue(
- len(threads) == 1,
- "Stepped to the call super line in Source returnsStruct.")
- thread = threads[0]
-
- thread.StepInto()
- line_number = thread.GetFrameAtIndex(0).GetLineEntry().GetLine()
- self.assertTrue(
- line_number == self.sourceBase_returnsStruct_start_line,
- "Stepped through super into SourceBase returnsStruct.")
-
- # Cool now continue to get past the call that initializes the Observer, and then do our steps in again to see that
- # we can find our way when we're stepping through a KVO swizzled
- # object.
-
- threads = lldbutil.continue_to_breakpoint(process, break3)
- self.assertTrue(
- len(threads) == 1,
- "Continued to third breakpoint in main, our object should now be swizzled.")
-
- newClassName = mySource_isa.GetSummary()
-
- if self.TraceOn():
- print("className is %s, newClassName is %s" % (className, newClassName))
- print(mySource_isa)
-
- self.assertTrue(
- newClassName != className,
- "The isa did indeed change, swizzled!")
-
- # Now step in, that should leave us in the Source randomMethod:
- thread = threads[0]
- thread.StepInto()
- line_number = thread.GetFrameAtIndex(0).GetLineEntry().GetLine()
- self.assertTrue(
- line_number == self.source_randomMethod_line,
- "Stepped into Source randomMethod in swizzled object.")
-
- # Now step in again, through the super call, and that should leave us
- # in the SourceBase randomMethod:
- thread.StepInto()
- line_number = thread.GetFrameAtIndex(0).GetLineEntry().GetLine()
- self.assertTrue(
- line_number == self.sourceBase_randomMethod_line,
- "Stepped through super into SourceBase randomMethod in swizzled object.")
-
- threads = lldbutil.continue_to_breakpoint(process, break4)
- self.assertTrue(
- len(threads) == 1,
- "Continued to fourth breakpoint in main.")
- thread = threads[0]
-
- # Again, step in twice gets us to a stret method and a stret super
- # call:
- thread.StepInto()
- line_number = thread.GetFrameAtIndex(0).GetLineEntry().GetLine()
- self.assertTrue(
- line_number == self.source_returnsStruct_start_line,
- "Stepped into Source returnsStruct in swizzled object.")
-
- threads = lldbutil.continue_to_breakpoint(
- process, break_returnStruct_call_super)
- self.assertTrue(
- len(threads) == 1,
- "Stepped to the call super line in Source returnsStruct - second time.")
- thread = threads[0]
-
- thread.StepInto()
- line_number = thread.GetFrameAtIndex(0).GetLineEntry().GetLine()
- self.assertTrue(
- line_number == self.sourceBase_returnsStruct_start_line,
- "Stepped through super into SourceBase returnsStruct in swizzled object.")
-
- for bkpt in breakpoints_to_disable:
- bkpt.SetEnabled(False)
-
- threads = lldbutil.continue_to_breakpoint(process, break_step_nil)
- self.assertTrue(len(threads) == 1, "Continued to step nil breakpoint.")
-
- thread.StepInto()
- line_number = thread.GetFrameAtIndex(0).GetLineEntry().GetLine()
- self.assertTrue(
- line_number == self.stepped_past_nil_line,
- "Step in over dispatch to nil stepped over.")
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-stepping/stepping-tests.m b/packages/Python/lldbsuite/test/lang/objc/objc-stepping/stepping-tests.m
deleted file mode 100644
index 63db536dee49..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/objc-stepping/stepping-tests.m
+++ /dev/null
@@ -1,138 +0,0 @@
-#import <Foundation/Foundation.h>
-#include <stdio.h>
-
-struct return_me
-{
- int first;
- int second;
-};
-
-@interface SourceBase: NSObject
-{
- struct return_me my_return;
-}
-- (SourceBase *) initWithFirst: (int) first andSecond: (int) second;
-- (void) randomMethod;
-- (struct return_me) returnsStruct;
-@end
-
-@implementation SourceBase
-- (void) randomMethod
-{
- printf ("Called in SourceBase version of randomMethod.\n"); // SourceBase randomMethod start line.
-}
-
-- (struct return_me) returnsStruct
-{
- return my_return; // SourceBase returnsStruct start line.
-}
-
-- (SourceBase *) initWithFirst: (int) first andSecond: (int) second
-{
- my_return.first = first;
- my_return.second = second;
-
- return self;
-}
-@end
-
-@interface Source : SourceBase
-{
- int _property;
-}
-- (void) setProperty: (int) newValue;
-- (void) randomMethod;
-- (struct return_me) returnsStruct;
-@end
-
-@implementation Source
-- (void) setProperty: (int) newValue
-{
- _property = newValue;
-}
-
-- (void) randomMethod
-{
- [super randomMethod]; // Source randomMethod start line.
- printf ("Called in Source version of random method.");
-}
-
-- (struct return_me) returnsStruct
-{
- printf ("Called in Source version of returnsStruct.\n"); // Source returnsStruct start line.
- return [super returnsStruct]; // Source returnsStruct call line.
-}
-
-@end
-
-@interface Observer : NSObject
-{
- Source *_source;
-}
-+ (Observer *) observerWithSource: (Source *) source;
-- (Observer *) initWithASource: (Source *) source;
-- (void) observeValueForKeyPath: (NSString *) path
- ofObject: (id) object
- change: (NSDictionary *) change
- context: (void *) context;
-@end
-
-@implementation Observer
-
-+ (Observer *) observerWithSource: (Source *) inSource;
-{
- Observer *retval;
-
- retval = [[Observer alloc] initWithASource: inSource];
- return retval;
-}
-
-- (Observer *) initWithASource: (Source *) source
-{
- [super init];
- _source = source;
- [_source addObserver: self
- forKeyPath: @"property"
- options: (NSKeyValueObservingOptionNew | NSKeyValueObservingOptionOld)
- context: NULL];
- return self;
-}
-
-- (void) observeValueForKeyPath: (NSString *) path
- ofObject: (id) object
- change: (NSDictionary *) change
- context: (void *) context
-{
- printf ("Observer function called.\n");
- return;
-}
-@end
-
-int main ()
-{
- Source *mySource;
- Observer *myObserver;
- struct return_me ret_val;
-
- NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
-
- mySource = [[Source alloc] init];
-
- [mySource randomMethod]; // Set first breakpoint here.
- ret_val = [mySource returnsStruct]; // Set second breakpoint here.
-
- myObserver = [Observer observerWithSource: mySource];
-
- [mySource randomMethod]; // Set third breakpoint here.
- ret_val = [mySource returnsStruct]; // Set fourth breakpoint here.
- [mySource setProperty: 5]; // Set fifth breakpoint here.
-
- // We also had a bug where stepping into a method dispatch to nil turned
- // into continue. So make sure that works here:
-
- mySource = nil;
- [mySource randomMethod]; // Set nil step breakpoint here.
- [pool release]; // Step over nil should stop here.
- return 0;
-
-}
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-struct-argument/Makefile b/packages/Python/lldbsuite/test/lang/objc/objc-struct-argument/Makefile
deleted file mode 100644
index c16802966cff..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/objc-struct-argument/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-LEVEL = ../../../make
-
-OBJC_SOURCES := test.m
-LDFLAGS = $(CFLAGS) -lobjc -framework Foundation
-
-include $(LEVEL)/Makefile.rules
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-struct-argument/TestObjCStructArgument.py b/packages/Python/lldbsuite/test/lang/objc/objc-struct-argument/TestObjCStructArgument.py
deleted file mode 100644
index 4195f60cf60e..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/objc-struct-argument/TestObjCStructArgument.py
+++ /dev/null
@@ -1,69 +0,0 @@
-"""Test passing structs to Objective-C methods."""
-
-from __future__ import print_function
-
-
-import os
-import time
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestObjCStructArgument(TestBase):
-
- mydir = TestBase.compute_mydir(__file__)
-
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
- # Find the line numbers to break inside main().
- self.main_source = "test.m"
- self.break_line = line_number(
- self.main_source, '// Set breakpoint here.')
-
- @skipUnlessDarwin
- @add_test_categories(['pyapi'])
- @skipIf(debug_info=no_match(["gmodules"]), oslist=['ios', 'watchos', 'tvos', 'bridgeos'], archs=['armv7', 'arm64']) # this test program only builds for ios with -gmodules
- def test_with_python_api(self):
- """Test passing structs to Objective-C methods."""
- self.build()
- exe = self.getBuildArtifact("a.out")
-
- target = self.dbg.CreateTarget(exe)
- self.assertTrue(target, VALID_TARGET)
-
- bpt = target.BreakpointCreateByLocation(
- self.main_source, self.break_line)
- self.assertTrue(bpt, VALID_BREAKPOINT)
-
- # Now launch the process, and do not stop at entry point.
- process = target.LaunchSimple(
- None, None, self.get_process_working_directory())
-
- self.assertTrue(process, PROCESS_IS_VALID)
-
- # The stop reason of the thread should be breakpoint.
- thread_list = lldbutil.get_threads_stopped_at_breakpoint(process, bpt)
-
- # Make sure we stopped at the first breakpoint.
- self.assertTrue(
- len(thread_list) != 0,
- "No thread stopped at our breakpoint.")
- self.assertTrue(len(thread_list) == 1,
- "More than one thread stopped at our breakpoint.")
-
- frame = thread_list[0].GetFrameAtIndex(0)
- self.assertTrue(frame, "Got a valid frame 0 frame.")
-
- self.expect("p [summer sumThings:tts]", substrs=['9'])
-
- self.expect(
- "po [NSValue valueWithRect:rect]",
- substrs=['NSRect: {{0, 0}, {10, 20}}'])
-
- # Now make sure we can call a method that returns a struct without
- # crashing.
- cmd_value = frame.EvaluateExpression("[provider getRange]")
- self.assertTrue(cmd_value.IsValid())
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-struct-argument/test.m b/packages/Python/lldbsuite/test/lang/objc/objc-struct-argument/test.m
deleted file mode 100644
index 6b13a3a3d595..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/objc-struct-argument/test.m
+++ /dev/null
@@ -1,40 +0,0 @@
-#import <Foundation/Foundation.h>
-#include <TargetConditionals.h>
-
-#if TARGET_OS_IPHONE
-@import CoreGraphics;
-typedef CGRect NSRect;
-#endif
-
-struct things_to_sum {
- int a;
- int b;
- int c;
-};
-
-@interface ThingSummer : NSObject {
-};
--(int)sumThings:(struct things_to_sum)tts;
-@end
-
-@implementation ThingSummer
--(int)sumThings:(struct things_to_sum)tts
-{
- return tts.a + tts.b + tts.c;
-}
-@end
-
-int main()
-{
- @autoreleasepool
- {
- ThingSummer *summer = [ThingSummer alloc];
- struct things_to_sum tts = { 2, 3, 4 };
- int ret = [summer sumThings:tts];
- NSRect rect = {{0, 0}, {10, 20}};
- // The Objective-C V1 runtime won't read types from metadata so we need
- // NSValue in our debug info to use it in our test.
- NSValue *v = [NSValue valueWithRect:rect];
- return rect.origin.x; // Set breakpoint here.
- }
-}
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-struct-return/Makefile b/packages/Python/lldbsuite/test/lang/objc/objc-struct-return/Makefile
deleted file mode 100644
index c16802966cff..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/objc-struct-return/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-LEVEL = ../../../make
-
-OBJC_SOURCES := test.m
-LDFLAGS = $(CFLAGS) -lobjc -framework Foundation
-
-include $(LEVEL)/Makefile.rules
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-struct-return/TestObjCStructReturn.py b/packages/Python/lldbsuite/test/lang/objc/objc-struct-return/TestObjCStructReturn.py
deleted file mode 100644
index 6f6fd92992f9..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/objc-struct-return/TestObjCStructReturn.py
+++ /dev/null
@@ -1,62 +0,0 @@
-"""Test calling functions in class methods."""
-
-from __future__ import print_function
-
-
-import os
-import time
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestObjCClassMethod(TestBase):
-
- mydir = TestBase.compute_mydir(__file__)
-
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
- # Find the line numbers to break inside main().
- self.main_source = "test.m"
- self.break_line = line_number(
- self.main_source, '// Set breakpoint here.')
-
- @skipUnlessDarwin
- @add_test_categories(['pyapi'])
- def test_with_python_api(self):
- """Test calling functions in class methods."""
- self.build()
- exe = self.getBuildArtifact("a.out")
-
- target = self.dbg.CreateTarget(exe)
- self.assertTrue(target, VALID_TARGET)
-
- bpt = target.BreakpointCreateByLocation(
- self.main_source, self.break_line)
- self.assertTrue(bpt, VALID_BREAKPOINT)
-
- # Now launch the process, and do not stop at entry point.
- process = target.LaunchSimple(
- None, None, self.get_process_working_directory())
-
- self.assertTrue(process, PROCESS_IS_VALID)
-
- # The stop reason of the thread should be breakpoint.
- thread_list = lldbutil.get_threads_stopped_at_breakpoint(process, bpt)
-
- # Make sure we stopped at the first breakpoint.
- self.assertTrue(
- len(thread_list) != 0,
- "No thread stopped at our breakpoint.")
- self.assertTrue(len(thread_list) == 1,
- "More than one thread stopped at our breakpoint.")
-
- frame = thread_list[0].GetFrameAtIndex(0)
- self.assertTrue(frame, "Got a valid frame 0 frame.")
-
- # Now make sure we can call a method that returns a struct without
- # crashing.
- cmd_value = frame.EvaluateExpression("[provider getRange]")
- self.assertTrue(cmd_value.IsValid())
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-struct-return/test.m b/packages/Python/lldbsuite/test/lang/objc/objc-struct-return/test.m
deleted file mode 100644
index aafe231ea817..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/objc-struct-return/test.m
+++ /dev/null
@@ -1,23 +0,0 @@
-#import <Foundation/Foundation.h>
-
-@interface RangeProvider : NSObject {
-};
--(NSRange)getRange;
-@end
-
-@implementation RangeProvider
--(NSRange)getRange
-{
- return NSMakeRange(0, 3);
-}
-@end
-
-int main()
-{
- @autoreleasepool
- {
- RangeProvider *provider = [RangeProvider alloc];
- NSRange range = [provider getRange]; // Set breakpoint here.
- return 0;
- }
-}
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-super/Makefile b/packages/Python/lldbsuite/test/lang/objc/objc-super/Makefile
deleted file mode 100644
index c2d07910a6e8..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/objc-super/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-LEVEL = ../../../make
-
-OBJC_SOURCES := class.m
-LDFLAGS = $(CFLAGS) -lobjc -framework Foundation
-
-include $(LEVEL)/Makefile.rules
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-super/TestObjCSuper.py b/packages/Python/lldbsuite/test/lang/objc/objc-super/TestObjCSuper.py
deleted file mode 100644
index 5b10bc5b81d6..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/objc-super/TestObjCSuper.py
+++ /dev/null
@@ -1,67 +0,0 @@
-"""Test calling methods on super."""
-
-from __future__ import print_function
-
-
-import os
-import time
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestObjCSuperMethod(TestBase):
-
- mydir = TestBase.compute_mydir(__file__)
-
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
- # Find the line numbers to break inside main().
- self.main_source = "class.m"
- self.break_line = line_number(
- self.main_source, '// Set breakpoint here.')
-
- @skipUnlessDarwin
- @add_test_categories(['pyapi'])
- def test_with_python_api(self):
- """Test calling methods on super."""
- self.build()
- exe = self.getBuildArtifact("a.out")
-
- target = self.dbg.CreateTarget(exe)
- self.assertTrue(target, VALID_TARGET)
-
- bpt = target.BreakpointCreateByLocation(
- self.main_source, self.break_line)
- self.assertTrue(bpt, VALID_BREAKPOINT)
-
- # Now launch the process, and do not stop at entry point.
- process = target.LaunchSimple(
- None, None, self.get_process_working_directory())
-
- self.assertTrue(process, PROCESS_IS_VALID)
-
- # The stop reason of the thread should be breakpoint.
- thread_list = lldbutil.get_threads_stopped_at_breakpoint(process, bpt)
-
- # Make sure we stopped at the first breakpoint.
- self.assertTrue(
- len(thread_list) != 0,
- "No thread stopped at our breakpoint.")
- self.assertTrue(len(thread_list) == 1,
- "More than one thread stopped at our breakpoint.")
-
- # Now make sure we can call a function in the class method we've
- # stopped in.
- frame = thread_list[0].GetFrameAtIndex(0)
- self.assertTrue(frame, "Got a valid frame 0 frame.")
-
- cmd_value = frame.EvaluateExpression("[self get]")
- self.assertTrue(cmd_value.IsValid())
- self.assertTrue(cmd_value.GetValueAsUnsigned() == 2)
-
- cmd_value = frame.EvaluateExpression("[super get]")
- self.assertTrue(cmd_value.IsValid())
- self.assertTrue(cmd_value.GetValueAsUnsigned() == 1)
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-super/class.m b/packages/Python/lldbsuite/test/lang/objc/objc-super/class.m
deleted file mode 100644
index b55b649aaaec..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/objc-super/class.m
+++ /dev/null
@@ -1,39 +0,0 @@
-#import <Foundation/Foundation.h>
-
-@interface Foo : NSObject {
-}
--(int)get;
-@end
-
-@implementation Foo
--(int)get
-{
- return 1;
-}
-@end
-
-@interface Bar : Foo {
-}
--(int)get;
-@end
-
-@implementation Bar
--(int)get
-{
- return 2;
-}
-
--(int)callme
-{
- return [self get]; // Set breakpoint here.
-}
-@end
-
-int main()
-{
- @autoreleasepool
- {
- Bar *bar = [Bar alloc];
- return [bar callme];
- }
-}
diff --git a/packages/Python/lldbsuite/test/lang/objc/orderedset/Makefile b/packages/Python/lldbsuite/test/lang/objc/orderedset/Makefile
deleted file mode 100644
index a1608fe5a664..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/orderedset/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-LEVEL = ../../../make
-
-OBJC_SOURCES := main.m
-LDFLAGS = $(CFLAGS) -lobjc -framework Foundation
-
-include $(LEVEL)/Makefile.rules
diff --git a/packages/Python/lldbsuite/test/lang/objc/orderedset/TestOrderedSet.py b/packages/Python/lldbsuite/test/lang/objc/orderedset/TestOrderedSet.py
deleted file mode 100644
index 90c6bc32f772..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/orderedset/TestOrderedSet.py
+++ /dev/null
@@ -1,18 +0,0 @@
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-class TestOrderedSet(TestBase):
- mydir = TestBase.compute_mydir(__file__)
-
- @skipUnlessDarwin
- def test_ordered_set(self):
- self.build()
- src_file = "main.m"
- src_file_spec = lldb.SBFileSpec(src_file)
- (target, process, thread, main_breakpoint) = lldbutil.run_to_source_breakpoint(self,
- "break here", src_file_spec, exe_name = "a.out")
- frame = thread.GetSelectedFrame()
- self.expect("expr -d run -- orderedSet", substrs=["3 elements"])
- self.expect("expr -d run -- *orderedSet", substrs=["(int)1", "(int)2", "(int)3"])
diff --git a/packages/Python/lldbsuite/test/lang/objc/orderedset/main.m b/packages/Python/lldbsuite/test/lang/objc/orderedset/main.m
deleted file mode 100644
index e3f016226932..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/orderedset/main.m
+++ /dev/null
@@ -1,8 +0,0 @@
-#import <Foundation/Foundation.h>
-
-int main() {
- NSOrderedSet *orderedSet =
- [NSOrderedSet orderedSetWithArray:@[@1,@2,@3,@1]];
- NSLog(@"%@",orderedSet);
- return 0; // break here
-}
diff --git a/packages/Python/lldbsuite/test/lang/objc/print-obj/Makefile b/packages/Python/lldbsuite/test/lang/objc/print-obj/Makefile
deleted file mode 100644
index dba1065cd714..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/print-obj/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-LEVEL = ../../../make
-
-OBJC_SOURCES := blocked.m
-LDFLAGS = $(CFLAGS) -lobjc -framework Foundation
-
-include $(LEVEL)/Makefile.rules
diff --git a/packages/Python/lldbsuite/test/lang/objc/print-obj/TestPrintObj.py b/packages/Python/lldbsuite/test/lang/objc/print-obj/TestPrintObj.py
deleted file mode 100644
index 57a572c6bb4b..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/print-obj/TestPrintObj.py
+++ /dev/null
@@ -1,93 +0,0 @@
-"""
-Test "print object" where another thread blocks the print object from making progress.
-"""
-
-from __future__ import print_function
-
-
-import os
-import time
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-@skipUnlessDarwin
-class PrintObjTestCase(TestBase):
-
- mydir = TestBase.compute_mydir(__file__)
-
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
- # My source program.
- self.source = "blocked.m"
- # Find the line numbers to break at.
- self.line = line_number(self.source, '// Set a breakpoint here.')
-
- def test_print_obj(self):
- """
- Test "print object" where another thread blocks the print object from making progress.
-
- Set a breakpoint on the line in my_pthread_routine. Then switch threads
- to the main thread, and do print the lock_me object. Since that will
- try to get the lock already gotten by my_pthread_routime thread, it will
- have to switch to running all threads, and that should then succeed.
- """
- d = {'EXE': 'b.out'}
- self.build(dictionary=d)
- self.setTearDownCleanup(dictionary=d)
- exe = self.getBuildArtifact('b.out')
-
- target = self.dbg.CreateTarget(exe)
- self.assertTrue(target, VALID_TARGET)
-
- breakpoint = target.BreakpointCreateByLocation(self.source, self.line)
- self.assertTrue(breakpoint, VALID_BREAKPOINT)
- self.runCmd("breakpoint list")
-
- # Launch the process, and do not stop at the entry point.
- process = target.LaunchSimple(
- None, None, self.get_process_working_directory())
-
- self.runCmd("thread backtrace all")
-
- # Let's get the current stopped thread. We'd like to switch to the
- # other thread to issue our 'po lock_me' command.
- import lldbsuite.test.lldbutil as lldbutil
- this_thread = lldbutil.get_stopped_thread(
- process, lldb.eStopReasonBreakpoint)
- self.assertTrue(this_thread)
-
- # Find the other thread. The iteration protocol of SBProcess and the
- # rich comparison methods (__eq__/__ne__) of SBThread come in handy.
- other_thread = None
- for t in process:
- if t != this_thread:
- other_thread = t
- break
-
- # Set the other thread as the selected thread to issue our 'po'
- # command.other
- self.assertTrue(other_thread)
- process.SetSelectedThread(other_thread)
- if self.TraceOn():
- print("selected thread:" + lldbutil.get_description(other_thread))
- self.runCmd("thread backtrace")
-
- # We want to traverse the frame to the one corresponding to blocked.m to
- # issue our 'po lock_me' command.
-
- depth = other_thread.GetNumFrames()
- for i in range(depth):
- frame = other_thread.GetFrameAtIndex(i)
- name = frame.GetFunctionName()
- if name == 'main':
- other_thread.SetSelectedFrame(i)
- if self.TraceOn():
- print("selected frame:" + lldbutil.get_description(frame))
- break
-
- self.expect("po lock_me", OBJECT_PRINTED_CORRECTLY,
- substrs=['I am pretty special.'])
diff --git a/packages/Python/lldbsuite/test/lang/objc/print-obj/blocked.m b/packages/Python/lldbsuite/test/lang/objc/print-obj/blocked.m
deleted file mode 100644
index ba2497554444..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/print-obj/blocked.m
+++ /dev/null
@@ -1,73 +0,0 @@
-//===-- blocked.m --------------------------------------------------*- ObjC -*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-// This file is for testing running "print object" in a case where another thread
-// blocks the print object from making progress. Set a breakpoint on the line in
-// my_pthread_routine as indicated. Then switch threads to the main thread, and
-// do print the lock_me object. Since that will try to get the lock already gotten
-// by my_pthread_routime thread, it will have to switch to running all threads, and
-// that should then succeed.
-//
-
-#include <Foundation/Foundation.h>
-#include <pthread.h>
-
-static pthread_mutex_t test_mutex;
-
-static void Mutex_Init (void)
-{
- pthread_mutexattr_t tmp_mutex_attr;
- pthread_mutexattr_init(&tmp_mutex_attr);
- pthread_mutex_init(&test_mutex, &tmp_mutex_attr);
-}
-
-@interface LockMe :NSObject
-{
-
-}
-- (NSString *) description;
-@end
-
-@implementation LockMe
-- (NSString *) description
-{
- printf ("LockMe trying to get the lock.\n");
- pthread_mutex_lock(&test_mutex);
- printf ("LockMe got the lock.\n");
- pthread_mutex_unlock(&test_mutex);
- return @"I am pretty special.\n";
-}
-@end
-
-void *
-my_pthread_routine (void *data)
-{
- printf ("my_pthread_routine about to enter.\n");
- pthread_mutex_lock(&test_mutex);
- printf ("Releasing Lock.\n"); // Set a breakpoint here.
- pthread_mutex_unlock(&test_mutex);
- return NULL;
-}
-
-int
-main ()
-{
- pthread_attr_t tmp_attr;
- pthread_attr_init (&tmp_attr);
- pthread_t my_pthread;
-
- Mutex_Init ();
-
- LockMe *lock_me = [[LockMe alloc] init];
- pthread_create (&my_pthread, &tmp_attr, my_pthread_routine, NULL);
-
- pthread_join (my_pthread, NULL);
-
- return 0;
-}
diff --git a/packages/Python/lldbsuite/test/lang/objc/ptr_refs/Makefile b/packages/Python/lldbsuite/test/lang/objc/ptr_refs/Makefile
deleted file mode 100644
index b05ff34b739b..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/ptr_refs/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../../make
-
-OBJC_SOURCES := main.m
-
-include $(LEVEL)/Makefile.rules
diff --git a/packages/Python/lldbsuite/test/lang/objc/ptr_refs/TestPtrRefsObjC.py b/packages/Python/lldbsuite/test/lang/objc/ptr_refs/TestPtrRefsObjC.py
deleted file mode 100644
index 74d08f70cafa..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/ptr_refs/TestPtrRefsObjC.py
+++ /dev/null
@@ -1,49 +0,0 @@
-"""
-Test the ptr_refs tool on Darwin with Objective-C
-"""
-
-from __future__ import print_function
-
-import os
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestPtrRefsObjC(TestBase):
-
- mydir = TestBase.compute_mydir(__file__)
-
- @skipUnlessDarwin
- def test_ptr_refs(self):
- """Test the ptr_refs tool on Darwin with Objective-C"""
- self.build()
- exe = self.getBuildArtifact("a.out")
-
- target = self.dbg.CreateTarget(exe)
- self.assertTrue(target, VALID_TARGET)
-
- main_file_spec = lldb.SBFileSpec('main.m')
- breakpoint = target.BreakpointCreateBySourceRegex(
- 'break', main_file_spec)
- self.assertTrue(breakpoint and
- breakpoint.GetNumLocations() == 1,
- VALID_BREAKPOINT)
-
- process = target.LaunchSimple(
- None, None, self.get_process_working_directory())
- self.assertTrue(process, PROCESS_IS_VALID)
-
- # Frame #0 should be on self.line1 and the break condition should hold.
- thread = lldbutil.get_stopped_thread(
- process, lldb.eStopReasonBreakpoint)
- self.assertTrue(
- thread.IsValid(),
- "There should be a thread stopped due to breakpoint condition")
-
- frame = thread.GetFrameAtIndex(0)
-
- self.dbg.HandleCommand("script import lldb.macosx.heap")
- self.expect("ptr_refs self", substrs=["malloc", "stack"])
-
diff --git a/packages/Python/lldbsuite/test/lang/objc/ptr_refs/main.m b/packages/Python/lldbsuite/test/lang/objc/ptr_refs/main.m
deleted file mode 100644
index 8203165e4971..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/ptr_refs/main.m
+++ /dev/null
@@ -1,39 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#import <Foundation/Foundation.h>
-
-@interface MyClass : NSObject {
-};
--(void)test;
-@end
-
-@implementation MyClass
--(void)test {
- printf("%p\n", self); // break here
-}
-@end
-
-@interface MyOwner : NSObject {
- @public id ownedThing; // should be id, to test <rdar://problem/31363513>
-};
-@end
-
-@implementation MyOwner
-@end
-
-int main (int argc, char const *argv[]) {
- @autoreleasepool {
- MyOwner *owner = [[MyOwner alloc] init];
- owner->ownedThing = [[MyClass alloc] init];
- [(MyClass*)owner->ownedThing test];
- }
- return 0;
-}
-
diff --git a/packages/Python/lldbsuite/test/lang/objc/radar-9691614/Makefile b/packages/Python/lldbsuite/test/lang/objc/radar-9691614/Makefile
deleted file mode 100644
index ad3cb3fadcde..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/radar-9691614/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-LEVEL = ../../../make
-
-OBJC_SOURCES := main.m
-
-include $(LEVEL)/Makefile.rules
-
-LDFLAGS += -framework Foundation
diff --git a/packages/Python/lldbsuite/test/lang/objc/radar-9691614/TestObjCMethodReturningBOOL.py b/packages/Python/lldbsuite/test/lang/objc/radar-9691614/TestObjCMethodReturningBOOL.py
deleted file mode 100644
index 737b0dc32867..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/radar-9691614/TestObjCMethodReturningBOOL.py
+++ /dev/null
@@ -1,48 +0,0 @@
-"""
-Test that objective-c method returning BOOL works correctly.
-"""
-
-from __future__ import print_function
-
-
-import os
-import time
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-@skipUnlessDarwin
-class MethodReturningBOOLTestCase(TestBase):
-
- mydir = TestBase.compute_mydir(__file__)
-
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
- # We'll use the test method name as the exe_name.
- self.exe_name = self.testMethodName
- # Find the line number to break inside main().
- self.main_source = "main.m"
- self.line = line_number(self.main_source, '// Set breakpoint here.')
-
- def test_method_ret_BOOL(self):
- """Test that objective-c method returning BOOL works correctly."""
- d = {'EXE': self.exe_name}
- self.build(dictionary=d)
- self.setTearDownCleanup(dictionary=d)
-
- exe = self.getBuildArtifact(self.exe_name)
- self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
- lldbutil.run_break_set_by_file_and_line(
- self, "main.m", self.line, num_expected_locations=1, loc_exact=True)
-
- self.runCmd("run", RUN_SUCCEEDED)
- self.expect("process status", STOPPED_DUE_TO_BREAKPOINT,
- substrs=[" at %s:%d" % (self.main_source, self.line),
- "stop reason = breakpoint"])
-
- # rdar://problem/9691614
- self.runCmd('p (int)[my isValid]')
diff --git a/packages/Python/lldbsuite/test/lang/objc/radar-9691614/main.m b/packages/Python/lldbsuite/test/lang/objc/radar-9691614/main.m
deleted file mode 100644
index bb87d673452c..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/radar-9691614/main.m
+++ /dev/null
@@ -1,67 +0,0 @@
-#import <Foundation/Foundation.h>
-#include <stdio.h>
-
-@interface MyString : NSObject {
- NSString *str;
- NSDate *date;
- BOOL _is_valid;
-}
-
-- (id)initWithNSString:(NSString *)string;
-- (BOOL)isValid;
-@end
-
-@implementation MyString
-- (id)initWithNSString:(NSString *)string
-{
- if (self = [super init])
- {
- str = [NSString stringWithString:string];
- date = [NSDate date];
- }
- _is_valid = YES;
- return self;
-}
-
-- (BOOL)isValid
-{
- return _is_valid;
-}
-
-- (void)dealloc
-{
- [date release];
- [str release];
- [super dealloc];
-}
-
-- (NSString *)description
-{
- return [str stringByAppendingFormat:@" with timestamp: %@", date];
-}
-@end
-
-void
-Test_MyString (const char *program)
-{
- NSString *str = [NSString stringWithFormat:@"Hello from '%s'", program];
- MyString *my = [[MyString alloc] initWithNSString:str];
- if ([my isValid])
- printf("my is valid!\n");
-
- NSLog(@"NSString instance: %@", [str description]); // Set breakpoint here.
- // Test 'p (int)[my isValid]'.
- // The expression parser should not crash -- rdar://problem/9691614.
-
- NSLog(@"MyString instance: %@", [my description]);
-}
-
-int main (int argc, char const *argv[])
-{
- NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
-
- Test_MyString (argv[0]);
-
- [pool release];
- return 0;
-}
diff --git a/packages/Python/lldbsuite/test/lang/objc/rdar-10967107/Makefile b/packages/Python/lldbsuite/test/lang/objc/rdar-10967107/Makefile
deleted file mode 100644
index ad3cb3fadcde..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/rdar-10967107/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-LEVEL = ../../../make
-
-OBJC_SOURCES := main.m
-
-include $(LEVEL)/Makefile.rules
-
-LDFLAGS += -framework Foundation
diff --git a/packages/Python/lldbsuite/test/lang/objc/rdar-10967107/TestRdar10967107.py b/packages/Python/lldbsuite/test/lang/objc/rdar-10967107/TestRdar10967107.py
deleted file mode 100644
index ed60e5f98c2f..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/rdar-10967107/TestRdar10967107.py
+++ /dev/null
@@ -1,73 +0,0 @@
-"""
-Test that CoreFoundation classes CFGregorianDate and CFRange are not improperly uniqued
-"""
-
-from __future__ import print_function
-
-
-import os
-import time
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-@skipUnlessDarwin
-class Rdar10967107TestCase(TestBase):
-
- mydir = TestBase.compute_mydir(__file__)
-
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
- # We'll use the test method name as the exe_name.
- self.exe_name = self.testMethodName
- # Find the line number to break inside main().
- self.main_source = "main.m"
- self.line = line_number(self.main_source, '// Set breakpoint here.')
-
- def test_cfrange_diff_cfgregoriandate(self):
- """Test that CoreFoundation classes CFGregorianDate and CFRange are not improperly uniqued."""
- d = {'EXE': self.exe_name}
- self.build(dictionary=d)
- self.setTearDownCleanup(dictionary=d)
-
- exe = self.getBuildArtifact(self.exe_name)
- self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
- lldbutil.run_break_set_by_file_and_line(
- self,
- self.main_source,
- self.line,
- num_expected_locations=1,
- loc_exact=True)
-
- self.runCmd("run", RUN_SUCCEEDED)
- # check that each type is correctly bound to its list of children
- self.expect(
- "frame variable cf_greg_date --raw",
- substrs=[
- 'year',
- 'month',
- 'day',
- 'hour',
- 'minute',
- 'second'])
- self.expect(
- "frame variable cf_range --raw",
- substrs=[
- 'location',
- 'length'])
- # check that printing both does not somehow confuse LLDB
- self.expect(
- "frame variable --raw",
- substrs=[
- 'year',
- 'month',
- 'day',
- 'hour',
- 'minute',
- 'second',
- 'location',
- 'length'])
diff --git a/packages/Python/lldbsuite/test/lang/objc/rdar-10967107/main.m b/packages/Python/lldbsuite/test/lang/objc/rdar-10967107/main.m
deleted file mode 100644
index 386a458950b6..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/rdar-10967107/main.m
+++ /dev/null
@@ -1,13 +0,0 @@
-#import <Foundation/Foundation.h>
-
-int main (int argc, char const *argv[])
-{
- NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
-
- NSDate *date1 = [NSDate date];
- CFGregorianDate cf_greg_date = CFAbsoluteTimeGetGregorianDate(CFDateGetAbsoluteTime((CFDateRef)date1), NULL);
- CFRange cf_range = {4,4};
-
- [pool release]; // Set breakpoint here.
- return 0;
-}
diff --git a/packages/Python/lldbsuite/test/lang/objc/rdar-11355592/Makefile b/packages/Python/lldbsuite/test/lang/objc/rdar-11355592/Makefile
deleted file mode 100644
index ad3cb3fadcde..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/rdar-11355592/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-LEVEL = ../../../make
-
-OBJC_SOURCES := main.m
-
-include $(LEVEL)/Makefile.rules
-
-LDFLAGS += -framework Foundation
diff --git a/packages/Python/lldbsuite/test/lang/objc/rdar-11355592/TestRdar11355592.py b/packages/Python/lldbsuite/test/lang/objc/rdar-11355592/TestRdar11355592.py
deleted file mode 100644
index 8619ce1ebd38..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/rdar-11355592/TestRdar11355592.py
+++ /dev/null
@@ -1,82 +0,0 @@
-"""
-Test that we do not attempt to make a dynamic type for a 'const char*'
-"""
-
-from __future__ import print_function
-
-
-import os
-import time
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-@skipUnlessDarwin
-class Rdar10967107TestCase(TestBase):
-
- mydir = TestBase.compute_mydir(__file__)
-
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
- # We'll use the test method name as the exe_name.
- self.exe_name = self.testMethodName
- # Find the line number to break inside main().
- self.main_source = "main.m"
- self.line = line_number(self.main_source, '// Set breakpoint here.')
-
- def test_charstar_dyntype(self):
- """Test that we do not attempt to make a dynamic type for a 'const char*'"""
- d = {'EXE': self.exe_name}
- self.build(dictionary=d)
- self.setTearDownCleanup(dictionary=d)
-
- exe = self.getBuildArtifact(self.exe_name)
- self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
- lldbutil.run_break_set_by_file_and_line(
- self,
- self.main_source,
- self.line,
- num_expected_locations=1,
- loc_exact=True)
-
- self.runCmd("run", RUN_SUCCEEDED)
- # check that we correctly see the const char*, even with dynamic types
- # on
- self.expect("frame variable -raw-output my_string", substrs=['const char *'])
- self.expect(
- "frame variable my_string --raw-output --dynamic-type run-target",
- substrs=['const char *'])
- # check that expr also gets it right
- self.expect("e -R -- my_string", substrs=['const char *'])
- self.expect("expr -R -d run -- my_string", substrs=['const char *'])
- # but check that we get the real Foolie as such
- self.expect("frame variable my_foolie", substrs=['FoolMeOnce *'])
- self.expect(
- "frame variable my_foolie --dynamic-type run-target",
- substrs=['FoolMeOnce *'])
- # check that expr also gets it right
- self.expect("expr my_foolie", substrs=['FoolMeOnce *'])
- self.expect("expr -d run -- my_foolie", substrs=['FoolMeOnce *'])
- # now check that assigning a true string does not break anything
- self.runCmd("next")
- # check that we correctly see the const char*, even with dynamic types
- # on
- self.expect("frame variable my_string", substrs=['const char *'])
- self.expect(
- "frame variable my_string --dynamic-type run-target",
- substrs=['const char *'])
- # check that expr also gets it right
- self.expect("expr my_string", substrs=['const char *'])
- self.expect("expr -d run -- my_string", substrs=['const char *'])
- # but check that we get the real Foolie as such
- self.expect("frame variable my_foolie", substrs=['FoolMeOnce *'])
- self.expect(
- "frame variable my_foolie --dynamic-type run-target",
- substrs=['FoolMeOnce *'])
- # check that expr also gets it right
- self.expect("expr my_foolie", substrs=['FoolMeOnce *'])
- self.expect("expr -d run -- my_foolie", substrs=['FoolMeOnce *'])
diff --git a/packages/Python/lldbsuite/test/lang/objc/rdar-11355592/main.m b/packages/Python/lldbsuite/test/lang/objc/rdar-11355592/main.m
deleted file mode 100644
index 09b3b18a7878..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/rdar-11355592/main.m
+++ /dev/null
@@ -1,37 +0,0 @@
-#import <Foundation/Foundation.h>
-
-@interface FoolMeOnce : NSObject
-{
- int32_t value_one; // ivars needed to make 32-bit happy
- int32_t value_two;
-}
-- (FoolMeOnce *) initWithFirst: (int32_t) first andSecond: (int32_t) second;
-
-@property int32_t value_one;
-@property int32_t value_two;
-
-@end
-
-@implementation FoolMeOnce
-@synthesize value_one;
-@synthesize value_two;
-- (FoolMeOnce *) initWithFirst: (int32_t) first andSecond: (int32_t) second
-{
- value_one = first;
- value_two = second;
- return self;
-}
-@end
-
-int main (int argc, char const *argv[])
-{
- NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
-
- FoolMeOnce *my_foolie = [[FoolMeOnce alloc] initWithFirst: 20 andSecond: 55];
- const char *my_string = (char *) my_foolie;
-
- my_string = "Now this is a REAL string..."; // Set breakpoint here.
-
- [pool release];
- return 0;
-}
diff --git a/packages/Python/lldbsuite/test/lang/objc/rdar-12408181/Makefile b/packages/Python/lldbsuite/test/lang/objc/rdar-12408181/Makefile
deleted file mode 100644
index 385b557c9af0..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/rdar-12408181/Makefile
+++ /dev/null
@@ -1,11 +0,0 @@
-LEVEL = ../../../make
-
-OBJC_SOURCES := main.m
-
-include $(LEVEL)/Makefile.rules
-
-ifneq (,$(findstring arm,$(ARCH)))
- LD_EXTRAS = -framework Foundation -framework UIKit
-else
- LD_EXTRAS = -framework Foundation -framework Cocoa
-endif
diff --git a/packages/Python/lldbsuite/test/lang/objc/rdar-12408181/TestRdar12408181.py b/packages/Python/lldbsuite/test/lang/objc/rdar-12408181/TestRdar12408181.py
deleted file mode 100644
index 00fffc8176ab..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/rdar-12408181/TestRdar12408181.py
+++ /dev/null
@@ -1,72 +0,0 @@
-"""
-Test that we are able to find out how many children NSWindow has
-"""
-
-from __future__ import print_function
-
-
-import os
-import time
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-# TODO: The Jenkins testers on OS X fail running this test because they don't
-# have access to WindowServer so NSWindow doesn't work. We should disable this
-# test if WindowServer isn't available.
-# Note: Simply applying the @skipIf decorator here confuses the test harness
-# and gives a spurious failure.
-@skipUnlessDarwin
-class Rdar12408181TestCase(TestBase):
-
- mydir = TestBase.compute_mydir(__file__)
-
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
- # We'll use the test method name as the exe_name.
- self.exe_name = self.testMethodName
- # Find the line number to break inside main().
- self.main_source = "main.m"
- self.line = line_number(self.main_source, '// Set breakpoint here.')
-
- def test_nswindow_count(self):
- """Test that we are able to find out how many children NSWindow has."""
-
- self.skipTest("Skipping this test due to timeout flakiness")
-
- d = {'EXE': self.exe_name}
- self.build(dictionary=d)
- self.setTearDownCleanup(dictionary=d)
-
- exe = self.getBuildArtifact(self.exe_name)
- self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
- lldbutil.run_break_set_by_file_and_line(
- self,
- self.main_source,
- self.line,
- num_expected_locations=1,
- loc_exact=True)
-
- self.runCmd("run", RUN_SUCCEEDED)
- if self.frame().EvaluateExpression(
- '(void*)_CGSDefaultConnection()').GetValueAsUnsigned() != 0:
- window = self.frame().FindVariable("window")
- window_dynamic = window.GetDynamicValue(lldb.eDynamicCanRunTarget)
- self.assertTrue(
- window.GetNumChildren() > 1,
- "NSWindow (static) only has 1 child!")
- self.assertTrue(
- window_dynamic.GetNumChildren() > 1,
- "NSWindow (dynamic) only has 1 child!")
- self.assertTrue(
- window.GetChildAtIndex(0).IsValid(),
- "NSWindow (static) has an invalid child")
- self.assertTrue(
- window_dynamic.GetChildAtIndex(0).IsValid(),
- "NSWindow (dynamic) has an invalid child")
- else:
- self.skipTest('no WindowServer connection')
diff --git a/packages/Python/lldbsuite/test/lang/objc/rdar-12408181/main.m b/packages/Python/lldbsuite/test/lang/objc/rdar-12408181/main.m
deleted file mode 100644
index 858ba2a4a22f..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/rdar-12408181/main.m
+++ /dev/null
@@ -1,24 +0,0 @@
-#import <Foundation/Foundation.h>
-#if defined (__i386__) || defined (__x86_64__)
-#import <Cocoa/Cocoa.h>
-#else
-#import <UIKit/UIKit.h>
-#endif
-
-int main (int argc, char const *argv[])
-{
- NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
-#if defined (__i386__) || defined (__x86_64__)
-
- [NSApplication sharedApplication];
- NSWindow* window = [[NSWindow alloc] initWithContentRect:NSMakeRect(0,0,100,100) styleMask:NSBorderlessWindowMask backing:NSBackingStoreRetained defer:NO];
- [window setCanHide:YES];
-#else
- [UIApplication sharedApplication];
- CGRect rect = { 0, 0, 100, 100};
- UIWindow* window = [[UIWindow alloc] initWithFrame:rect];
-#endif
- [pool release]; // Set breakpoint here.
- return 0;
-}
-
diff --git a/packages/Python/lldbsuite/test/lang/objc/real-definition/Bar.h b/packages/Python/lldbsuite/test/lang/objc/real-definition/Bar.h
deleted file mode 100644
index 5ee6acb2425e..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/real-definition/Bar.h
+++ /dev/null
@@ -1,12 +0,0 @@
-#import <Foundation/Foundation.h>
-
-@class InternalClass;
-
-@interface Bar : NSObject {
- @private
- InternalClass *storage;
-}
-
-- (NSString *)description;
-
-@end
diff --git a/packages/Python/lldbsuite/test/lang/objc/real-definition/Bar.m b/packages/Python/lldbsuite/test/lang/objc/real-definition/Bar.m
deleted file mode 100644
index 46d7e3888751..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/real-definition/Bar.m
+++ /dev/null
@@ -1,43 +0,0 @@
-#import "Bar.h"
-
-@interface InternalClass : NSObject {
- @public
- NSString *foo;
- NSString *bar;
-}
-@end
-
-@implementation InternalClass
-@end
-
-@interface Bar ()
-{
- NSString *_hidden_ivar;
-}
-
-@end
-
-@implementation Bar
-
-- (id)init
-{
- self = [super init];
- if (self) {
- _hidden_ivar = [NSString stringWithFormat:@"%p: @Bar", self];
- }
- return self; // Set breakpoint where Bar is an implementation
-}
-
-- (void)dealloc
-{
- [_hidden_ivar release];
- [super dealloc];
-}
-
-- (NSString *)description
-{
- return [_hidden_ivar copyWithZone:NULL];
-}
-
-@end
- \ No newline at end of file
diff --git a/packages/Python/lldbsuite/test/lang/objc/real-definition/Foo.h b/packages/Python/lldbsuite/test/lang/objc/real-definition/Foo.h
deleted file mode 100644
index d58da600765a..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/real-definition/Foo.h
+++ /dev/null
@@ -1,11 +0,0 @@
-#import <Foundation/Foundation.h>
-
-#import "Bar.h"
-
-@interface Foo : NSObject {
- Bar *_bar;
-}
-
-- (NSString *)description;
-
-@end
diff --git a/packages/Python/lldbsuite/test/lang/objc/real-definition/Foo.m b/packages/Python/lldbsuite/test/lang/objc/real-definition/Foo.m
deleted file mode 100644
index bcdeaeffc29a..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/real-definition/Foo.m
+++ /dev/null
@@ -1,25 +0,0 @@
-#import "Foo.h"
-
-@implementation Foo
-
-- (id)init
-{
- self = [super init];
- if (self) {
- _bar = [[Bar alloc] init];
- }
- return self; // Set breakpoint where Bar is an interface
-}
-
-- (void)dealloc
-{
- [_bar release];
- [super dealloc];
-}
-
-- (NSString *)description
-{
- return [NSString stringWithFormat:@"%p: @Foo { _bar = %@ }", self, _bar];
-}
-
-@end
diff --git a/packages/Python/lldbsuite/test/lang/objc/real-definition/Makefile b/packages/Python/lldbsuite/test/lang/objc/real-definition/Makefile
deleted file mode 100644
index 61cc3b3b6db8..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/real-definition/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-LEVEL = ../../../make
-
-OBJC_SOURCES := Bar.m Foo.m main.m
-LDFLAGS = $(CFLAGS) -lobjc -framework Foundation
-
-include $(LEVEL)/Makefile.rules
diff --git a/packages/Python/lldbsuite/test/lang/objc/real-definition/TestRealDefinition.py b/packages/Python/lldbsuite/test/lang/objc/real-definition/TestRealDefinition.py
deleted file mode 100644
index d4760079814a..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/real-definition/TestRealDefinition.py
+++ /dev/null
@@ -1,101 +0,0 @@
-"""Test that types defined in shared libraries work correctly."""
-
-from __future__ import print_function
-
-
-import os
-import time
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestRealDefinition(TestBase):
-
- mydir = TestBase.compute_mydir(__file__)
-
- @skipUnlessDarwin
- def test_frame_var_after_stop_at_interface(self):
- """Test that we can find the implementation for an objective C type"""
- if self.getArchitecture() == 'i386':
- self.skipTest("requires modern objc runtime")
- self.build()
- self.common_setup()
-
- line = line_number(
- 'Foo.m', '// Set breakpoint where Bar is an interface')
- lldbutil.run_break_set_by_file_and_line(
- self, 'Foo.m', line, num_expected_locations=1, loc_exact=True)
-
- self.runCmd("run", RUN_SUCCEEDED)
-
- # The stop reason of the thread should be breakpoint.
- self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
- substrs=['stopped',
- 'stop reason = breakpoint'])
-
- # Run and stop at Foo
- self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
- substrs=[' resolved, hit count = 1'])
-
- self.runCmd("continue", RUN_SUCCEEDED)
-
- # Run at stop at main
- self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
- substrs=[' resolved, hit count = 1'])
-
- # This should display correctly.
- self.expect(
- "frame variable foo->_bar->_hidden_ivar",
- VARIABLES_DISPLAYED_CORRECTLY,
- substrs=[
- "(NSString *)",
- "foo->_bar->_hidden_ivar = 0x"])
-
- @skipUnlessDarwin
- def test_frame_var_after_stop_at_implementation(self):
- """Test that we can find the implementation for an objective C type"""
- if self.getArchitecture() == 'i386':
- self.skipTest("requires modern objc runtime")
- self.build()
- self.common_setup()
-
- line = line_number(
- 'Bar.m', '// Set breakpoint where Bar is an implementation')
- lldbutil.run_break_set_by_file_and_line(
- self, 'Bar.m', line, num_expected_locations=1, loc_exact=True)
-
- self.runCmd("run", RUN_SUCCEEDED)
-
- # The stop reason of the thread should be breakpoint.
- self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
- substrs=['stopped',
- 'stop reason = breakpoint'])
-
- # Run and stop at Foo
- self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
- substrs=[' resolved, hit count = 1'])
-
- self.runCmd("continue", RUN_SUCCEEDED)
-
- # Run at stop at main
- self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
- substrs=[' resolved, hit count = 1'])
-
- # This should display correctly.
- self.expect(
- "frame variable foo->_bar->_hidden_ivar",
- VARIABLES_DISPLAYED_CORRECTLY,
- substrs=[
- "(NSString *)",
- "foo->_bar->_hidden_ivar = 0x"])
-
- def common_setup(self):
- exe = self.getBuildArtifact("a.out")
- self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
- # Break inside the foo function which takes a bar_ptr argument.
- line = line_number('main.m', '// Set breakpoint in main')
- lldbutil.run_break_set_by_file_and_line(
- self, "main.m", line, num_expected_locations=1, loc_exact=True)
diff --git a/packages/Python/lldbsuite/test/lang/objc/real-definition/main.m b/packages/Python/lldbsuite/test/lang/objc/real-definition/main.m
deleted file mode 100644
index 8c31dc9abb31..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/real-definition/main.m
+++ /dev/null
@@ -1,13 +0,0 @@
-#include <stdio.h>
-#include <stdint.h>
-#import <Foundation/Foundation.h>
-#import "Foo.h"
-
-int main (int argc, char const *argv[])
-{
- NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
- Foo *foo = [[Foo alloc] init];
- NSLog (@"foo is %@", foo); // Set breakpoint in main
- [pool release];
- return 0;
-}
diff --git a/packages/Python/lldbsuite/test/lang/objc/sample/Makefile b/packages/Python/lldbsuite/test/lang/objc/sample/Makefile
deleted file mode 100644
index a1608fe5a664..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/sample/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-LEVEL = ../../../make
-
-OBJC_SOURCES := main.m
-LDFLAGS = $(CFLAGS) -lobjc -framework Foundation
-
-include $(LEVEL)/Makefile.rules
diff --git a/packages/Python/lldbsuite/test/lang/objc/sample/main.m b/packages/Python/lldbsuite/test/lang/objc/sample/main.m
deleted file mode 100644
index 9dffc71aaac6..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/sample/main.m
+++ /dev/null
@@ -1,70 +0,0 @@
-#import <Foundation/Foundation.h>
-
-
-@interface MyString : NSObject {
- NSString *_string;
- NSDate *_date;
-}
-- (id)initWithNSString:(NSString *)string;
-
-@property (copy) NSString *string;
-@property (readonly,getter=getTheDate) NSDate *date;
-
-- (NSDate *) getTheDate;
-@end
-
-@implementation MyString
-
-@synthesize string = _string;
-@synthesize date = _date;
-
-- (id)initWithNSString:(NSString *)string
-{
- if (self = [super init])
- {
- _string = [NSString stringWithString:string];
- _date = [NSDate date];
- }
- return self;
-}
-
-- (void) dealloc
-{
- [_date release];
- [_string release];
- [super dealloc];
-}
-
-- (NSDate *) getTheDate
-{
- return _date;
-}
-
-- (NSString *)description
-{
- return [_string stringByAppendingFormat:@" with timestamp: %@", _date];
-}
-@end
-
-int main (int argc, char const *argv[])
-{
- NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
- static NSString *g_global_nsstr = @"Howdy";
-
- MyString *myStr = [[MyString alloc] initWithNSString: [NSString stringWithFormat:@"string %i", 1]];
- NSString *str1 = myStr.string;
- NSString *str2 = [NSString stringWithFormat:@"string %i", 2];
- NSString *str3 = [NSString stringWithFormat:@"string %i", 3];
- NSArray *array = [NSArray arrayWithObjects: str1, str2, str3, nil];
- NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys:
- str1, @"1",
- str2, @"2",
- str3, @"3",
- myStr.date, @"date",
- nil];
-
- id str_id = str1;
- SEL sel = @selector(length);
- [pool release];
- return 0;
-}
diff --git a/packages/Python/lldbsuite/test/lang/objc/self/Makefile b/packages/Python/lldbsuite/test/lang/objc/self/Makefile
deleted file mode 100644
index bdae30428be4..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/self/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-LEVEL = ../../../make
-
-OBJC_SOURCES := main.m
-LD_EXTRAS ?= -framework Foundation
-
-include $(LEVEL)/Makefile.rules
diff --git a/packages/Python/lldbsuite/test/lang/objc/self/TestObjCSelf.py b/packages/Python/lldbsuite/test/lang/objc/self/TestObjCSelf.py
deleted file mode 100644
index 81d6b79ad535..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/self/TestObjCSelf.py
+++ /dev/null
@@ -1,39 +0,0 @@
-"""
-Tests that ObjC member variables are available where they should be.
-"""
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ObjCSelfTestCase(TestBase):
-
- mydir = TestBase.compute_mydir(__file__)
-
- @skipUnlessDarwin
- def test_with_run_command(self):
- """Test that the appropriate member variables are available when stopped in Objective-C class and instance methods"""
- self.build()
- self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
- self.set_breakpoint(line_number('main.m', '// breakpoint 1'))
- self.set_breakpoint(line_number('main.m', '// breakpoint 2'))
-
- self.runCmd("process launch", RUN_SUCCEEDED)
-
- self.expect("expression -- m_a = 2",
- startstr="(int) $0 = 2")
-
- self.runCmd("process continue")
-
- # This would be disallowed if we enforced const. But we don't.
- self.expect("expression -- m_a = 2",
- error=True)
-
- self.expect("expression -- s_a",
- startstr="(int) $1 = 5")
-
- def set_breakpoint(self, line):
- lldbutil.run_break_set_by_file_and_line(
- self, "main.m", line, num_expected_locations=1, loc_exact=True)
diff --git a/packages/Python/lldbsuite/test/lang/objc/self/main.m b/packages/Python/lldbsuite/test/lang/objc/self/main.m
deleted file mode 100644
index 928aaf2ff024..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/self/main.m
+++ /dev/null
@@ -1,54 +0,0 @@
-//===-- main.m ------------------------------------------*- Objective-C -*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#import <Foundation/Foundation.h>
-
-@interface A : NSObject
-{
- int m_a;
-}
--(id)init;
--(void)accessMember:(int)a;
-+(void)accessStaticMember:(int)a;
-@end
-
-static int s_a = 5;
-
-@implementation A
--(id)init
-{
- self = [super init];
-
- if (self)
- m_a = 2;
-
- return self;
-}
-
--(void)accessMember:(int)a
-{
- m_a = a; // breakpoint 1
-}
-
-+(void)accessStaticMember:(int)a
-{
- s_a = a; // breakpoint 2
-}
-@end
-
-int main()
-{
- NSAutoreleasePool *pool = [NSAutoreleasePool alloc];
- A *my_a = [[A alloc] init];
-
- [my_a accessMember:3];
- [A accessStaticMember:5];
-
- [pool release];
-}
diff --git a/packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/Makefile b/packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/Makefile
deleted file mode 100644
index ad3cb3fadcde..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-LEVEL = ../../../make
-
-OBJC_SOURCES := main.m
-
-include $(LEVEL)/Makefile.rules
-
-LDFLAGS += -framework Foundation
diff --git a/packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/TestObjCSingleEntryDictionary.py b/packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/TestObjCSingleEntryDictionary.py
deleted file mode 100644
index 21f0892044ad..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/TestObjCSingleEntryDictionary.py
+++ /dev/null
@@ -1,79 +0,0 @@
-"""Test that we properly vend children for a single entry NSDictionary"""
-
-from __future__ import print_function
-
-
-import unittest2
-import os
-import time
-import platform
-
-from distutils.version import StrictVersion
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ObjCSingleEntryDictionaryTestCase(TestBase):
-
- mydir = TestBase.compute_mydir(__file__)
-
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
- # Find the line number to break inside main().
- self.line = line_number('main.m', '// break here')
-
- @skipUnlessDarwin
- @expectedFailureAll(oslist=['watchos'], bugnumber="rdar://problem/34642736") # bug in NSDictionary formatting on watchos
- def test_single_entry_dict(self):
- self.build()
- exe = self.getBuildArtifact("a.out")
- self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
- # Break inside the foo function which takes a bar_ptr argument.
- lldbutil.run_break_set_by_file_and_line(
- self, "main.m", self.line, num_expected_locations=1, loc_exact=True)
-
- self.runCmd("run", RUN_SUCCEEDED)
-
- # The stop reason of the thread should be breakpoint.
- self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
- substrs=['stopped',
- 'stop reason = breakpoint'])
-
- # The breakpoint should have a hit count of 1.
- self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
- substrs=[' resolved, hit count = 1'])
-
- d1 = self.frame().FindVariable("d1")
- d1.SetPreferSyntheticValue(True)
- d1.SetPreferDynamicValue(lldb.eDynamicCanRunTarget)
-
- self.assertTrue(
- d1.GetNumChildren() == 1,
- "dictionary has != 1 child elements")
- pair = d1.GetChildAtIndex(0)
- pair.SetPreferSyntheticValue(True)
- pair.SetPreferDynamicValue(lldb.eDynamicCanRunTarget)
-
- self.assertTrue(
- pair.GetNumChildren() == 2,
- "pair has != 2 child elements")
-
- key = pair.GetChildMemberWithName("key")
- value = pair.GetChildMemberWithName("value")
-
- key.SetPreferSyntheticValue(True)
- key.SetPreferDynamicValue(lldb.eDynamicCanRunTarget)
- value.SetPreferSyntheticValue(True)
- value.SetPreferDynamicValue(lldb.eDynamicCanRunTarget)
-
- self.assertTrue(
- key.GetSummary() == '@"key"',
- "key doesn't contain key")
- self.assertTrue(
- value.GetSummary() == '@"value"',
- "value doesn't contain value")
diff --git a/packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/main.m b/packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/main.m
deleted file mode 100644
index be472fd43c3d..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/main.m
+++ /dev/null
@@ -1,7 +0,0 @@
-#import <Foundation/Foundation.h>
-
-int main() {
- NSDictionary *d1 = @{@"key" : @"value"};
- NSLog(@"%@\n", d1); // break here
- return 0;
-}
diff --git a/packages/Python/lldbsuite/test/lang/objc/unicode-string/TestUnicodeString.py b/packages/Python/lldbsuite/test/lang/objc/unicode-string/TestUnicodeString.py
deleted file mode 100644
index c9986aafd7d1..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/unicode-string/TestUnicodeString.py
+++ /dev/null
@@ -1,6 +0,0 @@
-from lldbsuite.test import lldbinline
-from lldbsuite.test import decorators
-
-lldbinline.MakeInlineTest(
- __file__, globals(), [
- decorators.skipUnlessDarwin])
diff --git a/packages/Python/lldbsuite/test/lang/objc/unicode-string/main.m b/packages/Python/lldbsuite/test/lang/objc/unicode-string/main.m
deleted file mode 100644
index e55eb1ede9b4..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/unicode-string/main.m
+++ /dev/null
@@ -1,5 +0,0 @@
-#import <Foundation/Foundation.h>
-
-int main() {
- NSLog(@"凸"); //% self.expect("po @\"凹\"", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["凹"])
-}
diff --git a/packages/Python/lldbsuite/test/lang/objc/variadic_methods/TestVariadicMethods.py b/packages/Python/lldbsuite/test/lang/objc/variadic_methods/TestVariadicMethods.py
deleted file mode 100644
index 804905106dfc..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/variadic_methods/TestVariadicMethods.py
+++ /dev/null
@@ -1,6 +0,0 @@
-from lldbsuite.test import lldbinline
-from lldbsuite.test import decorators
-
-lldbinline.MakeInlineTest(
- __file__, globals(), [
- decorators.skipIfFreeBSD, decorators.skipIfLinux, decorators.skipIfWindows])
diff --git a/packages/Python/lldbsuite/test/lang/objc/variadic_methods/main.m b/packages/Python/lldbsuite/test/lang/objc/variadic_methods/main.m
deleted file mode 100644
index f48710e880f3..000000000000
--- a/packages/Python/lldbsuite/test/lang/objc/variadic_methods/main.m
+++ /dev/null
@@ -1,31 +0,0 @@
-//===-- main.m -------------------------------------------*- Objective-C-*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#import <Foundation/Foundation.h>
-
-@interface VarClass : NSObject
-- (id) lottaArgs: (id) first, ...;
-@end
-
-@implementation VarClass
-- (id) lottaArgs: (id) first, ...
-{
- return first;
-}
-@end
-
-int
-main()
-{
- VarClass *my_var = [[VarClass alloc] init];
- id something = [my_var lottaArgs: @"111", @"222", nil];
- NSLog (@"%@ - %@", my_var, something); //% self.expect("expression -O -- [my_var lottaArgs:@\"111\", @\"222\", nil]", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["111"])
- return 0;
-}
-