summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite
diff options
context:
space:
mode:
authorEugene Zemtsov <ezemtsov@google.com>2018-01-11 03:46:35 +0000
committerEugene Zemtsov <ezemtsov@google.com>2018-01-11 03:46:35 +0000
commitb7386d994335452f7657fb9e6335eab8477544ca (patch)
treecb601ea73a7cb69a1e25bc028546ae43fc494e48 /lldb/packages/Python/lldbsuite
parent20a745375c6aebc03432a25868472794de411f62 (diff)
downloadbcm5719-llvm-b7386d994335452f7657fb9e6335eab8477544ca.tar.gz
bcm5719-llvm-b7386d994335452f7657fb9e6335eab8477544ca.zip
Advanced guessing of rendezvous breakpoint (resubmit)
When rendezvous structure is not initialized we need to set up rendezvous breakpoint anyway. In this case the code will locate dynamic loader (interpreter) and look for known function names. This is r322209, but with fixed VDSO loading fixed. Bug: https://bugs.llvm.org/show_bug.cgi?id=25806 Differential Revision: https://reviews.llvm.org/D41533 llvm-svn: 322251
Diffstat (limited to 'lldb/packages/Python/lldbsuite')
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/global_constructor/TestBreakpointInGlobalConstructor.py16
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/load_unload/TestLoadUnload.py13
2 files changed, 14 insertions, 15 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/global_constructor/TestBreakpointInGlobalConstructor.py b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/global_constructor/TestBreakpointInGlobalConstructor.py
index 4dfa03d5fab..236912b1f18 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/global_constructor/TestBreakpointInGlobalConstructor.py
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/global_constructor/TestBreakpointInGlobalConstructor.py
@@ -17,23 +17,23 @@ class TestBreakpointInGlobalConstructors(TestBase):
mydir = TestBase.compute_mydir(__file__)
NO_DEBUG_INFO_TESTCASE = True
- def setUp(self):
- TestBase.setUp(self)
+ def test(self):
+ self.build()
self.line_foo = line_number('foo.cpp', '// !BR_foo')
self.line_main = line_number('main.cpp', '// !BR_main')
- @expectedFailureAll(bugnumber="llvm.org/pr35480", oslist=["linux"])
- def test(self):
- self.build()
- exe = os.path.join(os.getcwd(), "a.out")
- self.runCmd("file %s" % exe)
+ target = self.dbg.CreateTarget("a.out")
+ self.assertTrue(target, VALID_TARGET)
+
+ env= self.registerSharedLibrariesWithTarget(target, ["foo"])
bp_main = lldbutil.run_break_set_by_file_and_line(
self, 'main.cpp', self.line_main)
bp_foo = lldbutil.run_break_set_by_file_and_line(
self, 'foo.cpp', self.line_foo)
- self.runCmd("run")
+ process = target.LaunchSimple(
+ None, env, self.get_process_working_directory())
self.assertIsNotNone(
lldbutil.get_one_thread_stopped_at_breakpoint_id(
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/TestLoadUnload.py b/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/TestLoadUnload.py
index 98b0c9ca197..69df35b730e 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/TestLoadUnload.py
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/TestLoadUnload.py
@@ -368,7 +368,6 @@ class LoadUnloadTestCase(TestBase):
@skipIfFreeBSD # llvm.org/pr14424 - missing FreeBSD Makefiles/testcase support
@skipIfWindows # Windows doesn't have dlopen and friends, dynamic libraries work differently
- @unittest2.expectedFailure("llvm.org/pr25806")
def test_static_init_during_load(self):
"""Test that we can set breakpoints correctly in static initializers"""
@@ -395,19 +394,19 @@ class LoadUnloadTestCase(TestBase):
self.runCmd("continue")
self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
substrs=['stopped',
- 'a_init',
- 'stop reason = breakpoint %d' % a_init_bp_num])
+ 'b_init',
+ 'stop reason = breakpoint %d' % b_init_bp_num])
self.expect("thread backtrace",
- substrs=['a_init',
+ substrs=['b_init',
'dlopen',
'main'])
self.runCmd("continue")
self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
substrs=['stopped',
- 'b_init',
- 'stop reason = breakpoint %d' % b_init_bp_num])
+ 'a_init',
+ 'stop reason = breakpoint %d' % a_init_bp_num])
self.expect("thread backtrace",
- substrs=['b_init',
+ substrs=['a_init',
'dlopen',
'main'])
OpenPOWER on IntegriCloud