summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test
diff options
context:
space:
mode:
authorAdrian McCarthy <amccarth@google.com>2017-09-18 15:59:44 +0000
committerAdrian McCarthy <amccarth@google.com>2017-09-18 15:59:44 +0000
commit8f31dc9754cc849db093494abbe4c574adb8cdbb (patch)
tree7f3a62320c56a09cde2bb0456012ee60eeb18cd8 /lldb/packages/Python/lldbsuite/test
parent25c6d26131ac830282ef78556e408f89b4c64a9e (diff)
downloadbcm5719-llvm-8f31dc9754cc849db093494abbe4c574adb8cdbb.tar.gz
bcm5719-llvm-8f31dc9754cc849db093494abbe4c574adb8cdbb.zip
Revert "Fix for bug 34532 - A few rough corners related to post-mortem debugging (core/minidump)"
Broke Windows and FreeBSD (at least). This reverts commit 628ca7052b4a5dbace0f6205409113e12c8a78fa. llvm-svn: 313540
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test')
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/TestLinuxCore.py30
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/TestMiniDumpNew.py39
2 files changed, 3 insertions, 66 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/TestLinuxCore.py b/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/TestLinuxCore.py
index 1c0d8f59a36..3a148fbe746 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/TestLinuxCore.py
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/TestLinuxCore.py
@@ -244,34 +244,6 @@ class LinuxCoreTestCase(TestBase):
end_region.GetRegionBase())
self.assertEqual(end_region.GetRegionEnd(), lldb.LLDB_INVALID_ADDRESS)
- def check_state(self, process):
- with open(os.devnull) as devnul:
- # sanitize test output
- self.dbg.SetOutputFileHandle(devnul, False)
- self.dbg.SetErrorFileHandle(devnul, False)
-
- self.assertTrue(process.is_stopped)
-
- # Process.Continue
- error = process.Continue()
- self.assertFalse(error.Success())
- self.assertTrue(process.is_stopped)
-
- # Thread.StepOut
- thread = process.GetSelectedThread()
- thread.StepOut()
- self.assertTrue(process.is_stopped)
-
- # command line
- self.dbg.HandleCommand('s')
- self.assertTrue(process.is_stopped)
- self.dbg.HandleCommand('c')
- self.assertTrue(process.is_stopped)
-
- # restore file handles
- self.dbg.SetOutputFileHandle(None, False)
- self.dbg.SetErrorFileHandle(None, False)
-
def do_test(self, filename, pid, region_count):
target = self.dbg.CreateTarget(filename + ".out")
process = target.LoadCore(filename + ".core")
@@ -279,8 +251,6 @@ class LinuxCoreTestCase(TestBase):
self.assertEqual(process.GetNumThreads(), 1)
self.assertEqual(process.GetProcessID(), pid)
- self.check_state(process)
-
thread = process.GetSelectedThread()
self.assertTrue(thread)
self.assertEqual(thread.GetThreadID(), pid)
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/TestMiniDumpNew.py b/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/TestMiniDumpNew.py
index 178bb678df7..9becd875631 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/TestMiniDumpNew.py
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/TestMiniDumpNew.py
@@ -31,34 +31,6 @@ class MiniDumpNewTestCase(TestBase):
lldb.DBG.SetSelectedPlatform(self._initial_platform)
super(MiniDumpNewTestCase, self).tearDown()
- def check_state(self):
- with open(os.devnull) as devnul:
- # sanitize test output
- self.dbg.SetOutputFileHandle(devnul, False)
- self.dbg.SetErrorFileHandle(devnul, False)
-
- self.assertTrue(self.process.is_stopped)
-
- # Process.Continue
- error = self.process.Continue()
- self.assertFalse(error.Success())
- self.assertTrue(self.process.is_stopped)
-
- # Thread.StepOut
- thread = self.process.GetSelectedThread()
- thread.StepOut()
- self.assertTrue(self.process.is_stopped)
-
- # command line
- self.dbg.HandleCommand('s')
- self.assertTrue(self.process.is_stopped)
- self.dbg.HandleCommand('c')
- self.assertTrue(self.process.is_stopped)
-
- # restore file handles
- self.dbg.SetOutputFileHandle(None, False)
- self.dbg.SetErrorFileHandle(None, False)
-
def test_process_info_in_minidump(self):
"""Test that lldb can read the process information from the Minidump."""
# target create -c linux-x86_64.dmp
@@ -68,7 +40,6 @@ class MiniDumpNewTestCase(TestBase):
self.assertTrue(self.process, PROCESS_IS_VALID)
self.assertEqual(self.process.GetNumThreads(), 1)
self.assertEqual(self.process.GetProcessID(), self._linux_x86_64_pid)
- self.check_state()
def test_thread_info_in_minidump(self):
"""Test that lldb can read the thread information from the Minidump."""
@@ -76,7 +47,6 @@ class MiniDumpNewTestCase(TestBase):
self.dbg.CreateTarget(None)
self.target = self.dbg.GetSelectedTarget()
self.process = self.target.LoadCore("linux-x86_64.dmp")
- self.check_state()
# This process crashed due to a segmentation fault in its
# one and only thread.
self.assertEqual(self.process.GetNumThreads(), 1)
@@ -91,7 +61,6 @@ class MiniDumpNewTestCase(TestBase):
self.dbg.CreateTarget("linux-x86_64")
self.target = self.dbg.GetSelectedTarget()
self.process = self.target.LoadCore("linux-x86_64.dmp")
- self.check_state()
self.assertEqual(self.process.GetNumThreads(), 1)
self.assertEqual(self.process.GetProcessID(), self._linux_x86_64_pid)
thread = self.process.GetThreadAtIndex(0)
@@ -112,7 +81,6 @@ class MiniDumpNewTestCase(TestBase):
self.dbg.CreateTarget(None)
self.target = self.dbg.GetSelectedTarget()
self.process = self.target.LoadCore("linux-x86_64_not_crashed.dmp")
- self.check_state()
self.assertEqual(self.process.GetNumThreads(), 1)
thread = self.process.GetThreadAtIndex(0)
self.assertEqual(thread.GetStopReason(), lldb.eStopReasonNone)
@@ -193,10 +161,9 @@ class MiniDumpNewTestCase(TestBase):
"""Test that we can examine local variables in a Minidump."""
# Launch with the Minidump, and inspect a local variable.
# target create linux-x86_64_not_crashed -c linux-x86_64_not_crashed.dmp
- self.target = self.dbg.CreateTarget("linux-x86_64_not_crashed")
- self.process = self.target.LoadCore("linux-x86_64_not_crashed.dmp")
- self.check_state()
- thread = self.process.GetThreadAtIndex(0)
+ target = self.dbg.CreateTarget("linux-x86_64_not_crashed")
+ process = target.LoadCore("linux-x86_64_not_crashed.dmp")
+ thread = process.GetThreadAtIndex(0)
frame = thread.GetFrameAtIndex(1)
value = frame.EvaluateExpression('x')
self.assertEqual(value.GetValueAsSigned(), 3)
OpenPOWER on IntegriCloud