summaryrefslogtreecommitdiffstats
path: root/lldb/test/functionalities/inferior-assert/TestInferiorAssert.py
diff options
context:
space:
mode:
authorRavitheja Addepally <ravitheja.addepally@intel.com>2015-10-28 09:47:29 +0000
committerRavitheja Addepally <ravitheja.addepally@intel.com>2015-10-28 09:47:29 +0000
commitf546b411d01f5d320f6a840ea861b6f0c58eee96 (patch)
treea1fa89e5d0ed59ac6895f5438eb8318104f25d0d /lldb/test/functionalities/inferior-assert/TestInferiorAssert.py
parent53ae707e3907ace69022c29d0ab4e14357fa2fef (diff)
downloadbcm5719-llvm-f546b411d01f5d320f6a840ea861b6f0c58eee96.tar.gz
bcm5719-llvm-f546b411d01f5d320f6a840ea861b6f0c58eee96.zip
Changes for Bug 17384
Summary: Virtual dynamic shared objects, or vdso files were not loaded for Linux OS.In Bug 17384 the call stack could not be unwinded from functions residing in the vdso object. This commit adds support for loading such files by reading the Aux vectors since a vdso is invisibily mapped to the inferiors address space and the actual file is not present in the filesystem. The presence of the vdso is detected by inspecting the Aux vector for AT_SYSINFO_EHDR tag. Reviewers: lldb-commits, ovyalov, tberghammer Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D14118 llvm-svn: 251505
Diffstat (limited to 'lldb/test/functionalities/inferior-assert/TestInferiorAssert.py')
-rw-r--r--lldb/test/functionalities/inferior-assert/TestInferiorAssert.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/lldb/test/functionalities/inferior-assert/TestInferiorAssert.py b/lldb/test/functionalities/inferior-assert/TestInferiorAssert.py
index 7bbeff6c95a..e5bc232caea 100644
--- a/lldb/test/functionalities/inferior-assert/TestInferiorAssert.py
+++ b/lldb/test/functionalities/inferior-assert/TestInferiorAssert.py
@@ -12,7 +12,6 @@ class AssertingInferiorTestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
- @expectedFailurei386("llvm.org/pr17384: lldb needs to be aware of linux-vdso.so to unwind stacks properly")
@expectedFailureWindows("llvm.org/pr21793: need to implement support for detecting assertion / abort on Windows")
def test_inferior_asserting(self):
"""Test that lldb reliably catches the inferior asserting (command)."""
@@ -26,7 +25,6 @@ class AssertingInferiorTestCase(TestBase):
self.build()
self.inferior_asserting_registers()
- @expectedFailurei386("llvm.org/pr17384: lldb needs to be aware of linux-vdso.so to unwind stacks properly")
@expectedFailureWindows("llvm.org/pr21793: need to implement support for detecting assertion / abort on Windows")
def test_inferior_asserting_disassemble(self):
"""Test that lldb reliably disassembles frames after asserting (command)."""
@@ -40,14 +38,12 @@ class AssertingInferiorTestCase(TestBase):
self.build()
self.inferior_asserting_python()
- @expectedFailurei386('llvm.org/pr17384: lldb needs to be aware of linux-vdso.so to unwind stacks properly')
@expectedFailureWindows("llvm.org/pr21793: need to implement support for detecting assertion / abort on Windows")
def test_inferior_asserting_expr(self):
"""Test that the lldb expression interpreter can read from the inferior after asserting (command)."""
self.build()
self.inferior_asserting_expr()
- @expectedFailurei386("llvm.org/pr17384: lldb needs to be aware of linux-vdso.so to unwind stacks properly")
@expectedFailureWindows("llvm.org/pr21793: need to implement support for detecting assertion / abort on Windows")
def test_inferior_asserting_step(self):
"""Test that lldb functions correctly after stepping through a call to assert()."""
@@ -146,6 +142,12 @@ class AssertingInferiorTestCase(TestBase):
thread = process.GetThreadAtIndex(0)
self.assertTrue(thread.IsValid(), "current thread is valid")
+ lastframeID = thread.GetFrameAtIndex(thread.GetNumFrames() - 1).GetFrameID()
+
+ isi386Arch = False
+ if "i386" in self.getArchitecture():
+ isi386Arch = True
+
# lldb should be able to disassemble frames from the inferior after asserting.
for frame in thread:
self.assertTrue(frame.IsValid(), "current frame is valid")
@@ -160,6 +162,9 @@ class AssertingInferiorTestCase(TestBase):
pc_backup_offset = 1
if frame.GetFrameID() == 0:
pc_backup_offset = 0
+ if isi386Arch == True:
+ if lastframeID == frame.GetFrameID():
+ pc_backup_offset = 0
self.expect("disassemble -a %s" % (frame.GetPC() - pc_backup_offset),
substrs = ['<+0>: '])
OpenPOWER on IntegriCloud