[Lldb-commits] [lldb] r234992 - Exception registers aren't supported outside of Darwin
Vince Harron
vince at nethacker.com
Wed Apr 15 03:31:43 PDT 2015
Author: vharron
Date: Wed Apr 15 05:31:42 2015
New Revision: 234992
URL: http://llvm.org/viewvc/llvm-project?rev=234992&view=rev
Log:
Exception registers aren't supported outside of Darwin
Updated test to match
Differential Revision: http://reviews.llvm.org/D8812
Modified:
lldb/trunk/test/python_api/lldbutil/iter/TestRegistersIterator.py
Modified: lldb/trunk/test/python_api/lldbutil/iter/TestRegistersIterator.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/lldbutil/iter/TestRegistersIterator.py?rev=234992&r1=234991&r2=234992&view=diff
==============================================================================
--- lldb/trunk/test/python_api/lldbutil/iter/TestRegistersIterator.py (original)
+++ lldb/trunk/test/python_api/lldbutil/iter/TestRegistersIterator.py Wed Apr 15 05:31:42 2015
@@ -19,7 +19,6 @@ class RegistersIteratorTestCase(TestBase
self.line1 = line_number('main.cpp', '// Set break point at this line.')
@expectedFailureFreeBSD # llvm.org/pr14600 - Exception state registers not supported on FreeBSD
- @expectedFailureLinux # llvm.org/pr14600 - Exception state registers not supported on Linux
@python_api_test
def test_iter_registers(self):
"""Test iterator works correctly for lldbutil.iter_registers()."""
@@ -68,21 +67,29 @@ class RegistersIteratorTestCase(TestBase
print "%s => %s" % (reg.GetName(), reg.GetValue())
REGs = lldbutil.get_ESRs(frame)
- num = len(REGs)
- if self.TraceOn():
- print "\nNumber of exception state registers: %d" % num
- for reg in REGs:
- self.assertTrue(reg)
+ if self.platformIsDarwin():
+ num = len(REGs)
if self.TraceOn():
- print "%s => %s" % (reg.GetName(), reg.GetValue())
+ print "\nNumber of exception state registers: %d" % num
+ for reg in REGs:
+ self.assertTrue(reg)
+ if self.TraceOn():
+ print "%s => %s" % (reg.GetName(), reg.GetValue())
+ else:
+ self.assertIsNone(REGs)
# And these should also work.
for kind in ["General Purpose Registers",
- "Floating Point Registers",
- "Exception State Registers"]:
+ "Floating Point Registers"]:
REGs = lldbutil.get_registers(frame, kind)
self.assertTrue(REGs)
+ REGs = lldbutil.get_registers(frame, "Exception State Registers")
+ if self.platformIsDarwin():
+ self.assertIsNotNone(REGs)
+ else:
+ self.assertIsNone(REGs)
+
# We've finished dumping the registers for frame #0.
break
More information about the lldb-commits
mailing list