summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2018-11-18 20:48:25 +0000
committerZachary Turner <zturner@google.com>2018-11-18 20:48:25 +0000
commitf8610fc4e72d15c5a412517039b14864e22e0c22 (patch)
treebaa569e7bcde9467a65d2d40c9b7d196b59546ad /lldb/packages/Python/lldbsuite
parentb31bdbd2e912f3b814ebd286131c5da64bb4bff9 (diff)
downloadbcm5719-llvm-f8610fc4e72d15c5a412517039b14864e22e0c22.tar.gz
bcm5719-llvm-f8610fc4e72d15c5a412517039b14864e22e0c22.zip
Revert "Implement basic DidAttach and DidLaunch for DynamicLoaderWindowsDYLD"
This breaks many tests on Windows, which now all fail with an error such as "Unable to read memory at address <xxxxxxxx>". llvm-svn: 347174
Diffstat (limited to 'lldb/packages/Python/lldbsuite')
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/windows_dyld/Makefile14
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/windows_dyld/TestWindowsDYLD.py42
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/windows_dyld/dllfunc.c19
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/windows_dyld/dllfunc.mk7
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/windows_dyld/main.c19
-rw-r--r--lldb/packages/Python/lldbsuite/test/make/Makefile.rules4
6 files changed, 2 insertions, 103 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/windows_dyld/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/windows_dyld/Makefile
deleted file mode 100644
index 8289e159fc7..00000000000
--- a/lldb/packages/Python/lldbsuite/test/functionalities/windows_dyld/Makefile
+++ /dev/null
@@ -1,14 +0,0 @@
-LEVEL := ../../make
-
-LD_EXTRAS := -ldllfunc
-C_SOURCES := main.c
-
-include $(LEVEL)/Makefile.rules
-
-a.out: dllfunc
-
-dllfunc:
- $(MAKE) VERBOSE=1 VPATH=$(SRCDIR) -I $(SRCDIR) -f $(SRCDIR)/dllfunc.mk
-
-clean::
- $(MAKE) -f $(SRCDIR)/dllfunc.mk clean
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/windows_dyld/TestWindowsDYLD.py b/lldb/packages/Python/lldbsuite/test/functionalities/windows_dyld/TestWindowsDYLD.py
deleted file mode 100644
index 77d4e710908..00000000000
--- a/lldb/packages/Python/lldbsuite/test/functionalities/windows_dyld/TestWindowsDYLD.py
+++ /dev/null
@@ -1,42 +0,0 @@
-"""
-Test that breakpoints work in a DLL
-"""
-
-from __future__ import print_function
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-@skipUnlessWindows
-class WindowsDLLTestCase(TestBase):
- def setUP(self):
- TestBase.setUp(self)
- self.build()
-
- def test_dll_linking(self):
- """test that the debugger works with DLLs"""
-
- exe = self.getBuildArtifact("a.out")
- target = self.dbg.CreateTarget(exe)
- self.assertTrue(target and target.IsValid(), "Target is valid")
-
- self.runCmd("breakpoint set --file main.c --line 16")
- self.runCmd("breakpoint set --file dllfunc.c --line 18")
-
- process = target.LaunchSimple(None, None, self.get_process_working_directory())
-
- self.expect("p x", "16")
- self.runCmd("thread step-out")
- self.expect("p x", "16")
- self.expect("thread step-in")
- self.expect("thread step-in")
- self.expect("p n", "8")
- self.runCmd("c")
- self.expect("p x", "64")
- self.runCmd("breakpoint delete 2")
- self.runCmd("c")
-
- self.assertEqual(process.GetExitStatus(), 336, PROCESS_EXITED)
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/windows_dyld/dllfunc.c b/lldb/packages/Python/lldbsuite/test/functionalities/windows_dyld/dllfunc.c
deleted file mode 100644
index aadf4e34a86..00000000000
--- a/lldb/packages/Python/lldbsuite/test/functionalities/windows_dyld/dllfunc.c
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- a.c -----------------------------------------------------*- C++ -*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#include <windows.h>
-
-BOOL WINAPI DllMain(HINSTANCE h, DWORD reason, void* reserved) {
- return TRUE;
-}
-
-int __declspec(dllexport) DllFunc(int n) {
- int x = n * n;
- return x; // set breakpoint here
-}
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/windows_dyld/dllfunc.mk b/lldb/packages/Python/lldbsuite/test/functionalities/windows_dyld/dllfunc.mk
deleted file mode 100644
index f282344d36a..00000000000
--- a/lldb/packages/Python/lldbsuite/test/functionalities/windows_dyld/dllfunc.mk
+++ /dev/null
@@ -1,7 +0,0 @@
-LEVEL := ../../make
-
-DYLIB_NAME := dllfunc
-DYLIB_C_SOURCES := dllfunc.c
-DYLIB_ONLY := YES
-
-include $(LEVEL)/Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/windows_dyld/main.c b/lldb/packages/Python/lldbsuite/test/functionalities/windows_dyld/main.c
deleted file mode 100644
index 4b62744fbd0..00000000000
--- a/lldb/packages/Python/lldbsuite/test/functionalities/windows_dyld/main.c
+++ /dev/null
@@ -1,19 +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.
-//
-//===----------------------------------------------------------------------===//
-
-#include <windows.h>
-
-int __declspec(dllimport) DllFunc(int n);
-
-int main(int argc, char ** argv) {
- int x = DllFunc(4);
- int y = DllFunc(8); // set breakpoint here
- int z = DllFunc(16);
- return x + y + z;
-}
diff --git a/lldb/packages/Python/lldbsuite/test/make/Makefile.rules b/lldb/packages/Python/lldbsuite/test/make/Makefile.rules
index 90e1bf71cff..f38ee5b1e2e 100644
--- a/lldb/packages/Python/lldbsuite/test/make/Makefile.rules
+++ b/lldb/packages/Python/lldbsuite/test/make/Makefile.rules
@@ -535,7 +535,7 @@ EXE = $(DYLIB_FILENAME)
endif
else
$(EXE) : $(OBJECTS) $(ARCHIVE_NAME)
- "$(LD)" $(OBJECTS) $(LDFLAGS) $(ARCHIVE_NAME) -o "$(EXE)"
+ $(LD) $(OBJECTS) $(LDFLAGS) $(ARCHIVE_NAME) -o "$(EXE)"
ifneq "$(CODESIGN)" ""
$(CODESIGN) -s - "$(EXE)"
endif
@@ -592,7 +592,7 @@ ifneq "$(DS)" ""
endif
endif
else
- "$(LD)" $(DYLIB_OBJECTS) $(LDFLAGS) -shared -o "$(DYLIB_FILENAME)"
+ $(LD) $(DYLIB_OBJECTS) $(LDFLAGS) -shared -o "$(DYLIB_FILENAME)"
ifeq "$(SPLIT_DEBUG_SYMBOLS)" "YES"
$(OBJCOPY) --only-keep-debug "$(DYLIB_FILENAME)" "$(DYLIB_FILENAME).debug"
$(OBJCOPY) --strip-debug --add-gnu-debuglink="$(DYLIB_FILENAME).debug" "$(DYLIB_FILENAME)" "$(DYLIB_FILENAME)"
OpenPOWER on IntegriCloud