summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test')
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/global_constructor/Makefile1
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/move_nearest/Makefile1
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/load_unload/a.mk3
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/load_unload/b.mk2
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/load_unload/c.mk2
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/load_unload/d.mk2
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/load_unload/hidden/Makefile2
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/pre_run_dylibs/Makefile2
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/process_attach/TestProcessAttach.py2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/One.mk2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/Two.mk2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/c/shared_lib/Makefile1
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/c/shared_lib_stripped_symbols/Makefile1
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/c/tls_globals/Makefile1
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/a.mk2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/b.mk2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lldbtest.py8
-rw-r--r--lldb/packages/Python/lldbsuite/test/make/Makefile.rules5
-rw-r--r--lldb/packages/Python/lldbsuite/test/python_api/process/read-mem-cstring/TestReadMemCString.py10
19 files changed, 15 insertions, 36 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/global_constructor/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/global_constructor/Makefile
index 801c1041bbe..06ef85cf908 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/global_constructor/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/global_constructor/Makefile
@@ -3,6 +3,5 @@ LEVEL = ../../../make
DYLIB_NAME := foo
DYLIB_CXX_SOURCES := foo.cpp
CXX_SOURCES := main.cpp
-CFLAGS_EXTRAS := -fPIC
include $(LEVEL)/Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/move_nearest/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/move_nearest/Makefile
index e7a1cab7e19..06ef85cf908 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/move_nearest/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/move_nearest/Makefile
@@ -3,6 +3,5 @@ LEVEL = ../../../make
DYLIB_NAME := foo
DYLIB_CXX_SOURCES := foo.cpp
CXX_SOURCES := main.cpp
-CFLAGS_EXTRAS += -fPIC
include $(LEVEL)/Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/a.mk b/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/a.mk
index 9b30db77171..fddca925dea 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/a.mk
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/a.mk
@@ -2,15 +2,12 @@ LEVEL := ../../make
LIB_PREFIX := loadunload_
-CFLAGS_EXTRAS := -fPIC
LD_EXTRAS := -L. -l$(LIB_PREFIX)b
DYLIB_NAME := $(LIB_PREFIX)a
DYLIB_CXX_SOURCES := a.cpp
DYLIB_ONLY := YES
-CXXFLAGS += -fPIC
-
include $(LEVEL)/Makefile.rules
$(DYLIB_FILENAME): lib_b
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/b.mk b/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/b.mk
index c1b0877d72a..2fcdbea3a1c 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/b.mk
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/b.mk
@@ -6,6 +6,4 @@ DYLIB_NAME := $(LIB_PREFIX)b
DYLIB_CXX_SOURCES := b.cpp
DYLIB_ONLY := YES
-CXXFLAGS += -fPIC
-
include $(LEVEL)/Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/c.mk b/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/c.mk
index 5b5691efeef..d40949b1463 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/c.mk
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/c.mk
@@ -6,6 +6,4 @@ DYLIB_NAME := $(LIB_PREFIX)c
DYLIB_CXX_SOURCES := c.cpp
DYLIB_ONLY := YES
-CXXFLAGS += -fPIC
-
include $(LEVEL)/Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/d.mk b/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/d.mk
index b6b6eeacba2..a5db3c7c31f 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/d.mk
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/d.mk
@@ -8,6 +8,4 @@ DYLIB_NAME := $(LIB_PREFIX)d
DYLIB_CXX_SOURCES := d.cpp
DYLIB_ONLY := YES
-CXXFLAGS += -fPIC
-
include $(LEVEL)/Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/hidden/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/hidden/Makefile
index f84d8300843..271117a0ad8 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/hidden/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/hidden/Makefile
@@ -6,6 +6,4 @@ DYLIB_NAME := $(LIB_PREFIX)d
DYLIB_CXX_SOURCES := d.cpp
DYLIB_ONLY := YES
-CXXFLAGS += -fPIC
-
include $(LEVEL)/Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/pre_run_dylibs/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/pre_run_dylibs/Makefile
index c4855ca9b12..624a6e1584e 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/pre_run_dylibs/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/pre_run_dylibs/Makefile
@@ -3,6 +3,4 @@ LEVEL = ../../make
DYLIB_NAME := unlikely_name
DYLIB_CXX_SOURCES := foo.cpp
CXX_SOURCES := main.cpp
-CFLAGS_EXTRAS += -fPIC
-
include $(LEVEL)/Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/process_attach/TestProcessAttach.py b/lldb/packages/Python/lldbsuite/test/functionalities/process_attach/TestProcessAttach.py
index 94a013b53ce..617b4bcfaec 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/process_attach/TestProcessAttach.py
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/process_attach/TestProcessAttach.py
@@ -46,7 +46,7 @@ class ProcessAttachTestCase(TestBase):
newdir = self.getBuildArtifact("newdir")
try:
os.mkdir(newdir)
- except OSError, e:
+ except OSError as e:
if e.errno != os.errno.EEXIST:
raise
testdir = self.getBuildDir()
diff --git a/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/One.mk b/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/One.mk
index eb68a402b1b..130c7dd511b 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/One.mk
+++ b/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/One.mk
@@ -6,7 +6,5 @@ DYLIB_ONLY := YES
include $(LEVEL)/Makefile.rules
-CFLAGS_EXTRAS += -fPIC
-
OneConstant.o: OneConstant.c
$(CC) $(CFLAGS_NO_DEBUG) -c $< -o $@
diff --git a/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/Two.mk b/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/Two.mk
index 634fb1dc0fa..ebe58cc743f 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/Two.mk
+++ b/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/Two.mk
@@ -6,7 +6,5 @@ DYLIB_ONLY := YES
include $(LEVEL)/Makefile.rules
-CFLAGS_EXTRAS += -fPIC
-
TwoConstant.o: TwoConstant.c
$(CC) $(CFLAGS_NO_DEBUG) -c $< -o $@
diff --git a/lldb/packages/Python/lldbsuite/test/lang/c/shared_lib/Makefile b/lldb/packages/Python/lldbsuite/test/lang/c/shared_lib/Makefile
index 854002e6470..35d712c3f17 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/c/shared_lib/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/lang/c/shared_lib/Makefile
@@ -3,6 +3,5 @@ LEVEL = ../../../make
DYLIB_NAME := foo
DYLIB_C_SOURCES := foo.c
C_SOURCES := main.c
-CFLAGS_EXTRAS += -fPIC
include $(LEVEL)/Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/lang/c/shared_lib_stripped_symbols/Makefile b/lldb/packages/Python/lldbsuite/test/lang/c/shared_lib_stripped_symbols/Makefile
index 51347d73f09..6d1f1071bf2 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/c/shared_lib_stripped_symbols/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/lang/c/shared_lib_stripped_symbols/Makefile
@@ -3,7 +3,6 @@ LEVEL = ../../../make
DYLIB_NAME := foo
DYLIB_C_SOURCES := foo.c
C_SOURCES := main.c
-CFLAGS_EXTRAS += -fPIC
SPLIT_DEBUG_SYMBOLS = YES
diff --git a/lldb/packages/Python/lldbsuite/test/lang/c/tls_globals/Makefile b/lldb/packages/Python/lldbsuite/test/lang/c/tls_globals/Makefile
index 90affed8e3a..0faad10b24a 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/c/tls_globals/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/lang/c/tls_globals/Makefile
@@ -1,7 +1,6 @@
LEVEL = ../../../make
C_SOURCES := main.c
-CFLAGS_EXTRAS += -fPIC
DYLIB_NAME := a
DYLIB_C_SOURCES := a.c
diff --git a/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/a.mk b/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/a.mk
index 5943e5077c5..e53570873a3 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/a.mk
+++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/a.mk
@@ -4,6 +4,4 @@ DYLIB_NAME := a
DYLIB_CXX_SOURCES := a.cpp
DYLIB_ONLY := YES
-CXXFLAGS += -fPIC
-
include $(LEVEL)/Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/b.mk b/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/b.mk
index 8ee2a13b129..54a1d8dea5a 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/b.mk
+++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/b.mk
@@ -4,6 +4,4 @@ DYLIB_NAME := b
DYLIB_CXX_SOURCES := b.cpp
DYLIB_ONLY := YES
-CXXFLAGS += -fPIC
-
include $(LEVEL)/Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/lldbtest.py b/lldb/packages/Python/lldbsuite/test/lldbtest.py
index e202dc2180a..40d46a5fb0e 100644
--- a/lldb/packages/Python/lldbsuite/test/lldbtest.py
+++ b/lldb/packages/Python/lldbsuite/test/lldbtest.py
@@ -1478,10 +1478,10 @@ class Base(unittest2.TestCase):
d = {
'DYLIB_CXX_SOURCES': sources,
'DYLIB_NAME': lib_name,
- 'CFLAGS_EXTRAS': "%s -I%s -fPIC" % (stdflag,
- os.path.join(
- os.environ["LLDB_SRC"],
- "include")),
+ 'CFLAGS_EXTRAS': "%s -I%s " % (stdflag,
+ os.path.join(
+ os.environ["LLDB_SRC"],
+ "include")),
'LD_EXTRAS': "-shared -l%s\liblldb.lib" % self.os.environ["LLDB_IMPLIB_DIR"]}
if self.TraceOn():
print(
diff --git a/lldb/packages/Python/lldbsuite/test/make/Makefile.rules b/lldb/packages/Python/lldbsuite/test/make/Makefile.rules
index 196c8fbcb84..6b9cc9c7e02 100644
--- a/lldb/packages/Python/lldbsuite/test/make/Makefile.rules
+++ b/lldb/packages/Python/lldbsuite/test/make/Makefile.rules
@@ -544,6 +544,11 @@ endif
#----------------------------------------------------------------------
$(DYLIB_OBJECTS) : CFLAGS += -DCOMPILING_LLDB_TEST_DLL
+ifneq "$(OS)" "Windows_NT"
+$(DYLIB_OBJECTS) : CFLAGS += -fPIC
+$(DYLIB_OBJECTS) : CXXFLAGS += -fPIC
+endif
+
$(DYLIB_FILENAME) : $(DYLIB_OBJECTS)
ifeq "$(OS)" "Darwin"
$(LD) $(DYLIB_OBJECTS) $(LDFLAGS) -install_name "$(DYLIB_EXECUTABLE_PATH)/$(DYLIB_FILENAME)" -dynamiclib -o "$(DYLIB_FILENAME)"
diff --git a/lldb/packages/Python/lldbsuite/test/python_api/process/read-mem-cstring/TestReadMemCString.py b/lldb/packages/Python/lldbsuite/test/python_api/process/read-mem-cstring/TestReadMemCString.py
index 7abcf81a069..b03cebce48c 100644
--- a/lldb/packages/Python/lldbsuite/test/python_api/process/read-mem-cstring/TestReadMemCString.py
+++ b/lldb/packages/Python/lldbsuite/test/python_api/process/read-mem-cstring/TestReadMemCString.py
@@ -17,19 +17,19 @@ class TestReadMemCString(TestBase):
def test_read_memory_c_string(self):
"""Test corner case behavior of SBProcess::ReadCStringFromMemory"""
self.build()
- self.dbg.SetAsync(False)
+ self.dbg.SetAsync(False)
self.main_source = "main.c"
self.main_source_path = os.path.join(self.getSourceDir(),
self.main_source)
- self.main_source_spec = lldb.SBFileSpec(self.main_source_path)
- self.exe = self.getBuildArtifact("read-mem-cstring")
+ self.main_source_spec = lldb.SBFileSpec(self.main_source_path)
+ self.exe = self.getBuildArtifact("read-mem-cstring")
(target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(
self, 'breakpoint here', self.main_source_spec, None, self.exe)
- frame = thread.GetFrameAtIndex(0)
-
+ frame = thread.GetFrameAtIndex(0)
+
err = lldb.SBError()
empty_str_addr = frame.FindVariable("empty_string").GetValueAsUnsigned(err)
OpenPOWER on IntegriCloud