summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/lang/objc
diff options
context:
space:
mode:
authorMed Ismail Bennani <medismail.bennani@gmail.com>2019-12-10 15:09:25 -0800
committerMed Ismail Bennani <medismail.bennani@gmail.com>2019-12-13 12:33:31 -0800
commit2c91d5ba83156900944c82bb8feb1e340adb8ae4 (patch)
treed70460b4835cff4e536e3c2d8c5ec6fa05d290af /lldb/packages/Python/lldbsuite/test/lang/objc
parent348f22eac83d9a3ee946e41be43fe507f04a89b6 (diff)
downloadbcm5719-llvm-2c91d5ba83156900944c82bb8feb1e340adb8ae4.tar.gz
bcm5719-llvm-2c91d5ba83156900944c82bb8feb1e340adb8ae4.zip
LanguageRuntime: Simplify NSException::GetSummary() output
Summary: Right now, NSException::GetSummary() has the following output: "name: $exception_name - reason: $exception_reason" It would be better to simplify the output by removing the name and only showing the exception's reason. This way, annotations would look nicer in the editor, and would be a shorter summary in the Variables Inspector. Accessing the exception's name can still be done by expanding the NSException object in the Variables Inspector. rdar://54770115 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com> Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D71311 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/lang/objc')
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/objc/exceptions/TestObjCExceptions.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/lang/objc/exceptions/TestObjCExceptions.py b/lldb/packages/Python/lldbsuite/test/lang/objc/exceptions/TestObjCExceptions.py
index dbf6287bb20..ce9ee8e027f 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/objc/exceptions/TestObjCExceptions.py
+++ b/lldb/packages/Python/lldbsuite/test/lang/objc/exceptions/TestObjCExceptions.py
@@ -30,7 +30,7 @@ class ObjCExceptionsTestCase(TestBase):
self.expect('thread exception', substrs=[
'(NSException *) exception = ',
- 'name: "ThrownException" - reason: "SomeReason"',
+ '"SomeReason"',
])
target = self.dbg.GetSelectedTarget()
@@ -62,7 +62,7 @@ class ObjCExceptionsTestCase(TestBase):
'frame variable e1',
substrs=[
'(NSException *) e1 = ',
- 'name: "ExceptionName" - reason: "SomeReason"'
+ '"SomeReason"'
])
self.expect(
@@ -78,7 +78,7 @@ class ObjCExceptionsTestCase(TestBase):
e1 = frame.FindVariable("e1")
self.assertTrue(e1)
self.assertEqual(e1.type.name, "NSException *")
- self.assertEqual(e1.GetSummary(), 'name: "ExceptionName" - reason: "SomeReason"')
+ self.assertEqual(e1.GetSummary(), '"SomeReason"')
self.assertEqual(e1.GetChildMemberWithName("name").description, "ExceptionName")
self.assertEqual(e1.GetChildMemberWithName("reason").description, "SomeReason")
userInfo = e1.GetChildMemberWithName("userInfo").dynamic
@@ -91,7 +91,7 @@ class ObjCExceptionsTestCase(TestBase):
'frame variable e2',
substrs=[
'(NSException *) e2 = ',
- 'name: "ThrownException" - reason: "SomeReason"'
+ '"SomeReason"'
])
self.expect(
@@ -107,7 +107,7 @@ class ObjCExceptionsTestCase(TestBase):
e2 = frame.FindVariable("e2")
self.assertTrue(e2)
self.assertEqual(e2.type.name, "NSException *")
- self.assertEqual(e2.GetSummary(), 'name: "ThrownException" - reason: "SomeReason"')
+ self.assertEqual(e2.GetSummary(), '"SomeReason"')
self.assertEqual(e2.GetChildMemberWithName("name").description, "ThrownException")
self.assertEqual(e2.GetChildMemberWithName("reason").description, "SomeReason")
userInfo = e2.GetChildMemberWithName("userInfo").dynamic
@@ -140,7 +140,7 @@ class ObjCExceptionsTestCase(TestBase):
self.expect('thread exception', substrs=[
'(NSException *) exception = ',
- 'name: "ThrownException" - reason: "SomeReason"',
+ '"SomeReason"',
'libobjc.A.dylib`objc_exception_throw',
'a.out`foo', 'at main.mm:24',
'a.out`rethrow', 'at main.mm:35',
OpenPOWER on IntegriCloud